12v ac dc power supply problem on pic project
12v ac dc power supply problem on pic project
Hi Guys (Nice web site)
Afraid Im an electronics novice who has just bought a PIC kit to play around with. Ive built up a simple circuit to count high-low changes from a proximity switch, and operate a relay via a transitor dependant upon the input pulse count. It was intended to work on a moped from 12v DC, but it has since become apparant that the bike is running 12v AC (atleast thats what its reading on my meter). I realised this after cooking my first circuit when I attached it to the bike (the circuit works OK from an independent 12v DC power supply). The moped doesnt have a battery, and I think it runs from something called a 'magneto' . This appears to feed into some type of rectifier, but this output reads 12v AC aswell; and Im reading AC all around the bike. My confusion is compouded by the fact that the circuit grounds to the bikes chassis like normal DC auto wiring would, and all the bulbs etc look like normal 12v dc ones!!
Anyhow, my question. Can anyone explain this to me (im v.confused), and more importantly, any ideas how I might could get a nice smooth 12v DC to run the circuit.
thanks
John
Afraid Im an electronics novice who has just bought a PIC kit to play around with. Ive built up a simple circuit to count high-low changes from a proximity switch, and operate a relay via a transitor dependant upon the input pulse count. It was intended to work on a moped from 12v DC, but it has since become apparant that the bike is running 12v AC (atleast thats what its reading on my meter). I realised this after cooking my first circuit when I attached it to the bike (the circuit works OK from an independent 12v DC power supply). The moped doesnt have a battery, and I think it runs from something called a 'magneto' . This appears to feed into some type of rectifier, but this output reads 12v AC aswell; and Im reading AC all around the bike. My confusion is compouded by the fact that the circuit grounds to the bikes chassis like normal DC auto wiring would, and all the bulbs etc look like normal 12v dc ones!!
Anyhow, my question. Can anyone explain this to me (im v.confused), and more importantly, any ideas how I might could get a nice smooth 12v DC to run the circuit.
thanks
John
-
- Site Admin
- Posts: 173
- Joined: Tue Jan 29, 2008 7:05 pm
- Location: Nottingham, UK
- Contact:
Re: 12v ac dc power supply problem on pic project
Hi
I don't know about moped wiring but I suspect if there is no battery it is quite likely to be AC. You can use a bridge rectifier to provide a DC supply for your project, although rectifying 12V AC will give (12 x 1.414 = ) 16.9V. This will allow you to use a voltage regulator such as the LM7812 along with a large electrolytic smoothing capacitor and 2 small ceramic capacitors to give a regulated 12V DC supply.
Check first what voltage your project actually needs though - the PIC will run on 5V so must have a regulator on the board already - I guess the relay runs from 12V directly, switched via the transistor?
See schematic below as an example - search for the 7812 datasheet for more info. The circuit is a standard power supply circuit, without the mains transformer on the input.
Note the 1000uF capacitor is electrolytic, the others are cermaic. The voltage regulator might need a heatsink, depending on the current drawn.
I don't know about moped wiring but I suspect if there is no battery it is quite likely to be AC. You can use a bridge rectifier to provide a DC supply for your project, although rectifying 12V AC will give (12 x 1.414 = ) 16.9V. This will allow you to use a voltage regulator such as the LM7812 along with a large electrolytic smoothing capacitor and 2 small ceramic capacitors to give a regulated 12V DC supply.
Check first what voltage your project actually needs though - the PIC will run on 5V so must have a regulator on the board already - I guess the relay runs from 12V directly, switched via the transistor?
See schematic below as an example - search for the 7812 datasheet for more info. The circuit is a standard power supply circuit, without the mains transformer on the input.
Note the 1000uF capacitor is electrolytic, the others are cermaic. The voltage regulator might need a heatsink, depending on the current drawn.
- Attachments
-
- PSU.jpg (28.78 KiB) Viewed 5468 times
Re: 12v ac dc power supply problem on pic project
simon. thanks, that gives me something to go at, i will try wiring the bridge rectifier, and Ill have a bit of a think as to how to deal with the signal from the prox switch which I guess is also AC and needs to feed directly to the PIC (maybe I will also need a rectifier on this). you are correct. at the moment i have the relay wired 12 v and the pic/ transistor from a 5v regulator. thanks again. john
-
- Site Admin
- Posts: 173
- Joined: Tue Jan 29, 2008 7:05 pm
- Location: Nottingham, UK
- Contact:
Re: 12v ac dc power supply problem on pic project
Sorry, didn't notice about the input - as you say probably also AC. again a bridge or even half-wave (single diode) recifier should do this, along with a 5.1V zener diode and resistor to clamp the voltage to a level that won't fry the PIC! Might be wise if you are unsure to test the switch input without the PIC fitted first to check the voltage.