Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

photo diode programming with a pic controller help

Status
Not open for further replies.

luke_smart

New Member
Hi.
I'm using a photo diode to act as a switch for my pic controller and i need help with the programming because i am new to it.
i need the pic to be turned on when the output from the photo diode is low and i need the programming in basic.
any support i will be so grateful of.
Cheers Luke
 
Luke,

Are you asking how to turn on the DC power to a PIC when Light shines on a photo diode? If so, there is no programming required, just a DC switching circuit which is activated by the photo diode.

Is the light on as long as you want the PIC to be running, or do you want the PIC to start with just a momentary flash of light, and then keep going?

What happens when the light goes off? Should the PIC go into a state where it should remember what it was doing prior to the light going off?
 
I'm making an automatic can crusher, and the photo diode is used to send a signal through to the pic chip to activate a motor when the can drops and cuts off the light signal then stop the motor once the light signal is no longer cut off. so i want the chip to activate the motor once the light is cut off to the photo diode and then stop the motor once the photo diode receives light again.
 
Why not just use the photo diode to turn the motor on/off directly? Why is the PIC needed?
 
because there is more than one motor.
the first motor is controlled by the photo diode as i explained with the first photo diode becoming inactive once it signals the chip to make the motor stop. then the can will drop down into the crushing section where another photo diode, (once it stops receiving light) will activate the PIC which will activate another motor which runs until a micro switch is closed and then the system will reset with the first photo diode becoming active again.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top