# COMMUNITY : FORUMS : TECH

## 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

http://stuff.nekhbet.ro/2006/06/18/how-to-build-a-5v-regulator-using-78l05-7805.html

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 :-)
9 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
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

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