Wiznet makers


Published September 22, 2022 ©



0 Contests


0 Following

Original Link

[AIoT] Smart Dustbin using WIZnet EVB-Pico and TinyML

It automates the process of opening the lid of the dustbin only when a person is in front of the dustbin.

COMPONENTS Hardware components

x 1

x 1

x 1

Software Apps and online services

Arduino - Arduino IDE

x 1



One of the major problems faced in the world is waste management and not proper cleaning of waste. For example on the roads dustbins overflow and make the surroundings very dirty. By leaving garbage open in the surroundings could lead to a lot of diseases. So to prevent such diseases we must close the dustbins in our surroundings and see to it that we keep all our surroundings clean and green.

With the help of IOT we can automate the process of opening the lid of the dustbin only when a person waves his is hand in front of the sensor and it automatically closes the lid after a stipulated amount of time. This way the lid won’t remain open after the garbage is thrown.

Description of the project:- Components used:-

  • Wiznet Pico board
  • Ultrasonic sensor
  • 9v Servo motor
  • Jumper wires

1.Wiznet Pico Board:- Features:-

  • RP2040 microcontroller with 2MByte Flash
  • 1.8-3.3V IO Voltage (NOTE. Pico IO voltage is fixed at 3.3V)
  • 2 × UART, 2 × I2C, 2 × SPI, 16 × PWM channels
  • 1 × Timer with 4 alarms, 1 × Real Time Counter
  • Micro-USB B port for power and data (and for reprogramming the Flash)
  • 40 pin 21x51 'DIP' style 1mm thick PCB with 0.1" through-hole pins also with edge castellations
  • 3-pin ARM Serial Wire Debug (SWD) port
  • 10 / 100 Ethernet PHY embedded

2.Ultrasonic sensor: -





  • Transparent object detectable
  • Resistant to mist and dirt
  • Complex shaped objects detectable




3. 9v Servo Motor:-

The 9v servo motor is used in the project to open the lid of the dustbin depending on the command given by the pico.




4. Jumper Wires:-

These wires are used for all the connections in the entire project.

Working of the smart dustbin:-

In this project we are using a raspberry pico board as a micro controller to control the 9v servo motor and the ultrasonic sensor. The ultrasonic sensor would detect the movement and then send the signal to the pico board. According to the code written in the pico board the motor will move 90 degree which will pull the lid of the dustbin and in turn open the lid. After the stipulated time of 5 seconds. The raspberry pico would send the signal again to the servo motor to close the lid. This way the motor will automatically open and shut the lid of the dustbin.

Explanation of the code:-

The pins used in this project are declared in void setup(), From which camera input is taken by Pin(09), Echo Pin (13) and Trigger Pin (12) is used for ultrasonic sensor and the servo Motor trigger Pin (10).

When the input from the ultrasonic sensor is high and the distance calculated is less than 30cm the ultrasonic sensor’s input will be considered true. For the module to work it will also need the high (1) value from the camera module (refer to the below link for the human detection). If both the conditions are met the servo motor will be triggered and he lid will open for 5 seconds. After 5 seconds the lid will close automatically.

  • Smart Dustbin using WIZnet EVB-Pico and TinyML

  • Circuit Diagram

Comments Write