Ardiuno Projects

~ Sivaraman

Arduino projects are done for the learning of embedded systems programming. In simple terms, this supports make projects that are programmable yet interact with the real world. These games were programmed in C language, which can also be written with snap4ardiuno, interactive programming  for children and includes a module for Arduino.

While children/youth who have been coming to STREAM Land have been programming in Scratch we had not been able to create an interesting context for them to move to hardware programming since COVID. This changed in the recent Christmas Fair where children were making games that others could play. It seemed so much fun that the youth also wanted to demonstrate their programming skills and out came the Arduinos. [Siva Sankaran, Sivaraman Ramamoorthy] Here are a few games that were made that were popular with the children.

Simon Says

This project is a memory follow game where you have to follow the led blinks and need to click on the appropriate flow of blinks to win the game.

Runner Game

This game is runner game where hops and hide are made using a push button to hop and hide to maintain the flow to the run.

Shooting Game

This one is the difficult to play with two hand was made purpose fully to make the game harder, one hand should control the x axis movement and second hand is for the shooting control

 

Cycle Safety light

For quite a long time (year and a half), kids in the electronics lab have been working on breadboard circuits which they build and then dismantle. They built quite a few circuits this way working with LEDs, Opamps, comparators, 555, microphones, speakers etc. We found that generally one in 20 kids to whom the circuits were introduced become interested to come regularly to the lab in the evenings at the expense of their free time which they usually use to play. A visitor from Austria expressed surprise that any kids at all turned up at the lab at the expense of play time.

Sanjeev and Siva both suggested that this number (1 in 20) would go up if we focussed on some practical circuits which the children could use in their daily lives (and also show their parents, friends and relatives) instead of just making toy circuits on the breadboard which they would proceed to dismantle to build the next circuit. Obviously this is a bit harder and a bit more time consuming for some of us, and that’s why we stayed in the comfort zone (among other reasons) for all this time. Well, staying in comfort is not a universal value and it was clear that changes will have to be made.

So we have now (finally!) started on practical applications. Two of these are

  1. An outdoor light that turns on automatically when the sun sets and turns off automatically when the sun rises (Blog post to come).
  2. An indoor light that turns on when there are people in a room and turns off when people have left the room or staying still (Blog post made by Manogar and Sundaresan)

The third was an idea that came from kids themselves. Their mothers are understandably worried when they use their cycles at night. Cycles owned by the kids have no back lights to warn motorists who approach the cyclist from behind. So it was decided that a light at the back of a cycle that flashed red light once a second was a fine practical circuit. Humans (indeed all predators) are sensitive to movement rather than stillness and to flashing lights rather than still lights. They are also more sensitive to Red and White flashing lights than to any other color.

So an astable multivibrator was built based on the 555 chip which the children first tested on the breadboard and then soldered it on the PCB with help from C3StreamLand youth. An 8th standard student from Udavi school called Ajay took up the challenge to design the structure to house the circuit and to also mount it on his cycle. The student you see with the cycle and the flasher in the attached photos and videos is Ajay.

Ajay’s next target(s)

  1. Make it waterproof
  2. Make it robust to rough riding
  3. Power it off a Dynamo instead of a 9V battery as is being done now

Ambient light sensor using a photoresistor and Arduino Uno

This project is about using a photoresistor along with an Arduino Uno board to determine the brightness of a room which is bright or average light or dark. A photoresistor which is also called an LDR (LIGHT DEPENDENT RESISTOR) and two LEDs and Breadboard and a 1 k ohm Resistor and 2 resistors for the LEDs which range from 100 ohms to 220 ohms are used. The jumper wires are used to connect Arduino digital pins to the breadboard. The output is displayed through the LEDs and Serial Monitor.

WIRING: The photoresistor is wired into analog pin 0 and a 5V on the right side of the breadboard. It runs through a grounded 1K ohm resistor. An LED on the opposite side of the breadboard into digital pin 13 and grounded a 220-ohm resistor slightly to the right of the first LED, a wired LED of a different color is employed, just with a different digital pin.

Photoresistor working principle:

A photocell or photoresistor is a sensor that changes its resistance when light shines on it. The resistance generated varies depending on the light striking the surface. High intensity of light incident on the surface will cause a lower resistance, whereas a lower intensity of light will cause higher resistance.

WORKING: If the photoresistor reads a value above 450 ohms, it prints “It is quite light!” on the serial monitor and turns all LEDs off. If it reads a value between 230 ohms and 450 ohms, it prints “It is average light!” on the serial monitor and turns on the left LED. This only leaves us with values below 230 ohms to account for. If a value is below 230 ohms, it prints “It is quite dark!” on the serial monitor and turns on both LEDs.

Components setup:

Applications:

The ambient light sensor is used to control the backlight of LCD-based applications to control the display brightness of mobile for reducing battery life. The applications of this sensor range from consumer electronics to automotive. This is the main benefit of mobile applications.

These devices are used to replicate the sensitivity arc of the person’s eye, allowing mobile displays and the levels of its brightness to be attuned more accurately. These sensors are used in automotive applications like headlight control & cockpit dimming.

The main feature of this sensor is an automatic alteration to save power & to increase the LCD screen’s life in handy display devices. Additionally, these sensors control the backlighting based on the program set by the maker.

This sensor is also used in indoor as well as outdoor lighting for turning on/off which includes street lighting and electronic signals.

LDR photoresistor code

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.

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 the Servo Motor is connected to Arduino 3.3v. The Black Pin of the Servo Motor is connected to Arduino GND (Ground). The Orange Pin of the Servo Motor with Arduino Pin 8. VCC of the sensor is connected with Arduino 5v.

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  Sensor, Arduino, and a Servo Motor. It is programmed using the Arduino code.

Code:

#include<Servo.h>
Servo myservo;
int angle = 0;
int angle step= 50;

void setup(){
myservo.attach(8);
pinMode(2,INPUT_PULLUP);
}
void loop() {
if(digitalRead(2) == HIGH){
myservo.write(180);
}
else{
myservo.write(-180);
delay(3000);
}

Once there is no one in front of the  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]

power_list.append(p)

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.plot(RL_kohms,power_list)

plt.xlabel(“Resistance in Kohms”)

plt.ylabel(“Power in mW”)

plt.show()

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.