9v to (5v-3v) for pic 16f628a

Problem: I have a 16f627/628 (runs between 3 and 5 volts) that needs to work in tandem with another device (call it D) running at 9, direct current, (active for 1 second in 30 or less frequent). Upon hooking up a number (of descending in size) resistors (without D connected) with the supply and 16f6xx the 6 LED's powered by the 16f6xx do not turn on unless resistance is extremely minimal, and voltage is well above that advised in the datasheet (not to mention making the pic reset itself every 10ms). Can anyone tell me how I might run the 16f6xx from a 9 volt battery, and explain what was going on? This may seem unforgivably dim to anyone who knows but unfortunately I'm more a software guy learning hardware as I go along. Any help would be much appreciated, Thanks Andy

sort by: active | newest | oldest
schorhr9 years ago
There are two ways for your setup.
One would be a voltage regulator chip such as 78l05


A more quick&dirty way would be to use a series of diodes.
Depending on the diode, the voltage will drop 0.45v or close to that.
So if you have no voltage regulator IC, but diodes laying arround, connect them in series (at least 8 if its a bunch of regular diods) and mesure the voltage :-)
matseng schorhr9 years ago
Using diodes to drop the voltage is not recommended, especially if the load is varying since the drop varies from about 0.45 volt up to over 1.2 volt depending on the current. Dropping 9 volt down to 5 volt @ 100mA (a reasonable current with 6 leds lit) using plain 1n4448 diodes would require 4 diodes. When all diodes are turned off the current would be like 1mA and the diodes would only drop 1.8 volt in total giving 7.2 volt to the PIC - that's quite over the absolute maximum supply voltage.
andy (author)  matseng9 years ago
Got the parts through, *finally* and it works a treat, Thank you,
andy (author)  matseng9 years ago
Ah, thanks for that, lucky I checked Instructables again before carrying out, never thought I`d say this but, it is lucky I was working this weekend. Having said that; no immediate damage appears to be manifested after voltages anything short of 9 volts (and even then it`s just needing a re-write). Ah well to Ebay to get some regulators. Thanks for your input and time, Andy
andy (author)  schorhr9 years ago
Ah great, just the information I was needing, many thanks, Andy
Did you put your resistor in series with your PIC ?

If so, that's not how to proceed.
Resistors limit the current. It does not "reduce" the voltage.

The universal formula is : U = R x I

U is the voltage measured between the terminals of the resistor, in Volts.
R is the value of the Resistor, in Ohms.
I is the current going through the Resistance, in Amperes.

The current I consumed by your PIC is not constant. It varies according to what it is doing. So, the current I going through the resistors R varies too.
Which means that the voltage U measured at the terminals of your resistor varies too !

Maybe your PIC is damaged now ....

If you want to make 5V out of 9V, you need a regulator : 7805

andy (author)  chooseausername9 years ago
Ah right, I suspected that the current was in some way being effected, my multi-meter only measures tiny amounts for some reason, so I couldn't check directly. Ah well, thanks, now I know what was going on. As for the PIC, its okay, thought I had fried it but I just rewrote to it and it's fine, phew on that score. (I’m not going to use it for anything other than this application so I don’t mind if some irrelevant bits are cooked, and it’s an old '627 that’s had more rewrites than it can count in a single 8 bit integer, in any case.) I have a series of 16f6xx instructables coming up as soon as I get the internet at my place, hopefully they will be a little more successful than this project at the moment. Thanks for your help, Andy