|
|
07-10-2024, 19:11
|
#196
|
always in motion is the future
Join Date: Feb 2009
Location: in paradise
Boat: Sundeer 64
Posts: 19,776
|
Re: Open Source Arduino Alternator Regulator
112.36 kHz base signal with harmonics.
Like I wrote in an edit of my remarks above: you need to replace the battery with a programmable load or even just a power resistor to emulate the battery without the MOSFET’s present. Like how a dummy load is used for RF.
__________________
“It’s a trap!” - Admiral Ackbar.
|
|
|
07-10-2024, 19:19
|
#197
|
Registered User
Join Date: Aug 2020
Posts: 996
|
Re: Open Source Arduino Alternator Regulator
I am powering the input to the regulator from my 12V lithium bank, 300ah, about 15 feet away.
The output as far as the regulator is concerned is either the alternator field (shown here, engine running, real alternator) or a big resistor to simulate it. The result was the same for both "loads", so I figured the load was not related to the noise.
If by load you mean the alternator's load (batteries), I don't have anything else to simulate them. I could try a lead acid battery instead if you think it helps troubleshooting, but the noise is not present in the battery bank, just at the Regulator's power connector. I believe this power wire comes from the 12V distribution bar, which is a bit of a maze to get back to the battery bank.
__________________
Contribute to OpenSource Alternator regulator for LiFePO4 XEngineering . net
|
|
|
07-10-2024, 20:06
|
#198
|
Registered User
Join Date: Aug 2020
Posts: 996
|
Re: Open Source Arduino Alternator Regulator
On the CAN topic, does anyone have a simple example of reading data from N2K? This is of course the most popular library: https://github.com/ttlappalainen/NMEA2000
There are a few easy examples given for sending a PGN (temperature monitor, battery monitor, wind monitor) to the network, but any that involve receiving data also translate to other formats, write data to other ports, or other such complications.
I would like to start with a bare bones example- just read one PGN and write to the serial monitor.
Here's probably the closest start: https://github.com/ttlappalainen/NME...taDisplay2.ino
If anyone wants to take a crack at removing all the unnecessary code related to output, and/or commenting some more of it, that would be a great help. This is more advanced programming than anything I've dealt with so far, probably will take quite a while for me to get thru it.
My concerns are 1) proving the hardware works 2) seeing if reading a few PGN's is going to slow down the program significantly or not.
__________________
Contribute to OpenSource Alternator regulator for LiFePO4 XEngineering . net
|
|
|
07-10-2024, 21:10
|
#199
|
Registered User
Join Date: Aug 2020
Posts: 996
|
Re: Open Source Arduino Alternator Regulator
Upon closer inspection, maybe the example I linked to is as simple as just reading. I tried it out, and the code compiles and runs without problems, but not picking up any messages. The messages are present on the network and visible on the oscilloscope.
I'm suspicious about some lines that are commented out- do any of these look necessary?
Should NMEA2000.EnableForward(false); be true instead?
I will guess and check until I get it in the worst case.
__________________
Contribute to OpenSource Alternator regulator for LiFePO4 XEngineering . net
|
|
|
08-10-2024, 01:05
|
#200
|
Registered User
Join Date: Sep 2024
Location: Sibbo, Finland
Boat: FE-83
Posts: 22
|
Re: Open Source Arduino Alternator Regulator
Quote:
Originally Posted by CaptainRivet
It's time to replace that 35A baby alternator then with a bigger on the 80-100A range that fit and that's modified for external regulation and use this controller here to steer the alternator.
|
I will probably go with this regulator developed here, if it's available come spring. That puny engine won't cope well with a much larger alternator, not without some rampup mapping like Wakespeed or Zeus does.
Quote:
Originally Posted by CaptainRivet
Alternatively get a renogy DC2DC 20A and connect it and use till the little alternator dies. Then either get the same 35A or go to solution above.
An Orion XS is too expensive and too big for your install, that 35A can do 15-20A constant, the orion does 50A.
Everything else makes no sense.
|
The Orion XS _is_ expensive, but it's adjustable between 1-50A and it's capable of talking with my JK BMS via Cerbo. It's this adjustment I'd like to do automagically, depending of the charging source (more if more is available).
|
|
|
08-10-2024, 01:10
|
#201
|
Registered User
Join Date: Sep 2024
Location: Sibbo, Finland
Boat: FE-83
Posts: 22
|
Re: Open Source Arduino Alternator Regulator
Quote:
Originally Posted by markxengineerin
Have you been running this already? Depending on the settings chosen in the Sterling regulator, it might work (?) but I suspect you could also melt the alternator quickly or damage over time with the wrong settings. This is usually what happens when people change to Lithium without appropriately setting up the regulator.
|
No, I haven't. I'm in the installation and specifying phase. I'd love to get a Wakespeed or Zeus but the cost isn't justified by any means. I mean my EVE battery with BMS is under 400 €. Wakespeed ~1000 € and the Zeus isn't far behind. Orion XS ~300 € is a bit steep as well.
That small 35 A alternator has been tuned to deliver all it can get and copes fine with charging an almost empty 220 Ah AGM lead-acid battery. I guess it'll be fine with charging a LiFePO4 battery since it isn't producing more than ~500 watts the heat buildup can't be that great internally. A heat-adjusting regulator would of course be best.
Quote:
Originally Posted by markxengineerin
I'm not too familiar with the Orion XS or why you would want to manipulate it externally, but this regulator intended to be a direct replacement for your Sterling regulator, just with more features and adjustability, such as control based on temperature, RPM. Since it's based on a generic ESP32, you have a lot of flexibility to modify it to any unique use cases such as yours.
|
This sounds just wonderful. Can't wait to get going with this. I have played around with ESP8266 a little bit so I'm not at all worried about the feasability of this project.
The Orion XS is adjustable between 1-50 A and talks with a Cerbo GX. My JK BMS talks with the Cerbo. That's why it's interesting for me.
Are You selling boards already? Or did You contemplate going for that Finnish boat ESP-board? Did it have everything You needed?
|
|
|
08-10-2024, 06:37
|
#202
|
always in motion is the future
Join Date: Feb 2009
Location: in paradise
Boat: Sundeer 64
Posts: 19,776
|
Re: Open Source Arduino Alternator Regulator
Quote:
Originally Posted by markxengineerin
I am powering the input to the regulator from my 12V lithium bank, 300ah, about 15 feet away.
The output as far as the regulator is concerned is either the alternator field (shown here, engine running, real alternator) or a big resistor to simulate it. The result was the same for both "loads", so I figured the load was not related to the noise.
If by load you mean the alternator's load (batteries), I don't have anything else to simulate them. I could try a lead acid battery instead if you think it helps troubleshooting, but the noise is not present in the battery bank, just at the Regulator's power connector. I believe this power wire comes from the 12V distribution bar, which is a bit of a maze to get back to the battery bank.
|
Yes, as load for the regulator I mean the batteries. You need to eliminate possibilities. Yes, a lead acid battery would be a good option. I am too stuck in past lab experience where you grab the load bank… a battery is actually better.
If you don’t see the noise on the battery terminals with the BMS at the battery-side of the probes then that is a good indication that the BMS has nothing to do with it but I would prefer to eliminate it from the test setup.
__________________
“It’s a trap!” - Admiral Ackbar.
|
|
|
06-11-2024, 18:21
|
#203
|
Registered User
Join Date: Aug 2020
Posts: 996
|
Re: Open Source Arduino Alternator Regulator
NMEA2K CAN communication is working
Realtime clock is working
The ripple in the alternator field output is solved by changing capacitor strategy. Apparently one big capacitor is not the same as many little capacitors, even if they total the same value. Now the output is steady, no more waveform.
But, the regulator is still causing that unwanted noise spike every just under 10 microseconds on the input power supply (wires from battery)
The magnitude goes down when adding capacitance to the input, and with shorter power wires. It's still present with the lead acid battery providing power instead of lithium. It's still present when using a resistor as a load instead of the alternator field. The magnitude is negligible at lower field voltages, but is up to 1.5V (peak to peak) by the time 8V is commanded. Buck converter switching frequency seems to have no effect on it, although I can't be certain I have good control of the switching frequency. The datasheet is vague about something called "power save mode", where it uses its own logic to set switching frequency at light load, which is undefined. But the chip is good for 40 amps and I'm using ~4, so maybe that's light load and it's switching however it wants. I have contacted Vishay to ask.
The reference (example) boards for the Vishay buck converter chips have a ton of capacitance, for example 100 to 400 microfarads. My design used only 42. I have increased that to ~90 but ran out of capacitors. As I understand it, capacitance can cancel out inductance of long wires.
I'm not sure if adding capacitance is a band-aid, or a real solution, so I will keep the investigation going. This is the last problem, everything else is working perfectly. I know I owe Jedi some frequency spectrum plots, haven't done that yet, but now I feel like I have enough other issues resolved and repeatable results to the point where that will be useful. Will post soon.
__________________
Contribute to OpenSource Alternator regulator for LiFePO4 XEngineering . net
|
|
|
06-11-2024, 19:03
|
#204
|
Registered User
Join Date: Sep 2019
Location: Lifeaboard
Boat: FP Lavezzi 40
Posts: 4,009
|
Re: Open Source Arduino Alternator Regulator
Quote:
Originally Posted by markxengineerin
NMEA2K CAN communication is working
Realtime clock is working
The ripple in the alternator field output is solved by changing capacitor strategy. Apparently one big capacitor is not the same as many little capacitors, even if they total the same value. Now the output is steady, no more waveform.
But, the regulator is still causing that unwanted noise spike every just under 10 microseconds on the input power supply (wires from battery)
The magnitude goes down when adding capacitance to the input, and with shorter power wires. It's still present with the lead acid battery providing power instead of lithium. It's still present when using a resistor as a load instead of the alternator field. The magnitude is negligible at lower field voltages, but is up to 1.5V (peak to peak) by the time 8V is commanded. Buck converter switching frequency seems to have no effect on it, although I can't be certain I have good control of the switching frequency. The datasheet is vague about something called "power save mode", where it uses its own logic to set switching frequency at light load, which is undefined. But the chip is good for 40 amps and I'm using ~4, so maybe that's light load and it's switching however it wants. I have contacted Vishay to ask.
The reference (example) boards for the Vishay buck converter chips have a ton of capacitance, for example 100 to 400 microfarads. My design used only 42. I have increased that to ~90 but ran out of capacitors. As I understand it, capacitance can cancel out inductance of long wires.
I'm not sure if adding capacitance is a band-aid, or a real solution, so I will keep the investigation going. This is the last problem, everything else is working perfectly. I know I owe Jedi some frequency spectrum plots, haven't done that yet, but now I feel like I have enough other issues resolved and repeatable results to the point where that will be useful. Will post soon.
|
Just a big thank you for doing this project, long overdue to have a proper budget regulator.
Put me down for 2 of them if you are ready for field test.
Can it regulate 2 identical alternator on the same engine? Happy if it just uses the hotter of the two for regulating both. Have 2 Mitsubishi 115A per engine, one in original position (heat exchanger close and less ventilation) and running hotter then 2nd on top of engine.
|
|
|
06-11-2024, 19:20
|
#205
|
Registered User
Join Date: Jul 2016
Location: Europe
Boat: Scampi
Posts: 35
|
Re: Open Source Arduino Alternator Regulator
The datasheet, or maybe an application note, will tell you how to design the buck converter, including needed capacitance. It will also have a reference layout which you should copy. For a marine application, you will need to add an extra input filter to reduce noise (radio interference). Designing that is more complicated, but you could try an LC filter with similar values to your switching inductor and filter caps, as a start, and ferrite for higher frequencies.
|
|
|
07-11-2024, 07:14
|
#206
|
always in motion is the future
Join Date: Feb 2009
Location: in paradise
Boat: Sundeer 64
Posts: 19,776
|
Re: Open Source Arduino Alternator Regulator
It’s a shame that I never designed a switching power supply so I have no experience with this. So this is about 100kHz, right?
You also have to deal with harmonics. If you add a large capacitance then I always add a 100nF in parallel. For anything HF, I add filtering to the component’s power supply trace using an inductor (6-hole ferrite core “pig nose”) followed by a 10uF elco and 100nF ceramic capacitor. So this is on the power input of a chip/circuit, before even looking at its output.
__________________
“It’s a trap!” - Admiral Ackbar.
|
|
|
07-11-2024, 10:45
|
#207
|
Registered User
Join Date: Jul 2016
Location: Europe
Boat: Scampi
Posts: 35
|
Re: Open Source Arduino Alternator Regulator
Oh, if you are going for CISPR 25, you might also consider using a switcher at around 400kHz instead, because there is a gap in the emissions limits there. I have found a 100kHz buck with an LC filter still went over the average limit for conducted emissions at 100kHz for CISPR 25 class 5.
|
|
|
23-11-2024, 09:58
|
#208
|
Registered User
Join Date: Sep 2022
Posts: 27
|
Re: Open Source Arduino Alternator Regulator
Any progress made lately? I've got a custom liquid cooled alternator setup with external rectification that I'd like to find a control solution that's just as out of the box as the physical setup is. You're doing amazing work!
|
|
|
23-11-2024, 10:09
|
#209
|
Registered User
Join Date: Aug 2020
Posts: 996
|
Re: Open Source Arduino Alternator Regulator
Yes- the noise problems are solved with more capacitors (copying the reference design directly). I'm still learning about "why"... below is copy and paste from another forum in case anyone here would like to answer. Answers don't affect the result here, just for my own learning.
1) What is the function of these capacitors? I can tell from experimentation that the output caps affect the output ripple to some degree, but what about the input side?
2) What factors would affect their ideal values? is there a practical formula or simulation method for selection? The datasheets provide no useful information, leading me to believe that cap selection might be experimental in practice, or maybe it's best to just copy the reference board directly?
3) Is there such thing as too much capacitance, or is the only downside cost and board space?
4) Would a reference board commonly be designed with so many caps for some specific reason, maybe so that the user can remove them individually until a design becomes unstable? But if that were the case, I would expect a more linear progression of values rather than a bunch of duplicating tiny ones, and a single big one..
5) All of these individual caps were placed on the actual reference board I bought, except the largest one, the 470uF on the Output. Any logic behind that choice or is it just Vishay carelessness? The latter would not surprise me, the datasheets are full of typos ..
6) The output also has a capacitor (C10), a resistor (R8) which make up a "Snubber Circuit". Datasheet: "In some applications it may be needed for EMC reduction, and the combination of 4 ohms and 1nF is a reasonable starting point" However, what's actually on the reference board is 1000 ohms and 100nF. Any logic behind this deviation? Do they actually mean EMI, rather than EMC? How would I know if I need a snubber or not? When I think of EMI, I think of noise on analog signals, but I'm not sure if there's more to it, or if by "EMC", they're implying that the buck converter itself might need this for its own function, rather than protecting other components from noise.
7) How about Inductor L1? I have seen other buck converter reference boards (in my very, very limited experience) which had formulas for selecting L1, and came with several values to swap out and test. This particular buck converter doesn't mention anything about how to select the inductor, and comes with no additional components for testing . Does this imply that I should just copy their L1 choice into my design, no need for further thought?
__________________
Contribute to OpenSource Alternator regulator for LiFePO4 XEngineering . net
|
|
|
23-11-2024, 10:14
|
#210
|
Registered User
Join Date: Aug 2020
Posts: 996
|
Re: Open Source Arduino Alternator Regulator
Here is what the wifi interface looks like, this is what I'm working on today:
It needs a bunch more "Setting" fields added (on/off, ForceFloat, Hi/Low, LimpHome, RPM table, etc) and then to be made more beautiful. There's no reason the interface couldn't have nice graphs (like the latest Victron apps) to show any parameters changing with time, and the same functionality as a battery monitor, NMEA2K network monitor, etc.
The (hopefully final) board revision is in process, I hope to be ordering them by the end of the week. Once those are checked, next order will be for "production". So early 2025 is realistic.
__________________
Contribute to OpenSource Alternator regulator for LiFePO4 XEngineering . net
|
|
|
|
|
Thread Tools |
Search this Thread |
|
|
Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
Advertise Here
Recent Discussions |
|
|
|
|
|
|
|
|
|
|
|
|
Vendor Spotlight |
|
|
|
|
|