Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Automotive Generator Universal Digital Voltage Regulator

Status
Not open for further replies.
Did I go overboard with protection diodes and filter caps?
No, you can always leave out anything you later decide is redundant; it's a lot easier than adding something in later on.

I'd have stayed with the single transistor cut-out; having two transistors is only needed for bidirectional control and you never want any current from battery to D+. Two transistors will double the power loss and heat to dissipate.

The mechanical regs do not have any other way of cutting the connection than by reverse current, it's a weakness not a requirement.
The cutout worked as a "latching relay", turning on when D+ reached a certain voltage and connecting it to the battery. Based on voltage alone, that would then have stayed connected until the battery went flat, so the cut-out part is a second current-operated coil around the cut-in relay that counters the field from the voltage coil when current flows from battery to D+, allowing the relay armature to release.

You could also keep the B+ sense circuit at the battery side of the power switch; as you have the 0.1uF cap on the divider, the resistors could be eg. ten times larger and still get a good reading, avoiding any voltage loss in the power switch.
 
No, you can always leave out anything you later decide is redundant; it's a lot easier than adding something in later on.

I'd have stayed with the single transistor cut-out; having two transistors is only needed for bidirectional control and you never want any current from battery to D+. Two transistors will double the power loss and heat to dissipate.
Thanks. OK, I went back to one transistor. I also made some other simplifications. herbie1200 suggested that I don't really need the whole ignition sense and idiot light control thing. The original warning light will still work the same as it always did if left connected to D+ as it is in the old regulator. And, the voltage regulator can go to sleep when D+ goes to 0 (for some time) and wake up on rising edge. (I just went to the garage and checked and D+ is at about 1v at low idle, so it's not 0 when the engine is running.) I can always add bells and whistles later.

I have just started playing around with PCB layout. The original enclosure is about 60 x 50 x 40 mm. Getting all this on a single 60 x 50 board looks tough! So, now I am suddenly enthusiastic about simplification. I think the prototype with through hole parts might have to go on a double-sized board. Later, I can switch as much as possible to surface mount, and maybe populate both sides? Or use long headers to stack a second board (like feathers and hats do)? Maybe a second board that is a metal plate that I can use for heat sinking the big components? Also, the MCU evaluation board takes up most of the space, although I guess all I really need is two 30-pin headers and I could place (short) things between those. But, just placing the components I need from that directly on my board should take up a lot less room. The MCU itself is tiny.
The mechanical regs do not have any other way of cutting the connection than by reverse current, it's a weakness not a requirement.
The cutout worked as a "latching relay", turning on when D+ reached a certain voltage and connecting it to the battery. Based on voltage alone, that would then have stayed connected until the battery went flat, so the cut-out part is a second current-operated coil around the cut-in relay that counters the field from the voltage coil when current flows from battery to D+, allowing the relay armature to release.
That's one area where I'm hoping to gain some efficiency. (Another big one being the regulator curve.)
You could also keep the B+ sense circuit at the battery side of the power switch; as you have the 0.1uF cap on the divider, the resistors could be eg. ten times larger and still get a good reading, avoiding any voltage loss in the power switch.
Sounds good. The 0.1uF value was kinda picked out of the air (and the resistor values certainly were). At one point I was considering using another analog input to measure that voltage loss, but then I decided to instead add a header pin for an external input that I can use for calibration. (E.g., voltage at the battery terminals?) I don't know how stable this will be with temperature. The MCU has an internal temperature sensor, which might be useful.

Anyway, here's the latest: https://oshwlab.com/carlk3/volt-reg-1-1_copy
Schematic_Volt Reg 1.2_2021-10-08.png
 
I'd never consider anything less than double sided PTH boards, especially as they cost peanuts from such as JLCPCB now. You get much better joints and higher reliability, as well as being easier to lay out and having the possibility of a ground plane.

You are using easyeda for the design so that can create the correct board files.
 
What am I going to need to heat sink?

Q3 (cut out) looks like one. From the AUIRF4905 data sheet, RDS(on) Static Drain-to-Source On-Resistance Max is 0.02 Ω at VGS = -10V, ID = -38A. So, if the generator is rated for 45A, I guess I'm looking at 40ish watts (worst case). What kind of heat sink do I need for that? Is it going to have to go outside the enclosure? The voltage regulator is mounted on the generator, which is mounted on the crankcase with a solid stand, so maybe my best bet is to try to thermally couple the TO-220 tab to the regulator mounting frame? The oil temp, which I guess could be a rough proxy for the crankcase temp, is normally below 125°C. If that won't work, there is very good air movement in the engine compartment (it's an air cooled engine and the cooling fan intake is at the end of the generator shaft).

For Q1 (regulator switch), from the IRL40B209 data sheet, RDS(on) Static Drain-to-Source On-Resistance Max is 0.00125 Ω at VGS = 4.5V, ID = 50A, and I think Danwvw estimates the field current at less than 10A, so, 12ish watts?

This is the enclosure I'm talking about:
1633797374567.png


I could copy Dan:
1633798199047.png

1633798297304.png
 
Last edited:
You need a better cutout FET, I think.. At 0.02 Ohms, 45A = 0.9V; a good high current schottky diode may have a lower voltage drop & power dissipation than that.
(Or a diode in parallel to handle high current peaks?)
 
I'd never consider anything less than double sided PTH boards, especially as they cost peanuts from such as JLCPCB now. You get much better joints and higher reliability, as well as being easier to lay out and having the possibility of a ground plane.
Can one do a sort of hybrid? If I get to the point of mounting the MCU directly on my board, it would be nice to have JCLJCB Assembly mount at least the STM32L412KBU for me. I don't think you can get that in a through hole package (except the evaluation board).

Also, seems to me like those little SMT resistors and capacitors wouldn't shake off too easily. Maybe at some point I should consider potting or conformal coating.
 
... a good high current schottky diode may have a lower voltage drop & power dissipation than that...
Well, that would be another nice simplification. [This is starting to look more like something I can actually build!]

Danwvw seems to have settled on STPS80115, but I can't find that anywhere. There is STPS61H100C which has a forward voltage drop of 0.63 at 30A. So, at 45A (probably never happen with my generator) that's roughly 30 watts.

Or, maybe a Kyocera KCQ60A03L at 0.50v for less than 25w.

EDIT: And now, I have seen that Dan moved on to the **broken link removed** which has some impressive specs.: Maximum Average Rectified Forward Current: 80A, Forward Voltage Drop @ 80A, Pulse, TJ = 25 C (appears to be worst case): 0.55V.
 
Last edited:
I took apart an old regulator today:
1634012201699.png

1634012253232.png

1634012283939.png

1634012341869.png

The "floor" of the inside of the regulator seems to be a 1mm think sheet of something like phenolic board. I think it is about the size and shape that my board will need to be. I don't need all of those cutouts and holes, but I probably still want four mounting holes and the hole in the middle is handy for attaching the top cover.

I stuck it on my scanner:
1634013022318.png

(That's a mm ruler at the top.) Anyone got any good tricks for turning that into a Board Outline in EasyEDA? I think I will need to get all the space I can; there's not a lot of area to work with:
1634013791049.png
 
Unpack the attached zip, there's a .dxf inside which ought to be close and should load into EasyEDA.

I've left all the holes in; presumably you can throw away the once you don't want once its loaded.
 

Attachments

  • regulator.zip
    14.3 KB · Views: 308
Unpack the attached zip, there's a .dxf inside which ought to be close and should load into EasyEDA.

I've left all the holes in; presumably you can throw away the once you don't want once its loaded.
Beautiful! Thanks! How'd you do that?
 
How'd you do that?
Pasted your image from above into my CAD program; scaled it carefully until the 3-11 cm marks on a ruler matched a 80mm line draw in the cad; then drew around it.
export as dxf. Its a process I do all the time, so it only took a couple of minutes.

It actually took far longer to find a way to post/attach it here. .dxf isn't accepted as a picture nor can it be attached directly.
 
Thinking about the power side of things some more...

The original regulator relied on those phenolic (?) sheets for insulation. Even where different circuits passed through the frame they just relied on getting the conducting rivet really centered. Given this:
1634144790067.png

1634148053485.png

could I replace that 1mm phenolic sheet with a PCB? Have a bottom layer (or two) with nothing on it as insulation? Put some copper pours under the bolt-on terminals and rely on those for thermal conduction away from the big, hot components (surface?) mounted on the PCB? How much thermal conduction would go through the PCB itself? What if I put some paste under it?

EDIT: Or, how about a copper pour on the bottom (in this view; top when mounted) of the PCB, some thermal vias, and a thermal pad between the board and the frame? The User Contributed Component 10MMPAD illustrates what I'm talking about.

[I made a bit of a mess taking apart the old regulator. I'll do better next time. But that thing was built to never, ever come apart!]
 
Last edited:
I've done a lot of breadboarding, which entailed getting to grips with a lot of the firmware (https://github.com/carlk3/Digital-Automotive-Generator-Voltage-Regulator), which took a long time because STM32 is new to me, and I'm slow. I checked out most of the subsystems fairly thoroughly, and I found several problems. I had to reassign several MCU pins due to various conflicts. I found that the ACS758KCB-150B-PFF-T Hall-Effect-Based Linear Current Sensor (my 4th choice, but all I can get) really wants 5v Vcc, not 3.3v, so I added another 5v LDO regulator that can be switched off (since the sensor draws 10 mA). I discovered that the 24¢ KIA78R33PI-U/P LDO that I was using has a fairly huge quiescent current (even when switched off), so I had to start over on the search for LDOs. Other than that, things seem to be working well, so I think I'm about ready to ship this off to JLCPCB and get a board made.

Latest designs:

Tuuz-nB-3F6Pm-lJ6pH1gr0ZKbzRXE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_oQ7mQvLBKw28m7bpQaBvxGRDM90vjZoZOrHPmZPlbLyhlI6olqTdYzJ9L2rG5mA41z3XZUCpd9faNxUTlZ1L6oMlKyk9CaNJVCl5KXd6tOJohnK0IDRkb1I15ZzgM0eXrFXAzyVzLrDf-0Dt7JJx09ZfrbNiR9aVlLenQN6OxsOCBu8miyBiHf92xtuGbW7dREzY2HEe3tvbuo3rhuBtNj3k8gzO9VvYfCCAroUINuNpHzJGQh6_WGQTGPIqztNjvW54zIKiF9k_ltU2CewbV1XIKmXLnm2lFg_Ybja_4pI8YJYBadbgx61AmmFtscvWBTxy1uSLh21qBc9dWMLREUD2-N_-ZQXBJpb01ntKXlF2g=w1264-h948-no

Schematic_Volt Reg Power Board 1.0_2021-11-13.png
Schematic_Volt Reg Logic Board_2021-11-13.png
Screenshot from 2021-11-13 22-59-33.png
Screenshot from 2021-11-13 22-59-01.png
 
Last edited:
After my last post, I decided to do another search for current sensors now that I've accepted adding another dedicated power supply. I found the Allegro ACS770LCB-100U-PFF-T for $9 at Arrow, and that looks like a much better fit. The ACS758KCB-150B-PFF-T does work OK on the bench, but I am using about 0 - 45 out of a range of -150 - +150 amps; not ideal. I ordered a couple of them to try out. This substitution won't affect the board at all.
 
I've been looking again at the possibility of using a FET for the Cut-out. There are some amazing devices out there. For example, the Texas Instruments CSD18536KCS MOSFET 60-V, N channel NexFET power MOSFET, single TO-220, 1.6 mOhm 3-TO-220 -55 to 175, or the onsemi NTMFS5C612NLT1G MOSFET NFET SO8FL 60V 219A 1.8MO. At 50 amps, 1.8 mOhms gives a power dissipation of 4.5w, right? That seems much more manageable than the 20w or so from the 0.4v drop of the 82CNQ030 Schottky diode. Four or five watts seems more like something I could put on a board inside the enclosure. And, with a Gate-Source Threshold Voltage: 1.4 V for the TI, or 1.2 V for the onsemi, that seems like something I could drive directly with a 3.3v GPIO from the MCU.
 
At 50 amps, 1.8 mOhms gives a power dissipation of 4.5w, right?
That is correct.

It is quite common to use MOSFETs in reverse as rectifiers. The body diode will block the battery voltage from feeding the dynamo when turned off. When the dynamo is generating, current will flow in the body diode, but that will result in 0.7 V drop. If the MOSFET is turned on in that condition, the MOSFET will conduct and the voltage drop will be reduced.

You should use a much larger Gate-Source Voltage than the threshold voltage. The threshold voltage is the voltage at which the MOSFET starts to turn on. To get the best resistance you need more voltage. The NTMFS5C612NL has a threshold voltage of 1.2 - 2 V, but that is at a drain current of 250 μA. To get the typical 1.2 mOhm you need 10 V on the gate.

If it's a negative-earth vehicle, when the dynamo is off, the MOSFET source will need to be a 0 V, so the gate will have to be at 0V as well. When the dynamo is generating, the drain and source will be about 7 V, and the gate will have to be at 17 V to get the best resistance. You don't really need any current at 17 V and you will have the big advantage of little heat being generated, but you certainly won't be able to use the 3.3 V output of the GPU to drive the gate.

There is an IC designed to drive an N-MOSFET in this way. It's an LM5050 (https://www.ti.com/lit/ds/symlink/lm5050-1-q1.pdf). One of those and an N-MOSFET would probably work as a cut-off with no further connection to the regulator part.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top