Smart dustbin using Arduino

The smart dustbin is built on a microcontroller-based platform Arduino Uno board which is interfaced with the Servo motor and ultrasonic sensor. An ultrasonic sensor is placed at the top of the dustbin which will measure the stature of the dustbin. The threshold stature is set at a particular level. Arduino will be programmed in such a way that when someone will come in front of the dustbin the servo motor will come into action and open the lid for the person to put the waste material into the dustbin. The lid of the dustbin will automatically open itself upon the detection of a human hand.

Ultrasonic Sensors:

Ultrasonic sensors work by sending out a sound wave at a frequency above the range of human hearing.  The transducer of the sensor acts as a microphone to receive and send the ultrasonic sound. It uses a single transducer to send a pulse and receive the echo.  The sensor determines the distance to a target by measuring time lapses between the sending and receiving of the ultrasonic pulse.

Servo Motor:

SERVO MOTOR is an electromechanical device that produces torque and velocity based on supplied current and voltage. It can push or rotate an object with great precision. Servo Motor SG-90 is used. It will perform its angular rotations when a signal will be provided by the microcontroller. The servo motor rotates approximately 180 degrees (90 in each direction).

Infrared sensor:

IR SENSOR is a radiation-sensitive optoelectronic component with spectral sensitivity in the infrared wavelength. It is used for object detection.

Connections: –

The Red Pin of Servo Motor is connected with Arduino 3.3v. The Black Pin of Servo Motor is connected with Arduino GND (Ground). The Orange Pin of Servo Motor with Arduino Pin 8. VCC of Ultrasonic Sensor is connected with Arduino 5v. The Trig of the Sensor is connected with Arduino Pin 7. The echo of the Sensor is connected with Arduino Pin 6.GND of the Sensor with Arduino GND.

The Smart Dustbin as you can see in the picture above is built using Cardboard. This is a custom-made Smart Dustbin equipped with HC-SR04 Ultrasonic Sensor, Arduino, and a Servo Motor. It is programmed using the Arduino code.


Servo myservo;
int angle = 0;
int anglestep = 50;

void setup(){
void loop() {
if(digitalRead(2) == HIGH){

Pins are defined for the Trigger and Echo. The Trigger and Echo pins of the HC-SR04 Ultrasonic Sensor are connected with the Arduino’s pins 6 and 7 respectively. Variables for the duration and the distance are defined. Create a servo object for controlling the servo motor. Define the pin of the servo motor attached. A function for calculating the distance measured by the Ultrasonic sensor for each degree is defined.

Once there is no one in front of the Ultrasonic Sensor the Smart Dustbin Lid remains closed.

The smart dustbin is a carefully designed solution that solves the social issue of waste disposal.


A Session with Mr. Thiyaragaraja Kumar

An enthusiast researcher Mr. Thiyaragaraja Kumar visited STEM land on 20th June 2022 to exhibit the projects made by him and to inspire young minds.  He is an inspiring, energetic, curious person who makes projects, and teaches and guides children to invent projects. He plans to take project-based learning for the children.

The projects include a wireless charging unit, a quiz breaker, and sun-directed solar panel motor drive equipment. The wireless charging unit works based on the principle of mutual induction. The Quiz breaker model is based on relays. It finds its Industrial usage mainly in industry automation and helps in finding the valve tripping or if there is any fault. Using this model, faults in the high boiler plants can be easily found and repaired accordingly.

The sun-directed solar panel motor drive model was interesting and inspiring. It works based on the principle of movement of the sun.  this exhibit was presented at the Japan conference in 2015. According to the movement of the sun the solar cell panel moves which is driven by the motor using an LDR. This model gained more attention than other models.

He had a session with our team and explained the working methodology of the exhibits. He also enlightened the people on the topics of BCD, the Fibonacci series, Pascal’s triangle (Mahameru), Mehruprasta, Base10 calculations, Base16, and Base20 calculations.

He threw light on various number systems like the Roman number system, Greek number system, Mayon number system, and Egyptian number system. He also elucidated the shortcuts in simplification, Vedic math which is used in quantitative aptitude. 

The whole session was inciting, encouraging, and enlightening. Mr. Thiyagarajan enjoyed sharing his exhibits, got fascinated with the framework of STEM land, and wanted to support us in encouraging children to invent more projects.

Reflections from the team: 

  1. The session was inspiring. We learnt more facts and it was interesting too. 
  2. It motivated us to make more projects on automation.
  3. It was interesting. The BCD chart was good. The Sun directed solar panel equipment was stunning. It stirred up to do more research on it.

Maximum Power Transfer Theorem

I am doing Prof.Nagendra Krishna Pura’s Basics electrical circuits course provided by NPTEL. In week 6, I learnt about maximum power transfer theorem.

states that – A resistive load, being connected to a DC network, receives maximum power when the load resistance is equal to the internal resistance known as (Thevenin’s equivalent resistance) of the source network as seen from the load terminals. The Maximum Power Transfer theorem is used to find the load resistance for which there would be the maximum amount of power transfer from the source to the load.

To verify this theorem, I have taken Vth as 10V and Rth as 5K ohms connected in series with the load resistance RL. Now I am varying the RL to get the maximum power

For doing this I have written a python program and plotted the graph power(mW) vs RL(Kohms)

# Maximum power transfer thorem using pyplot

from matplotlib import pyplot as plt

Rth = 5e3

Vth = 10

RL = [x*1e3 for x in range(21) if x >0]

Vth_across_RL = [res/(Rth+res) for res in RL ]

I = [Vth*1e3/(Rth+res) for res in RL]

def power(Vtholtage_list,current_list):

power_list = []

for i in range(len(Vtholtage_list)):

p = Vtholtage_list[i]*current_list[i]


return power_list

#print(power(Vth_across_RL, I))

power_list =[x*1e3  for x in power(Vth_across_RL, I)]

RL_kohms = [x/1e3 for x in RL]


plt.xlabel(“Resistance in Kohms”)

plt.ylabel(“Power in mW”)

From the graph I observed that when the load resistance (RL) is equal to the Thevenin resistance (Rth) of the circuits then I able to draw the maximum power from the source.

Interfacing BO Motor with Arduino

~ Vimal, Abilash, Prabha

We had learnt to interface a toy DC motor with the arduino platform. The idea is to design a sensor controlled vehicle which navigates based on the intensity of the light which falls on it.

We used a LDR(Light Dependent Resistor) as a sensor element for the project. The analog value of intensity of the light falling on it is measured and it ranges from 0 – 1024 (10 bit resolution limitation of arduino). We used a dual H bridge IC named L293D to actuate the motor. To get the desired torque, we have selected a geared motor with 300 RPM @ 12VDC.

For this task we used only one geared motor and one half of the dual H Bridge. For initial prototyping we used the breadboard, the enable pin of one half of the IC is connected to 5VDC, two IOs are assigned namely 4 and 7 to control the outputs of the IC. The LDR is connected to the analog pin A0. The LDR circuit is designed as a voltage divider circuit. The analog value obtained from the task is compared continuosly with the threshold limit of 950. If the value is changed the motor will rotate in clockwise direction else in anticlockwise direction.

Automatic street light using LDR

~Ranjith, Abilash

While preparing for the electronics class. we took “Automatic street light using LDR” as the circuit, where “LED” turns ON in dark, and turns OFF in bright place.

After giving the circuit connection, the LED didn’t turn OFF when it was bright. So we started analyzing the circuit, then we found out that, the R1 resistor was low when compared to the resistance of the LDR under the brightness.

We calculated the resistor value of R1, by assuming that

  1. Vbe = 0.6v was needed to turn ON the “transistor 1”.
  2. Resistance of LDR = 180 kΩ under minimum light for which LED should be OFF (if we further reduced the light, resistance will increase, then “LED” should turn ON and “transistor 1” should turns OFF).

From the calculation, we got that R1 = 13.17 kΩ, we approximate it to 10 kΩ.

Finally we made it to work.

Turning ON/OFF light bulb using Arduino and Relay

~ Abilash, Pratap.

Abilash and Saranya made a relay circuit during the Electronic session with Vimal, so the goal was to turn ON and OFF the AC bulb with the delay of 1 second which was connected to the Arduino and Relay. The Arduino was connected to the laptop and bulb to the 230v Alternating Current through the relay.  Pratap captured the video as a sudden surprise and made the learning rigorous.


Finch: using distance sensor

-Arun, Abilash

Abilash and I were testing the distance sensors in Finch Robot, which lead us to do a simple project where the Finch has to go through a track we made.

Raspberry pi course

In STEM land a person from Auroville came to the iSMART class to conduct a course about raspberry pi course. Initially I dont know how to use raspberry pi. I was curious to learn raspberry pi. I also learnt the differences and advantages between Arduino and Raspberry pi. I learnt the different pin functions and the number of pins on a raspberry pi board. Day 1&2 was fully theory session which was boring.

In order to make it interesting I started ask many question to the teacher and the session was engaged by the participants. What really was interesting in the course was that the Arduino can’t drive a relay but with a raspberry pie we can drive a relay. One the teacher told that a relay can be driven by rapberry, he had a relay module but he couldn’t drive it. I took as a challenge and struggled for two days and I figured it to drive a relay. We made a small circuit with 2 LED where when the relay is on one of that LED will turn on and when the relay is off the other LED will turn on.


After this the teacher was also very happy and he also learnt something from us. Then the next challenge was that to send and to receive inputs from a raspberry pi to a web page.The teacher had asked who knows web page development.


Since I learnt Django web framework in STEM land, I was able to connect What I knew with what I lean now.  So I had asked him to show an example how to pass inputs from raspberry to a web page. Then finally in the last class we were able to complete all the task that we planed to accomplish in the course. Now I have some knowledge about raspberry pi and also I can build something with it.

To learnt about raspberry pi visit this link      Click here

How to find a value of Capacitor

A capacitor is a two terminal passive element which stores energy.

There are two types of capacitor.

1. Ceramic Capacitor:

           Ceramic Capacitor

– These are small,non-polarised in yellow or orangish  in color.

How to identify these capacitor values:

The value is printed in three-digit code. The first two digits are the two most significant digits of the value, and the third digit is the exponent on the 10. The value is expressed in terms of pico-Farads.

For example,

104 becomes “10” followed by “0000”(four zeros) or 100000 pF, which can be written as 100 nF.

2. Electrolytic Capacitor

           Electrolytic Capacitor

– larger cylindrical bodies that look like small soda cans

– higher capacitance than ceramic capacitor

– they are polarized


How to identify these capacitor values and its polarization:

The value is followed by the voltage rating(maximum DC voltage the capacitor can withstand without damage).


There are two polarity indicators on an electrolytic cap:

1. The stripe painted on the body usually denotes the negative lead.
2. The positive lead is longer than the negative lead.

For example,

1000uf 25V – Thousand micr farads and 25 volt.

                          Capacitor Code Sheet




designing 4-bit microprocessor using magic tool

I started designing 4-bit microprocessor in magic tool, it consists of three block:

  • 4-bit full adder
  • register to store an input data.
  • 4-xor gates and one carrier input is used to 2’s complement for subtraction

Inputs which are used in it :

  • two 4-bit data A and B
  • carrier input
  • clock



In this microprocessor, the adding operation is takes place when carrier input is 0, and the subtraction operation takes place when carrier input is 1. During subtraction, one’s complement block takes one’s complement B data and it send to 4_bit adder. The carrier input value is 1 at subtraction. so it’s form two’s complement of B data in 4-bit full adder.

And also sanjeev taugth me, to align block in order to reduce area and to create data bus with multiplexing two inputs.