Showing posts with label Photo Resistor. Show all posts
Showing posts with label Photo Resistor. Show all posts

Thursday, 2 October 2014

Light Following Robot

Light Following Robot Using 555 Timers.


I actually made this towards the end of March, i became interested in using integrated circuit and micro chips to make stand alone projects as they are cheaper than using an arduino for each project.

There are two configurations for 555 timers mono stable and astable. For this project monostable is used. A great website explaining how they work.


Monostable Operation

"Unlike the astable, which has two unstable states and so continually switches from one to the other and back again, the monstable has one stable state and one unstable state.
When triggered by a suitable pulse at its input (pin 2) it switches from its stable state, in which the output is low, to its unstable state where its output is high. This state exists for a time controlled by the values of R1 and C1, and at the end of this period the output switches back to its stable (low) state. Its primary use is therefore to produce a set time delay, initiated by an input pulse."


Quote and image taken from http://www.learnabout-electronics.org/

Building The LFR

I followed this instructables it was the most simple one i could find, there are other tutorials out there that use potentiometers to set the sensitivity of the LDR's and hence the speed of the motors.




Conclusion

The idea worked however the LFR didnt really move.. i didnt have proper wheels, i cut some out from cardboard. Also the fact i didn't use motors with gear boxes and gave the motors more voltage than they needed resulted in not much torque.

For my first play with 555 timers i am still happy with the out come. Ultimately i decided that having a mobile platform that i could add sensors to and program would be a better use of my time and didn't continue with it.

Wednesday, 12 February 2014

Solar tracker

Solar tracker 


Update..

Its been a while! ive got a few more projects that im working on. Im looking into building a balancing two wheeled robot, the chip im using is a MPU-6050 6-axis accelerometer/gyroscope which im having trouble getting my head around.. i found code to get values from it ive just got to find a suitable project to demonstrate it, i am also in the process of building a P.C.

I was interested in this because the code can be used for a line following robot, also for solar panel applications.

Components

A servo
Bread board
Cardboard and tape to separate the two LDR's
2 LDR's
Two resistors, im using 550 ohms
Arduino
Wires


Code

The voltage received from the LDR's is compared with each other with a tolerance of 10 added, this is to stop the servos from jittering when say a cloud passes over one of them. If one voltage is bigger than the other the servos will move in 1 degree increments untill they are equal.

The Circuit


The left LDR is connected to A1 the right to A2, between these connections is a resistor connected to ground, with the other leg of the LDR's connected to 5V.

Conclusions

The positioning/angle of the LDR's really affect the accuracy of the system, and should be as symmetrical as possible.




  

Wednesday, 18 December 2013

LCD Display


Displaying two variables on a SainSmart LCD keypad shield

Intro

Displaying information on an LCD display is something i want to use in future projects.
I am trying to create a menu using the buttons on the shield but this is a little above my programming level at the moment. 

I could have made a simple menu where if i held "down", temperature is displayed or "up", the light level is displayed, however i want to create a "Real Menu" using arrays to store the different things to be displayed on the LCD and counters to control where we are in the menu and what is to be printed to the LCD.

The circuit


Code
Awesome code showing a menu
Good advice
Wiki



Monday, 2 December 2013

PIR and Light Sensor to LED


Using two variables to control an event, in this case turning an LED on.

Automatic light

The Plan

Using a photo resistor and a proximity sensor i want to recreate the automatic light!

Photo resistor

When placed in darkness resistance is high and vice versa.
Used in a voltage divider circuit. We analog read the pin giving a reading between 0 and 5 volts which is then assigned a digital value between 0 and 1024. A great video on voltage dividers.



a voltage divider circuit

PIR

Stands for Passive infrared sensor (HC-SR501) 

Left pot. Adjusts sensitivity,  clockwise more sensitivity and vice versa

Right pot. Controls amount of time (delay) between movement and re-trigger i.e. when set to mid point the time between is 5 seconds. This is only useful if not using a micro controller,  however when using a micro controller the delay can be programmed. A more in depth explanation on how they work here. 


PIR sensor

The circuit


Conclusions

A relay could be wired up and this circuit could be used to control a light with more power.