Beginner project with two power sources - Page 1
Forum section: electronics / beginners

author: andreimaxim
author_rank: Newbie
timestamp: April 06, 2018, 07:43:24 am
content: Hi folks,About a decade ago I graduated with a CS degree and a very sour taste for EE/EEV due to the teachers I had in college so now I'm trying to go back and re-learn all the stuff since it looks like having some electrical or electronics know-how would be quite useful in this day and age. I'm a software engineer and it feels quite nice to have build something physical from time to time :-)That being said, I've realized that I generally tend to learn things better if I have some project in mind so I came up with one and I'm hoping I could get some pointers on what to look into and what would be a rough idea of the design.I have two dogs and I put them in two crates in my car. In summer, it's rather hot but I can't leave my car trunk open due to obvious reasons so I placed four computer fans (one on each side of the crates) to vent the air. Based on a cheap Chinese thermometer, this lowered the temperature 5-10 degrees based on the amount of shadow. This was rather simple as the computer fans work at 12V 0.5A so all I had to do is wire them in parallel and end the connection with a 12V adapter and everything was fine. That is, if I left my keys in contact.So what I'm thinking right now is that I could connect a battery with a battery charger (maybe a VRLA 12V battery or a LiPo battery). Whenever there's power from the 12V socket the charger would charge the battery and also power the fans and whenever the car is stopped it the fans would switch to battery mode. Obviously, it's perfectly fine if the fans stop for a couple of seconds.So, in order to make this post look more like a set of legitimate questions instead of a homework assignment :-) I'm quite puzzled by a couple of things:My assumption is that the car circuit acts as an open switch when the car keys are not in contact, is that correct?If the above is correct, this means that the circuit needs to be designed in such a way that the charger is connected to the battery when the above "switch" is closed and removed from the battery when the "switch" is open. I'm having a lot of trouble figuring out how to do this or if there are any parts that could be used to achieve thisWould a specific type of battery be better suited for this kind of usage? I mean charge for 10 minutes, run for 10-15 minutes, charge again for 10-15 minutes, stand by for a day, charge again for 10 minutes and so on?I'm not afraid to solder or program Arduinos to make this happen, btw :-)Thanks a lot!

author: tpowell1830
author_rank: Frequent Contributor
timestamp: April 06, 2018, 09:17:20 am
content: A couple of diodes in an "OR" arrangement would do the job. If you want the external battery to get charged when the vehicle is keyed "ON", it gets a little more complex. A relay logic would work in order to charge. If you want microcontroler control, it gets a bit more complex, however, as a software person, this may be the solution that you would choose.|>| represents the diode.POWER A -------|>|------ TO FANSPOWER B -------|>|------ TO FANSThe negative side of both power sources are common.

author: andreimaxim
author_rank: Newbie
timestamp: April 06, 2018, 12:05:45 pm
content: Yes, ideally I would like for the battery to get charged while the vehicle is on, but I guess I need to properly understand how diodes work first and then look into relay logic.Thank you for the pointers!

author: tpowell1830
author_rank: Frequent Contributor
timestamp: April 06, 2018, 05:32:42 pm
content: Quote from: andreimaxim on April 06, 2018, 12:05:45 pmIf you are interested in re-learning electronics, "The Art of Electronics" is an excellent book, along with the accompanying lab book "Learning The Art of Electronics". This book pair is the most highly recommended for anyone learning electronics.A simplistic view of a diode is a device that allows current to flow in one direction. If one power source in a "diode OR" is 0.7 volts higher than another, that will be the dominant source and current will flow from that diode only. So, if your vehicle is in the "ON" position, it is very likely to be at a higher potential than the stand alone battery and the fans will run from the vehicle source. If the vehicle is "OFF", the external battery will be the dominant source, and the fans will be powered by the external battery.Hope this helps...

author: andreimaxim
author_rank: Newbie
timestamp: April 06, 2018, 06:08:30 pm
content: The Art of Electronics arrived earlier this week with the Student Manual, which seems to be for the 2nd edition of the AoE. Would it make sense to buy the newer edition, Learning the Art of Electronics?As for the diode explanation, thank you. I was thinking of both batteries as ideal 12V batteries and I couldn't really understand what was going on but you're right, the actual car battery voltage should be (hopefully) over 13V.

author: tpowell1830
author_rank: Frequent Contributor
timestamp: April 06, 2018, 06:25:00 pm
content: I am not familiar with the 2nd edition, I have the 3rd edition and I don't know if there are major differences.

author: kjr18
author_rank: Regular Contributor
timestamp: April 06, 2018, 06:35:05 pm
content: It can be done with a single DPDT relay. Just connect one common pin to fans, NC to battery, NO to socket, second common to battery and second NO to socket. And coil to ignition/socket. When you turn a key, it will switch from battery to socket easily, and charge at the same time.

author: andreimaxim
author_rank: Newbie
timestamp: April 06, 2018, 08:13:33 pm
content: Quote from: kjr18 on April 06, 2018, 06:35:05 pmWhoa, I guess it shows what a true beginner I am, I've never heard of relays! Thank you so much!

author: kjr18
author_rank: Regular Contributor
timestamp: April 07, 2018, 05:05:58 am
content: And I forgot about reverse biased diode on coil. Helps with reverse voltage spikes when coil is switching off.

author: andreimaxim
author_rank: Newbie
timestamp: April 07, 2018, 05:58:47 am
content: One of the things I was pondering about after reading your comment with the DPDT relay is about the way the aux battery might be charged. I was looking at the Yuasa NP7-12 battery for that role and I was thinking of driving my car for a couple of hours which might damage the battery (I think?) due to overcharging.Is there a kind of battery that could be safely connected to the 12v socket for longer periods of time? Surprisingly, I couldn't find a charger that works off the 12v socket, only from regular mains. Thanks!

author: Dynamiccables
author_rank: Newbie
timestamp: April 07, 2018, 09:21:12 am
content: Thanks For Sharing very Informative content.

author: kjr18
author_rank: Regular Contributor
timestamp: April 08, 2018, 11:15:39 am
content: I think it might be all right, given that for cycle use these batteries are charged up to 15V (at least it says that on mine). So it won't be overcharged, until something happens to your car charging circuit. You can also try using it in stand-by mode, connect SLA through some beefy Shottky diode directly to socket, without any relays, it will charge it during driving and power fans, diode will prevent backfeeding voltage into your car during cranking an engine, for example. For stand=by use charging voltage is about 13.5V to 13.8V, so about what you can expect in car.