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.

Newbie help!

Status
Not open for further replies.

Low_Rider

New Member
To get into PIC programing I thought I'd build what I thought would be a simple circuit and modify it a bit. Basically it's a halogen light controller with a Pic 16F84a to control the PWM. It's based on Jim Robertsons design from lightbrain.8m.com and I've modified the program a bit, but I don't really know what I'm doing. :? I'd also like to add a three color LED to show me a few different states:

I know this is possible
Controller ON/OFF: Blue LED ON/OFF

But would it be possible for the PIC to tell if the light is connected (and turned on)or not?? so if the light bulb dies the LED would flash on and off

No Light: Blue LED flashing

And thirdly, can the PIC be used to read the battery voltage, and at a certain preset flash the red LED

Low Batt: RED LED flashing

Obvioulsy I can't have more then one color on at a time. How would I hook this up, and can someone help me with the code??? I've enclosed a rough schematic and the orriginal code (freeware) + my attempt of a variation. (freeware2)


Cheers,
Dave.

BTW, as time progresses and I start to learn a bit more I hope I can become a valuable member in the future!!!!! :D
 

Attachments

  • light.zip
    8.9 KB · Views: 133

Low_Rider

New Member
Re:

I'm not going to bother with the battery voltage monitering now, but I haven't really got any programing skills and still need a hand to do the other stuff. Can anyone give me a hand?

Cheers,
Dave
 

kinjalgp

Active Member
Use LDR (Light Dependent Resistor) along with associated circuitry to detect whether your Halogen Lamp has turned on or not. The LDR circuit will output 0 when lamp is not working and 1 when lamp is on. All you need in the circuit is a NPN transistor, two resistors and a LDR.
 

Low_Rider

New Member
RE: LDR

Thanks, but I don't really want to have the extra bulk as space is limited.

**broken link removed**

I think he's using a PIC 12C508A, and he is able to monitor bulb status easily. Does the Pic 16F84a have similar capabilites??
 

Exo

Active Member
yes, pic 16f84 can do anything the 12c508 can. 508 is just a small 8 pin pic. 16f84 is bigger; with more i/o pins
 

Chippie

Member
If you base your design around the 508, you can do the development using an F84, then when satisfied your code is ok you can burn it to a 508. Saves burning 508's only to find the code dont work.
 
Status
Not open for further replies.

Latest threads

Top