12F683 Auto Light

Thread Starter

JDR04

Joined May 5, 2011
367
I'm using this project more to learn about Flowcode 5 and how to use a PIC (12F683) to detect darkness and then turn a LED on.

I've done a Program with FLOWCODE 5 and it all worked great in simulation. However....the actual circuit itself is proving to be difficult for me.

I have a phototransistor to detect the light/darkness. The buzzer will sound twice when turning the circuit on.

My problem is I dont think I have wired the buzzer and the phototransistor to the PIC correctly as nothing works.

I have attached the circuit and really would appreciate your guys help on this.

Thanks a lot.JDR04
 

Attachments

MMcLaren

Joined Feb 14, 2010
861
Hi JDR04,

I know nothing about FlowCode. Sorry. But I noticed you have the buzzer connected to pin 4 on the 12F683 and that's a pretty obvious mistake. Pin 4 is the RA3/MCLR/VPP pin which is an "input only" pin.

Good luck on your project.

Cheerful regards, Mike
 

THE_RB

Joined Feb 11, 2008
5,438
R3 is a bit low in value at 10k. Depending on your light level, the phototransistor can have quite a high resistance.

I would try a much higher value resistor for R3, maybe 47k or 100k?

Also you should check the voltages on the ADC input pin3 with the circuit in light and in darkness. That will give you more info re the ADC result.
 
Top