Running a microcontroller in car - power supply aspects

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • Dannyx
    replied
    Re: Running a microcontroller in car - power supply aspects

    Originally posted by redwire
    The diode under the Arduino, if it's 5.1V zener maybe or the tantalum is leaky?
    The diode is indeed 5.1v, though the voltage across it (the VCC of the Arduino) is 5v exactly and I heard zeners actually take a bit more than their nominal value to break down and start conducting. I could try pulling it off to see if it makes a difference, though it's soldered in really well...it will be a nightmare to do. Same goes for all the other non-socketed parts thanks to my "patented" method of bending the leads to form tracks - it's one of the huge downfalls of this idea >_>

    Originally posted by redwire
    The big 680uF cap would have mA leakage if it's a CapXon lol.
    It's a 1000uF Samwha WL series, now that you mention it...not sure what to say about it. I read it's slightly "over" the RD series, but inferior to the WF series, if this is at all correct or relevant...

    Leave a comment:


  • redwire
    replied
    Re: Running a microcontroller in car - power supply aspects

    It just seems weird, I would go after it because it's high.
    You can try pull IC's out of their sockets and see if that narrows it down? But remember the cap has a charge before putting the IC back in. The diode under the Arduino, if it's 5.1V zener maybe or the tantalum is leaky?
    The big 680uF cap would have mA leakage if it's a CapXon lol.

    Leave a comment:


  • Dannyx
    replied
    Re: Running a microcontroller in car - power supply aspects

    Originally posted by redwire
    With no MCU, 4mA drain seems a bit odd? LP2951 uses 0.1mA and I did not see anything else in your circuit using current.
    Caps perhaps ? Maybe some leakage on those diodes and optocouplers ? It'd sure be great if I could trim down the power draw even more...

    Leave a comment:


  • redwire
    replied
    Re: Running a microcontroller in car - power supply aspects

    With no MCU, 4mA drain seems a bit odd? LP2951 uses 0.1mA and I did not see anything else in your circuit using current.

    Leave a comment:


  • Dannyx
    replied
    Re: Running a microcontroller in car - power supply aspects

    Progress

    It works and draws 4mA without the Arduino plugged into the headers and without the current sensors (wanted to make sure it actually generates 5v there before I plug anything in...come to think of it, I should probably make the current sensors removable too...

    Back to the bench now
    Attached Files

    Leave a comment:


  • Curious.George
    replied
    Re: Running a microcontroller in car - power supply aspects

    Originally posted by stj
    lol
    i'v seen an arduino power-up and run through it's own pullup resistors/protection diodes.
    Yes, but very low power devices are now commonplace. In the 70's, they weren't. You burned power to do damn near anything! A dinky little 1702 (256x8 EPROM) consumed 300mW! The idea that a "signal" could power a circuit was (obviously) anathema to us.

    Leave a comment:


  • Dannyx
    replied
    Re: Running a microcontroller in car - power supply aspects

    The power LED glows faintly on the Mini even with no power connected to the VCC pin, if a CH341 programmer is attached and plugged into an USB port. I ran into this issue a couple of times when I was playing around with this project and thought it died because the code would not upload, but then noticed the 5v power brick was not connected to my breadboard

    Leave a comment:


  • stj
    replied
    Re: Running a microcontroller in car - power supply aspects

    lol
    i'v seen an arduino power-up and run through it's own pullup resistors/protection diodes.

    Leave a comment:


  • Curious.George
    replied
    Re: Running a microcontroller in car - power supply aspects

    Originally posted by Dannyx
    Trial and error will also play a part in this too, of course.
    By actually (attempting to) building it, you will "discover" issues that you hadn't imagined.

    One of my first products was a remote display for use on boats ("Where are we, presently?"). I was extremely cautious to not expose myself to ridicule by screwing up such a "simple" design. Boss encouraged me to just release it to manufacturing -- instead of prototyping it (it was REALLY a trivial design).

    When I tested the first unit off the line, the power switch didn't work -- the display was always ON! Unlikely that the switch was broken (but, I checked that). Did I make a mistake in the PCB layout and effectively short the switch ON? No.

    It turns out, the design used so little power that the data line terminations could power the electronics even when the "main" power had been interrupted. When we discussed the problem in the department, everyone was stunned at the "diagnosis" -- no one would have considered that as an issue in the design because we were all used to circuits requiring considerably more power to operate!

    Leave a comment:


  • Dannyx
    replied
    Re: Running a microcontroller in car - power supply aspects

    Just had a go with the LP2951 on a breadboard to see how it works and indeed it does. I built the simplest circuit possible based on the block diagram on page 2. At first I didn't realize just how important that 1uF cap on the output is. I didn't install it at first and got a wild 10v output, which made me think I broke it right away I then double checked everything and eventually added that cap, which instantly brought my output to the desired 5v ! This also got me thinking about that cap which will be cooking in the car and since it's so important, my output could go nuts if it fails....Still, it works for now.

    Also updated schematic.
    Attached Files
    Last edited by Dannyx; 05-06-2020, 06:40 AM.

    Leave a comment:


  • Dannyx
    replied
    Re: Running a microcontroller in car - power supply aspects

    *apply ice to burned area* >_> I know it's been years since I started discussing this, but time was scarce and I'm in no hurry It's only because I've been on this forced leave that I got around to actually doing it, since it would've still been in breadboard stage otherwise - no energy to do anything at work. It also gives me time to gather as much info as possible so I can solder ONCE and use many, instead of the other way around hopefully Trial and error will also play a part in this too, of course.

    Leave a comment:


  • Curious.George
    replied
    Re: Running a microcontroller in car - power supply aspects

    Originally posted by stj
    windows will be replaced by force-fields before you complete this - just build the prototype and test it!
    +1

    There's a saying: "time to shoot the engineer" (and get on with building the damn thing!)

    Leave a comment:


  • stj
    replied
    Re: Running a microcontroller in car - power supply aspects

    windows will be replaced by force-fields before you complete this - just build the prototype and test it!

    Leave a comment:


  • Dannyx
    replied
    Re: Running a microcontroller in car - power supply aspects

    Originally posted by redwire
    The inductor+diode is not essential, it is OK in some circuits but you need a scope to really see how HF noisy the car is. I would delete it to keep it simple (sorry), and just use 1N4007 and TVS and a polyfuse are going to work, even if you boost the car or pop the clutch with a low battery
    Forgot to buy some poly-fuses today too LOL I'll probably end up dropping the coil+diode, since it's too complex a thing to know if it truly helps or just takes up board space....

    Originally posted by redwire
    The TVS clamps to 27.7V with a 22A peak pulse current, so I make sure this is below the Vreg's maximum OR there is some line resistance or polyfuse resistance to lower the spike current. Even 1 ohm helps a lot but this usually burns instead of the fuse, so I get it from a polyfuse. Lowest I go in a 12V car that goes through cold winter is P6KE18A.
    Seems the two types I got both ride the line either up or down. The 18A could break down too easily and "false-trigger", while the 22A clamps a bit over the 30v limit of the LP2951, though I think I'll go with this one in the end. Tolerances are to be expected here too, as you pointed out....only one way to find out and that is to stress-test and see if something goes pop

    Speaking of polyfuses. Had a look here and the trip time seems awfully high at 3-4s...unless I'm missing something and that's actually OK....

    Originally posted by redwire
    I wonder if any car phone chargers do any better, if you have some to measure
    Yes, I actually have one on hand - came free with something else I keep it in the glove box for emergency use. Never actually used it, since not only I'm not too confident in entrusting my S10+ to that thing, plus I only drive for like 10 minutes at most until I arrive at my destination and never go for long drives. The ol' junker's 13 years old now and she's only got 60k-ish KMs on the clock. She ain't no head-turner, but sure looks brand new. I still amaze people when I tell them she's soon turning 14

    Originally posted by redwire
    It might be better to use a lower current module, as switching 3A mosfets is not efficient for say 10mA load
    That's why I got that LP2951 you suggested, though I still worry about the current draw of the current sensors. I'll probably be able to shave off a few mA by removing their LEDs too.

    Originally posted by redwire
    You can power the hall current sensors only when the motor is being run.
    I'll do that, since according to the datasheet the "set-up" time is only a few uSeconds, so it shouldn't "miss" any events even if had just freshly "woken up". I'll power them from the same pin as the transistors for the relay, OR add another pin in code that comes on whenever the windows do stuff either up/down. I'd show you the code, but it's such a sh!t-fest in there that I'd be the laughing stock of the entire community
    Last edited by Dannyx; 05-04-2020, 04:17 PM.

    Leave a comment:


  • redwire
    replied
    Re: Running a microcontroller in car - power supply aspects

    The inductor+diode is not essential, it is OK in some circuits but you need a scope to really see how HF noisy the car is. I would delete it to keep it simple (sorry), and just use 1N4007 and TVS and a polyfuse are going to work, even if you boost the car or pop the clutch with a low battery. I know this as fact because I had jr. engineers do a 24V truck 5V power supply that died on every truck, customers were really pissed. Jr. engineer used an 0805 MOV for "automotive use" and thought he was covered lol. It was a recall and warranty claims. I added a 1.5KE33 to fix that.

    The TVS has a breakdown voltage spec. given by when it just starts to conduct, say at 1mA.
    For Littelfuse P6KE20A this is 19-21V at room temp. and at -40C 18-20V. Note ST, Vishay, Diodes inc parts can have slightly different specs. Non "A" part is looser +/-10% tolerance and 5% higher clamp V.
    The TVS clamps to 27.7V with a 22A peak pulse current, so I make sure this is below the Vreg's maximum OR there is some line resistance or polyfuse resistance to lower the spike current. Even 1 ohm helps a lot but this usually burns instead of the fuse, so I get it from a polyfuse. Lowest I go in a 12V car that goes through cold winter is P6KE18A.

    It's too bad these chinese 5V buck converter modules seem to all be crappy for quiescent current drain. I wonder if any car phone chargers do any better, if you have some to measure. It might be better to use a lower current module, as switching 3A mosfets is not efficient for say 10mA load. You can power the hall current sensors only when the motor is being run.

    Leave a comment:


  • Dannyx
    replied
    Re: Running a microcontroller in car - power supply aspects

    The good news is that I managed to score that LP regulator IC and the TVS diodes locally for cheap Just got back with them now....the only downside is that the chap had anything BUT the 1.5KE20 type, so I got the next value up and down - the 18 and the 22
    Attached Files

    Leave a comment:


  • Th3_uN1Qu3
    replied
    Re: Running a microcontroller in car - power supply aspects

    You do not need a pull-down resistor on the base in this application because you are switching at a low frequency, basic on-off controls. 1k resistors in series with the base will give ~4mA base current, which, multiplied by the gain of any bog standard NPN, is more than enough to drive a relay coil. There is absolutely no need for a Darlington type in this application.

    Transistors can be anything as long as the collector current rating is adequate. The typical resistance of a relay coil is 300-400 ohms which gives a maximum current of ~50mA. As you can see, pretty much any common transistor will work. 2N3904 will be more than enough.
    Last edited by Th3_uN1Qu3; 05-04-2020, 05:55 AM.

    Leave a comment:


  • Dannyx
    replied
    Re: Running a microcontroller in car - power supply aspects

    I'll be using relays for the sake of convenience and because they take up ever so slightly less space and they're cheaper. With an H-bridge I would've had to mess around with duty cycles and....naah

    I went with 30A relays which is double than the maximum 15A current I measured on one window with my clamp meter (which it reaches only when stalled up or down and is around 7-8A when running freely), but I couldn't find any with 5v coils that would fit a perfboard (leads were too fat), so I had to settle for some 12v ones and use some transistors to interface them with my Mini...or a relay driver, but I'm trying to build this with junk parts I have readily available (still pisses me off to no end that our shop has all sorts of junk lying around, but I don't have access to...).

    The majority of schematics I've seen use a 1k resistor between the base and the Arduino pin and no pull-down resistor, but I'm not sure what the transistor itself should be and whether I should add a 10k pull-down just to be sure the transistor is turned fully off. A darlington would be a good idea, since the higher hFe allows me to push more collector current with minimal base current.

    TVS diode and capacitors added to motors as per Redwire's suggestion in post #71. Not sure what that TVS should be and what sort of EMI can be expected there. The case of the motor is not grounded AFAIK, since it's on a plastic mount inside the door which doesn't have a GND connector to begin with, other than the hinges.
    Attached Files

    Leave a comment:


  • Dannyx
    replied
    Re: Running a microcontroller in car - power supply aspects

    Originally posted by sam_sam_sam
    To me it looks pretty good you have all the inputs to the micro controller isolate from the harsh electoral environment

    The only thing you are not showing the outputs to your motors
    True. I'll add the relays as well so we can hopefully work on the EMI suppression there too.

    Leave a comment:


  • sam_sam_sam
    replied
    Re: Running a microcontroller in car - power supply aspects

    To me it looks pretty good you have all the inputs to the micro controller isolate from the harsh electrical environment

    The only thing you are not showing the outputs to your motors now if you are use H bridge controllers you more or less have do the same thing to isolate them from the harsh electrical environment with optic sensors

    Or

    If you are using relays you still need to do the same thing
    Last edited by sam_sam_sam; 05-02-2020, 12:46 PM.

    Leave a comment:

Related Topics

Collapse

  • CG2
    Meaco Arete One / Deye Dehumidifier not working
    by CG2
    I've got a dehumidifier that has stopped working. Plug it in, press the power switch, and it beeps 5 times. Nothing showing in the display (which is just two 7 segment displays) apart from the two decimal points flashing. The model is a MeacoDry Arete One 18L, which seems to be a rebadged Deye (all the boards are marked Deye). Here's what I've got so far (details in case anyone else in future should need them).

    Starting with the power board. Mains power comes in at the red connector top left. The compressor is powered by the orange connector to the right of that and is switched by...
    08-17-2024, 07:47 AM
  • Kambi13
    Samsung NP370E4K No backlight running on battery
    by Kambi13
    Hi all, need some help. I have a Samsung NP370E4K-KD2BR, which as a 5th Gen Intel CPU that works fine when running with the charger plugged in, but has soon as I remove it and it's running on battery the screen backlight goes off.

    Tried different battery - no change
    Tried different screen - no change

    Removed the plastic film from the screen inverter and looked for pwm signal which as about 3.3v when running with the charger plugged in, when I take it off the voltage drops down to 2.232v, so my best guess is that the EC is not providing the correct voltage....
    09-04-2023, 11:06 AM
  • Dannyx
    "Kinetic" 433Mhz transmitter/receiver discussion
    by Dannyx
    Good day folks.

    TL;DR: has anyone tried pairing one of THESE "kinetic" battery-less switches with THESE generic remote modules ?

    Details: I recently got hit by this craze of wanting to add remote controls to the lights around my house, so I went with those generic 433Mhz remote relay modules found everywhere, which are really basic, easy to use and work well, since I used them before in other projects. What I like most about them is they accept all kinds of 433Mhz remotes that float around Aliexpress, since they're all the same under the hood, save for the...
    03-08-2022, 11:01 AM
  • Skgod
    Asus Rog strix g15 g513ih hn0865 and it's having display issues while running on igpu
    by Skgod
    Hey I am having Asus Rog strix g15 g513ih hn0865 and it's having display issues while running on igpu. Works fine when I open any game or whatsapp windows application. The issues are :
    Black screen, freeze
    The weird thing is that when as long as the laptop is running on igpu the problem keeps happening. But as soon as I open any game or whatsapp windows application, the laptop works completely fine.
    When the screen freeze or black screen I used to move the display lid up and down and it usually works like that.
    So can anyone tell me what would be the possible cause?...
    10-16-2024, 08:11 PM
  • FALKLAN
    Running Line Voltage and Integrating LED Pods - Automotive
    by FALKLAN
    Howdy everyone! I hope all is well where ever you are!

    I'm attempting to integrate a couple of LED pods into an automotive reverse lamp circuit. The problem being, while the vehicle is running there is a 8.5v current present on the reverse lamp power wire. Needless to say is that all LED pods and lights dimly illuminate while the 8.5v is present, so the LEDs are always powered on while the vehicle is running. When the vehicle is shifted into reverse, the voltage changes to 12 volts.

    I am uncertain how to convert this line into a switched 12v output line for the LED pods....
    02-05-2025, 12:30 AM
  • Loading...
  • No more items.
Working...