Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 25th September 2003, 02:08 AM   (permalink)
Default Newbie help!

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!!!!!
Attached Files
File Type: zip light.zip (8.9 KB, 51 views)
Low_Rider is offline  
Old 26th September 2003, 01:03 AM   (permalink)
Default 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
Low_Rider is offline  
Old 26th September 2003, 03:34 AM   (permalink)
Default

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.
__________________
"There is no way to peace, peace is the way!"
kinjalgp is offline  
Old 26th September 2003, 05:28 AM   (permalink)
Default RE: LDR

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

http://lightbrain.8m.com/twin-plus.html

I think he's using a PIC 12C508A, and he is able to monitor bulb status easily. Does the Pic 16F84a have similar capabilites??
Low_Rider is offline  
Old 26th September 2003, 01:18 PM   (permalink)
Default

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
Exo is offline  
Old 26th September 2003, 07:49 PM   (permalink)
Default

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.
Chippie is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 03:15 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker