Good day folks. Some of you may know that a while back I was messing around with a little Arduino Mini and made up a little circuit to automatically roll my car windows up and down and all that jazz...not important right now. The project is built and runs as it should on a breadboard on the bench, so I thought before transferring it to a perfboard and shrinking it down, I should go over the power supply section and how I'm going to power this thing, since the electrical environment of a car is not the same thing as on the bench with a wall wart and there could be some problems down the line which I may have overlooked. I may have actually gone overboard with the power section and wanting to make it as bulletproof as possible, it probably had the opposite effect and I gravitated away from electronics industry standards and made it more complicated and inefficient if anything. This apparent complexity may not necessarily result in a better electrical environment for the micro itself...
There's a diagram attached and it's a bit of a mess, so please bare with us
1) it's powered all the time, so I'll wire it straight off the battery.
2) the top branch which goes through F1 is straight off the car's system - no regulation at all - so it can be anywhere between 11v and 14v (and probably more due to inductive spikes ! !). The reason for this is because those switches (S1-S4) are actually the rocker switches for the power windows and they're already wired in to the car, so I want to keep this as PnP as possible and not alter the existing harness, so rather than implementing my own step-down circuit here as well, I'm doing it this way: the voltage present at those switches goes through R1-R4 when the switch is pressed, to the 5.1v zeners Z1-Z4 (just noticed ZD would be the correct notation for those, but anyway) and to the anodes of optoisolators PC1-PC4 respectively. This pulls the collector low which in turns pulls pins A-D low and the micro know what button was pressed. There's two windows and 2 directions (UP/DOWN), so 4 sets of each. Hope this makes sense. I only drew 2 of the pins, and added "tags" for the other two. Also, the H-bridge which will be used to actually drive the motors is not pictured ! This setup is perfectly functional on the breadboard right now as it is.
3) to power the micro itself I send "V-BAT", let's call it, though a DC-DC step-down buck converter which drops it to around 6v and then did something which you probably shouldn't/don't need to do and send that through a resistor+zener combo AFTER the buck converter itself, the thinking behind this being that if the buck converter overshoots or shorts out for any reason, the linear zener regulator would still prevent V-BAT from shooting straight into the micro and killing it...THIS is probably the most "incorrect" part of this whole setup, despite being functional. It's worth mentioning that I'm powering the Arduino Mini straight via the VCC pin and not using the on-board regulator via the RAW pin. In fact, I removed the regulator from the board entirely. Maximum energy conservation is also important.
4) values for the components:
That's it for now Let me know what you think and what should be improved. Thanks.
There's a diagram attached and it's a bit of a mess, so please bare with us
1) it's powered all the time, so I'll wire it straight off the battery.
2) the top branch which goes through F1 is straight off the car's system - no regulation at all - so it can be anywhere between 11v and 14v (and probably more due to inductive spikes ! !). The reason for this is because those switches (S1-S4) are actually the rocker switches for the power windows and they're already wired in to the car, so I want to keep this as PnP as possible and not alter the existing harness, so rather than implementing my own step-down circuit here as well, I'm doing it this way: the voltage present at those switches goes through R1-R4 when the switch is pressed, to the 5.1v zeners Z1-Z4 (just noticed ZD would be the correct notation for those, but anyway) and to the anodes of optoisolators PC1-PC4 respectively. This pulls the collector low which in turns pulls pins A-D low and the micro know what button was pressed. There's two windows and 2 directions (UP/DOWN), so 4 sets of each. Hope this makes sense. I only drew 2 of the pins, and added "tags" for the other two. Also, the H-bridge which will be used to actually drive the motors is not pictured ! This setup is perfectly functional on the breadboard right now as it is.
3) to power the micro itself I send "V-BAT", let's call it, though a DC-DC step-down buck converter which drops it to around 6v and then did something which you probably shouldn't/don't need to do and send that through a resistor+zener combo AFTER the buck converter itself, the thinking behind this being that if the buck converter overshoots or shorts out for any reason, the linear zener regulator would still prevent V-BAT from shooting straight into the micro and killing it...THIS is probably the most "incorrect" part of this whole setup, despite being functional. It's worth mentioning that I'm powering the Arduino Mini straight via the VCC pin and not using the on-board regulator via the RAW pin. In fact, I removed the regulator from the board entirely. Maximum energy conservation is also important.
4) values for the components:
- C1-C4 are 100nF ceramic caps
- C5 is a 10uF tantalum
- R1-R4 are 1k
- R5-R8 are 10k pull-up resistors
- R9 is 82R
- D1 and D2 are UF5408 Schotkkys
That's it for now Let me know what you think and what should be improved. Thanks.
Comment