12v to 5v with 7805

Discussion in 'General Electronics Chat' started by tee2, Mar 8, 2010.

  1. tee2

    Thread Starter Active Member

    Nov 19, 2004
    46
    3
    Hi,

    With the help of this forum I put a USB plug on my motorcycle using an 7805 with a 10uf cap on the 12v side and a 1uf cap on the 5v side. It works great for running my GPS and Ipod. So great that I have some people that want me to make them one too.

    What would happen if a 7805 fails? Does it fail safe? Or is it going to send 12-18v to the device? Any other thing I would need to worry about. Some of the people I know but most are people that seen it in a forum that I don't know.

    My first idea was to just sell a kit with all the parts and let them solder it. But a few wanted me to solder it for them.

    Here is what I have.
    [​IMG]

    My plan was to put some hear shrink over the 7805 and caps put some silicone in the two ends and then shrink. I have not noticed mine getting warm but it has been cold when I have been tiring it. Most will be going on dirt bikes so water is a problem. There should be plenty of air flow to help keep them cool.

    Thanks for any advice.

    PS I'm not looking to start a business here, just make a few bucks to fund the hobby, and to give me something to do while I'm off work.
     
  2. R!f@@

    AAC Fanatic!

    Apr 2, 2009
    8,754
    760
    If the regulator is running more that 50% of it's rated current then it is advisable to use a small heatsink.
    These regulators have in built thermal protection and short circuit protection. And are very robust as far as I have seen.
    A shorted output is something I seldom see, but a faulty regulator might give a low voltage output.
    But if you like to make it safe then you may use a 6.2V 1W zener across the 5V output. In this case if the regulator develops a in out short circuit, then the zener will also short circuit blowing the fuse. Or by the way, when tampering with automobile harness, remember to use inline fuse for protection.
    You'll never know what might happen
     
  3. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    To the best of my knowledge the regulator is designed to shut down on failure mode. If you want an additional level of security look up "crowbar circuits" and add a fuse.
     
  4. kkazem

    Active Member

    Jul 23, 2009
    160
    26
    Hi, I'm a professional Power Supply design engineer and have been using the 78xx for many years. These are amazing IC's and have special design features that protect them from damage under most circumstances. Please refer to the datasheet (Fairchild, in this case): http://www.fairchildsemi.com/ds/LM%2FLM7805.pdf
    Depending on manufacturer,some 7805's have a max input of 30 VDC and others can go up to 35 VDC. The Fairchild part can handle 35 VDC input. They have internal current-limiting, overtemperature protection, and safe-operating area protection; so that one cannot damage the part by overloading or short-circuiting the output of the 7805. Even if no heatsink is used, if it gets too hot (the internal junctions), it will simply shut down the output until it can cool down to the point where it'll oen perate again. So, worst-case, your USB won't have the 5v for a few minutes, then it will return on its own when cooled or when the overload or short is removed. There are 1 or 2 situations that can damage the 7805:
    a) Applying too high an input voltage. Do not, under any circumstances, ing apply an input voltage higher than the absolute maximum, and in general, that only applies for a momentary input. Look at the Recommended Operating conditions for the maximum steady-state input voltage that can be applied. Since a Motorcycle can have spikes on the 12V electrical system, the 7805 should be protected at a minimum, with a good-sized input cap of around 10uF, 25V. electrolytic will do, but tantalum is much better, and multi-layer-ceramic even better yet. You do not always need an output cap, but if you use one, it should be smaller than the input cap, say 1uF or so. One of the worst killers of 7805's is the use of a large (or even a medium-sized) output cap, and then have the 7805 input to ground pin get shorted or quickly discharged. This will force the 7805 to discharge the output cap thru the 7805, which likely will damage it, if it is a big enough value. There is a simple fix for this, which is to install a diode (1N4004 type or similar) with the anode to the 7805's output pin and the cathode to the 7805's input pin. This will force any discharge thru the diode and around the 7805, protecting it. This is only needed if you have the potential for a quick discharge of the 12v input to the 7805. Well, that's about it. The 7805 is nearly indestructable if you watchout for the 2 pitfalls I mentioned. I recommend that if you're going to sell these circuits to your friends, that you make a circuit board. There is free online software to lay out the board and since it will be fairly small, you can probably get 25 to 50 boards for about $1 to $2 each in those quantities. Otherwise, you can make them one-at-a-time using Vectorboard, but what a waste of time since you could use a circuit board fairly inexpensively.
    Feel free to contact me with any questions about this. Good luck.

    Regards,
    Kamran Kazem
     
  5. tee2

    Thread Starter Active Member

    Nov 19, 2004
    46
    3
    Thanks for the replies guys.

    kkazem.. I do have the 10u and 1u caps like you suggested. I'll look into the diode too.

    I just noticed today that my Ipod won't charge. It will play while plugged in and it shows that it is charging, it will go from a 1/4 red battery when unplugged to 1/4 green battery then goes back to 1/4 red.

    I hear some Garmin GPS's and cell phones will not work when plugged into a USB power supply like this for power it thinks it is connected to a computer. Are these devices smarter that just looking for 5v?
     
  6. kkazem

    Active Member

    Jul 23, 2009
    160
    26
    I really haven't investigated whether or not those devices might think they're connected to a computer and not accept the 5V, but it sounds doubtful to me. Moreover, I would need to know if you're plugging in a USB-to-USB cable, or a USB to a power supply input on the IPOD and GPS device. If you have a USB connected to a computer on one end and you're plugging into a 5V input power supply connection on the other end on your IPOD and/or GPS, then it's very doubtful that it would not work due to the load device thinking it's connected to a computer. More likely, you're not connecting the 5V to the correct pins on the load device, or you need to connect the 5V to more than one pin, or you may need to jumper a pair of pins on the connector on the load device or something like that. I have no idea, but I'm sure there are others out there that may have a pinout for the IPOD and perhaps even for the Garmain GPS you've got.

    Good luck,
    Kamran Kazem
     
  7. R!f@@

    AAC Fanatic!

    Apr 2, 2009
    8,754
    760
    The USB devices need only one pin and a ground for supply and 2 pins for communication. Any item that charges through a single USB port must nod exceed 500mA, if it does the device will not charge properly or work for that matter.
    5V and ground pin are located at both ends of the connector, the middle two are the com wires.
    Ur usb port might develop are problem if the device tries to draw more than the port can supply, and it will definitely damage the port. but sometimes good mobo's uses resettable fuses at the supply terminal, and if shorted or overloaded will cut off the power temporarily.
    If you are trying ur device with the PC and s not charging try another port and still if it gives a problem try with double ended USB cable that uses two port to power a device, this way you can get 1 amp for the device, even if this did not work then you have faulty USB power circuit or the device is giving you trouble.
    Secondly if your device is taking more 500mA, then I advice you to use a heat sink with ur 5V regulator and also enuf in out filters to filter out ignition spikes to prevent the ipod for developing fault, GPS on the other hand can withstand spikes, as it is made to work vehicles.
    Try this for a change atleast.
     
  8. tee2

    Thread Starter Active Member

    Nov 19, 2004
    46
    3
    Okay, this is driving me nuts now. This is what I know.

    1) I'm using a 7805CV ( I checked the datasheet output is 1.5 amp at 5v) with a 10uf cap on the 12v side and a 1uf on the 5v side. Temperature has not gone over 78° on the metal back.

    2) Using a L-com waterproof USB plug. Pin 1 5v +, pin 4 neg, pin 2 and 3 are not used. I had problems with this plug back in December that the forum helped me with. The pins 1 and 4 where crossed. I'm 100% sure it is correct now.

    3) I am using a cheap walwart power supply with a 7812CV giving me 11.97v. for my test power.

    4) I can plug in my Ipod with dead battery (where it will not turn on, on it's own) it will turn on, and play. It played all night like that. Unplugged and it didn't take a charge. With it plugged in without playing it will not charge. When I plug it in to my Macbook it charges like it should.

    5) My Cell phone works about the same, with dead battery it will work as long as it is plugged in, but it will not charge. Plugged into the charger it charges fine. Charger output is 5v 550ma.

    6) I don't have rechargeable batteries in my GPS but it will work fine while plugged in.

    I know a computer USB puts out 500ma, the phone charger puts out 550ma, my 7805CV pits out 1.5 amp. That is the only thing I see that is different. Can these things pickup on how many amps there are and not like the 1.5 amps?

    Any ideas?

    I am ready to take a hammer to my car phone charger to see what is in it!

    Thanks for any help.

    Todd
     
  9. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    Meter the pins of your cell phone charger. Are you SURE only pins 1 and 4 are being used? They should be.

    As for your phone and Ipod, the charging circuits are built into the phones. If the phones are expecting 500ma and you are supplying less they will not enable charge mode. This is why a phone takes a few seconds from the time you plug it in before it starts charging, because it is establishing charge or run levels.
     
    Last edited: Mar 11, 2010
  10. atferrari

    AAC Fanatic!

    Jan 6, 2004
    2,648
    764
    Reverse engineering is done carefully; hardly with a hammer. Think of something more delicate and less invasive...
     
  11. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    Like a brick. ;)
     
  12. R!f@@

    AAC Fanatic!

    Apr 2, 2009
    8,754
    760
    LMAOF :D
    What is effective brick or hammer.
    I go for a nice goal kick over the high way. ;)

    Hey buddy, you said ur device takes 550mA, see you can now see the reason, the regulator is rated at 1.5A is it's maximum current rating with a good heatsink.

    You need to measure the regulator output voltage with th ipod in play mode.
    And also if you can try to measure the current that ipod and the phone draws from the regulator.
    secondly measure the input of the regulator while the ipod is plugged in, keep it in play mode.
    post these values, then we can figure out ur problem.
     
  13. tee2

    Thread Starter Active Member

    Nov 19, 2004
    46
    3
    I have read (Google got a workout) some Ipod's and the Iphone's need power to the comm pins, # 2 and 3. Someone used a 150Ω resistor from 12v to pin 2 and 3. And that worked.

    I looked to get a 7805 with 500mA but can not find one in a TO-220, but can find a 1A. I'm going to get a few of them and try things on the breadboard. My DMM will only do micro amps 0-200 μa, I'll pick up a cheap DMM that will do DC current.

    I'll get this working one way or another.

    Todd
     
  14. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Get yourself a precision 1 Ohm resistor. I have one rated for 50W. If you use a 1 Ohm resistor in series in a circuit, you can measure the current directly across the resistor. 1V=1A.

    Measuring current directly using a DVM is risky; it's very likely that you will either blow the fuse or destroy the meter if current is high enough.
     
  15. tee2

    Thread Starter Active Member

    Nov 19, 2004
    46
    3

    5V at 500-1500mA would be enough to destroy a cheap meter?

    I'm going to start over on a breadboard and see what happens.

    thanks

    Todd
     
  16. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    There is a 250mA miniature fuse inside the meter. Radio Shack sells fuses that will work, but they charge quite a bit for them; last time I bought a 4-pack it was like $3. :rolleyes:
    That's about what I spent on the whole meter.
     
  17. tee2

    Thread Starter Active Member

    Nov 19, 2004
    46
    3
  18. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Note that the resistors are on the OUTPUT side of the 7805.
    Since the output voltage is still 5v, use the same values.

    Note that they did not show the required 0.1uF cap on the output nor the required 0.33uF cap on the input of the 7805. If you omit them, you may have regulator stability problems. Caveat Emptor.
     
  19. tee2

    Thread Starter Active Member

    Nov 19, 2004
    46
    3
    I'm a dork for not seeing that. I think this has me so frustrated I'm not seeing right. :rolleyes:

    I did noticed that the caps where missing.
    Todd
     
  20. tee2

    Thread Starter Active Member

    Nov 19, 2004
    46
    3
    Okay I put this last circuit together and it will charge my IPod, and powers the GPS. :) I didn't have the caps and am going to order some this week.

    But, when I used a USB A to Mini USB cable (the one that came with my external hard-drive) it would not charge. I plugged it into my computer and it still didn't charge. I took an old phone charger and cut the mini USB plug off and checked the voltage and it is +5v. I put the mini USB plug on my USB A cord and connected it to the above circuit and my phone said it was charging it it would not charge. I plugged it into the computer and it did charge.

    The only thing that I can see is the AC phone charger puts out 550mA, the computer puts put 500mA, I also tried it on a cig to USB adapter that is 500mA and it worked. My 7805 is rated a 1.5Amp, could that be the problem? Is there an easy way to cut the current down to 500mA? I looked for a 7805 rated at 500mA but can't find one.
     
Loading...