|
|
23-11-2024, 10:26
|
#211
|
Registered User
Join Date: Sep 2022
Posts: 27
|
Re: Open Source Arduino Alternator Regulator
Glad to hear you're still moving forward with this project! I'll be keeping my eye open for when you move into a production/testing phase to hopefully try it out!
Quote:
Originally Posted by markxengineerin
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.
|
|
|
|
24-11-2024, 04:00
|
#212
|
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
Much of designing is done by experimenting. For RF circuits, which was my forte, you can build a circuit twice using different pcb designs and one would work perfectly while the other not at all even when all connections were identical.
Famous is the decoupling capacitors of computer memory chips. I ended up soldering straight to the no. 1 and 14/16 pins of memory chips for the shortest possible path and this completely eliminating memory errors that this Taiwanese board had.
I also found that the cheap ceramic disc (through-hole) capacitors worked better than anything else.
With SMD designs I see much more capacitors in parallel. I have no explanation as I predate the SMD era
__________________
“It’s a trap!” - Admiral Ackbar.
|
|
|
24-11-2024, 10:59
|
#213
|
Registered User
Join Date: Apr 2013
Location: The Keys, FL
Boat: Beneteau 411
Posts: 61
|
Re: Open Source Arduino Alternator Regulator
I wasn't a power supply engineer, but like Jedi, I had a past life as an RF engineer, as well as a manager of other engineers, including power supply stuff. I'll attempt to answer with my limited power supply / capacitor knowledge.
Quote:
Originally Posted by markxengineerin
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?
|
In general, capacitors have two major functions (one could argue it's the same function): to supply energy ("bulk caps") and to filter. Larger caps are typically used to supply power locally during bursts of usage (like when the switching power supply switches on/off) and prevent the circuit from starving from those energy bursts due to impedance/resistance in the rest of the circuit.
Here's an analogy: Ideally, you have a battery located near your windlass or bow thruster, and likely your alternator is far away. That battery is like a capacitor, storing energy, and providing it locally to the windlass/thruster, and the alternator is supplying energy to that battery. You can locate the battery next to the alternator, and have long wires to your windlass/thruster, and it will work, just not as well. You'll need much heavier cables, your windlass will still strain from the voltage drop, etc.
The smaller capacitors are used for filtering, higher frequency noises or spikes. This filtering can either be by sending that energy to ground (to get rid of it), or providing a specialized/tailored energy source for the circuit that the big caps can't do. See next section for more on this.
Quote:
Originally Posted by markxengineerin
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?
|
Just like above, there may be two (or more) reasons for selections. How much energy storage is needed, or how it performs at certain frequencies (filtering). (Again, some may argue it's the same function, in some cases.) To complicate things further, different types of capacitors (ceramic, tantalum, electrolytic, etc.) have different "ESR", or Equivalent Series Resistance. Analogy: 4/0 vs 2 AWG vs 14 AWG connected to your battery. This ESR can impact its performance, depending upon your application. Analogy: Your constant-on anchor light, or your radar or sonar that has large energy pulses often. Much like a switching power supply. If the ESR is too high in a switching application, the capacitors are much less effective, can actually heat up, and die an early death (a few years instead of many years).
Another complicating factor is when you use these caps as a filter, that the same value cap in the same type (ceramic, for example) will act differently based on the size of the cap. Meaning a large through-hole part vs. a 'normal' sized surface mount part (ie. 1206) vs. a tiny surface mount part (ie. 0201).
Let's simplify this to: In many cases you can pick bulk(storage) caps based on the application knowing overall voltage type applied (pure-DC, full-wave rectified, etc), current and current spikes. You can in general sprinkle some 0.1uF and 0.01uF and 0.001uF caps around for high frequency filtering, but they may work or may not work, depending on placement and what frequencies you are trying to filter.
Quote:
Originally Posted by markxengineerin
3) Is there such thing as too much capacitance, or is the only downside cost and board space?
|
In general, no. But no matter how much capacitance you may use, it may be of the wrong type and not help at all (or fix what's broken). It may be bad ESR or filter the wrong frequencies.
Quote:
Originally Posted by markxengineerin
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..
|
I can think of two reasons: sometimes a bunch of smaller caps are cheaper than one big cap (only sometimes), but more likely, when you parallel caps, you lower the effective ESR. Analogy: paralleling wires from your battery to effectively make a larger wire. Another analogy: Among the biggest drop in lithiums, let's pick the Epoch 460Ah 12V drop in. It has a 300A BMS. But I installed another brand 230Ah that has 200A BMSs and used two of them. I now effectively have a 460Ah with 400A capability. Oh, and my pair cost way less than Epoch (but maybe not same quality or features, granted.)
Quote:
Originally Posted by markxengineerin
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 ..
|
See above
Quote:
Originally Posted by markxengineerin
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.
|
EMC is ElectroMagnetic Compatibility. Switching power supplies are notoriously bad creators of RF noise, making them fail compliance, causing interference to other nearby devices. Analogy: There was a LED anchor (or tricolor?) light that had an internal switching power supply. It generated RF noise, and when placed near your masthead VHF antenna, it made your VHF receiver nearly useless.
This snubber is likely meant to be tuned to the frequency of the switcher (or harmonic) via the capacitor, and the resistor dissipates the bad energy.
Quote:
Originally Posted by markxengineerin
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?
|
Short answer is yes, probably copy, unless your usage is highly different than the reference design application. The inductor choice is based on current loading of the output (among other things like switching frequency and input voltage).
There you go, 35+ years of Electrical Engineering in a somewhat short reply!
|
|
|
24-11-2024, 12:07
|
#214
|
Registered User
Join Date: Sep 2023
Location: Cruising
Posts: 487
|
Re: Open Source Arduino Alternator Regulator
Quote:
Originally Posted by markxengineerin
I'm not sure if adding capacitance is a band-aid, or a real solution, so I will keep the investigation going.
|
Asking an AI like perplexity is years ahead of asking a web chatroom for education imho, anything that doesn't make sense ask it to explain, all the links where the info came from are there to look at as well. Pity the links don't copy. >
https://www.perplexity.ai/
explain in detail why capacitors are fitted on the input and output of dc circuits and what each choice of capacitor does.
Answer
Capacitors play a crucial role in DC circuits, particularly in power supply applications, where they are typically placed at both the input and output stages. Their functions can be categorized into several key areas, each addressing specific circuit requirements.
Input Capacitors
1. Stabilizing Input Voltage:
Input capacitors are essential for stabilizing the input voltage to a power supply circuit. When a power supply IC switches on and off, it generates ripple currents due to the rapid charging and discharging cycles. The input capacitor helps to absorb these ripple currents, thereby smoothing out fluctuations in the input voltage and preventing noise from affecting the operation of the circuit24.
2. Filtering High-Frequency Noise:
These capacitors also serve to filter out high-frequency noise that may be present on the input line. This noise can originate from various sources, including other electronic devices or switching activities within the circuit itself. By placing an input capacitor close to the power supply IC, it effectively reduces this noise, ensuring that only a clean DC signal is fed into the circuit57.
3. Supporting Transient Currents:
During sudden changes in load (transient events), the input capacitor provides immediate current to the circuit until the power supply can respond to these changes. This is particularly important in applications where load conditions can change rapidly3. The capacitor acts as a buffer, supplying the necessary current without allowing significant voltage drops that could disrupt circuit performance.
Output Capacitors
1. Smoothing Output Voltage:
Output capacitors are primarily used to smooth the output voltage of a power supply. They work in conjunction with inductors to form an LC filter that reduces output voltage ripple, ensuring a stable and consistent voltage is delivered to the load23. This is crucial for sensitive electronic components that require stable voltages for proper operation.
2. Enhancing Transient Response:
Similar to input capacitors, output capacitors respond to transient load changes. When there is a sudden increase in load current demand, the output capacitor can quickly discharge its stored energy to maintain output voltage levels until the regulator can adjust its output accordingly34. This capability helps prevent voltage dips that could affect performance.
3. Reducing Output Ripple Noise:
The output capacitor also plays a vital role in reducing ripple noise emitted from the output line. By smoothing out variations caused by switching action within the power supply IC, it ensures that the output remains within acceptable limits for connected devices27.
Capacitor Selection Considerations
When selecting capacitors for both input and output applications, several factors should be considered:
Capacitance Value: Higher capacitance values generally provide better smoothing effects but may introduce longer charge and discharge times.
Equivalent Series Resistance (ESR): Low ESR is desirable as it minimizes voltage drops during high-frequency operations and improves transient response.
Type of Capacitor: Different types of capacitors (ceramic, electrolytic) have varying characteristics. For example, ceramic capacitors are often preferred for high-frequency applications due to their lower ESL (Equivalent Series Inductance) compared to electrolytic capacitors56.
In summary, capacitors at both the input and output of DC circuits serve critical roles in stabilizing voltages, filtering noise, and responding to transient conditions. Their proper selection and placement are essential for optimizing circuit performance and reliability.
|
|
|
29-11-2024, 05:00
|
#216
|
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
Why is it that people want a slow response? I want to make sure I understand the reasons so I can try to code it correctly. Right now with a slightly different but almost the same chip (I don't have the final choice on hand yet), I can switch the regulator off->on and hit the target field voltage in less than 5ms. This is obviously way faster than necessary, but better than being too slow..
I imagine too fast a ramp up could cause a belt to slip, or an engine to stumble.
But ramping down, let's say when an induction stove top is turned off, I think that should be as quick as possible? Not ramping down quickly enough could, in the worst case, trip a BMS to shut down without adequate warning, if the battery bank was small, and "damping" too great. I don't think this is likely with lithium and reasonable settings, just trying to understand worst case scenarios.
If damping was only applied to "ramping up", the worst scenario for ramping down too fast seems to be that the engine speeds up abruptly, which isn't really a bad thing. If you're in gear, it's damped by the drivetrain, and if you're in neutral, I suppose the rev limiter is the worst case scenario.
To be more complicated but best of all worlds, I suppose a slow "ramp down" could be used until a voltage threshold is met, and above that, no damping?
|
The documentation for Victron's smart charger says that a fast rampup can cause gassing in lead-acid batteries. Probably not an issue with LiFePO₄.
|
|
|
30-11-2024, 18:07
|
#217
|
Registered User
Join Date: Aug 2020
Posts: 996
|
Re: Open Source Arduino Alternator Regulator
Thanks for the additional info.
For capacitors, inductors, and switching frequencies, here is what I'm going with:
It's way overkill on capacitors. I will "Do Not Place" a bunch of them in production depending on what works in the next series of tests. Better safe than sorry with this iteration, as I spent countless hours debugging what in the end seems like was just "insufficient capacitance" on this prototype. Lesson learned, much better to guess high and remove than guess low and wonder what's wrong.
Inductors and switching frequency: going large for the former and (relatively) small for the latter. In my testing so far, there was a noticeable drop in efficiency at higher switching frequencies.
*Note, this was done with the SIC450 reference board, with a tiny inductor (0.22uH) and tons of capacitance, other results may vary
Bad efficiency is a problem when the battery gets really low, say 9V, when you might struggle to produce as high a field current as desired for fast re-charging. It's inconvenient when charging is limited by "ability to make a field" rather than the usual limits (alternator temperature, battery safety, etc). I wonder if other regulators out there have a boost function as well as buck? It's not going to happen here, it would add too much complexity and cost, parts are not readily available, and it would kill the wide range of applications that can be served with just 1 part number.
One thing I am considering is to add a "bypass mode" where the battery could be connected directly to the field output, to best cover the "battery severely discharged" cases. Any feedback on that? I think it would be simple, but not sure if the benefit (slightly faster charging of a fully depleted bank, at idle) is worth the extra components.
Re Birds are Nice regulator, I saw that at one point in my research. The design seems outdated/basic, would not work for Lithium batteries or have any of the adjustability I'm hoping for here, but cool project too!
__________________
Contribute to OpenSource Alternator regulator for LiFePO4 XEngineering . net
|
|
|
30-11-2024, 18:24
|
#218
|
Registered User
Join Date: Aug 2020
Posts: 996
|
Re: Open Source Arduino Alternator Regulator
If anyone wants to help, I could use some on the user interface. Here it is now, just numbers moving every 1 second:
Code here:
https://github.com/markliquid1/AltRe...Nov28_2024.ino
Upgrade requests:
-Replace some of the "0 or 1" input boxes with toggle switches (they must remain linked to the physical GPIO switches and ESP32 flash memory as they are now)
-Add time plots for all the sensor data. Internet recommendation I read is to use JavaScript "NVD3 or C3.js. "Basically anything D3-based is going to be a good option."
I checked out NVD3 and it looks great:
Since there is access to the whole NMEA2K and NMEA0183 networks, and it's going to be on 24-7, it will be possible to add some useful non-alternator plots like Barometer vs. time, Wind Speed vs. Time, etc. Similar to OpenCPN but maybe more configurable.
I will eventually figure this out, but someone better at HTML/javascript/web stuff will probably be 20x faster.
__________________
Contribute to OpenSource Alternator regulator for LiFePO4 XEngineering . net
|
|
|
30-11-2024, 19:03
|
#219
|
Registered User
Join Date: Sep 2010
Location: Currently cruising the Philippines, just got back from PNG & Solomons
Boat: Wauquiez 45' (now 48') catamaran
Posts: 1,136
|
Re: Open Source Arduino Alternator Regulator
Quote:
Originally Posted by markxengineerin
... Inductors and switching frequency: going large for the former and (relatively) small for the latter...
|
Love following this. Another consideration is RFI. Some of us do still use SSB radios, both for fun & safety. The frequencies you mention are way below what we normally use, but these sorts of switching circuits also often produce higher harmonics. Not many of us work below 4MHz, but our antennas are long & our receivers are sensitive & these regulators would be (relatively) close. I can't have my 20yo analog MPPT running while using my radio, despite its steel case, & even some LEDs are a problem. Some small caps to stomp on those higher frequencies would be appreciated.
|
|
|
Yesterday, 03:54
|
#220
|
Registered User
Join Date: Sep 2019
Location: Lifeaboard
Boat: FP Lavezzi 40
Posts: 4,008
|
Re: Open Source Arduino Alternator Regulator
Quote:
Originally Posted by markxengineerin
If anyone wants to help, I could use some on the user interface. Here it is now, just numbers moving every 1 second:
Code here:
https://github.com/markliquid1/AltRe...Nov28_2024.ino
Upgrade requests:
-Replace some of the "0 or 1" input boxes with toggle switches (they must remain linked to the physical GPIO switches and ESP32 flash memory as they are now)
-Add time plots for all the sensor data. Internet recommendation I read is to use JavaScript "NVD3 or C3.js. "Basically anything D3-based is going to be a good option."
I checked out NVD3 and it looks great:
Since there is access to the whole NMEA2K and NMEA0183 networks, and it's going to be on 24-7, it will be possible to add some useful non-alternator plots like Barometer vs. time, Wind Speed vs. Time, etc. Similar to OpenCPN but maybe more configurable.
I will eventually figure this out, but someone better at HTML/javascript/web stuff will probably be 20x faster.
|
First thank you for doing all these footwork.
Why not have 2 version.
Version One: KISS simple alternator external regulator for Lithium. A "simple" external regulator where
A) I can choose the voltages and max operating temp in the profil and
B) an ouput adjustment like balmar belt manager where you can dial the alternator back
C) a BMS disconnect port where I can simply
connect the BMS and that cuts then the alternator
This version for the 80% out there that just wanna switch to lithium and where the existing dumb alternator is then modified for external regulations.
No fancy connect and adaptions, simple kiss budget regulator. All on the market start at 350Euro, it's time for a max 150Euro base version 80% are happy with. This is also to get the basics of the regulator right by exclude all the complicated and fancy stuff.
Version 2: full blow with nmea, communication and all functionality you target.
We really need that basic budget one and I am sure that will sell like hot bread. People using DC2DC with dreaded lead because you need 500Euro to get your existing 80 till 120A alternator swapped to external regulation and with 350Euro of 500Euro the regulator is 70% of these costs.
a full blown are min 2 on the market with wakespeed and Zeus.
|
|
|
Yesterday, 06:19
|
#221
|
Registered User
Join Date: Aug 2020
Posts: 996
|
Re: Open Source Arduino Alternator Regulator
This is helpful to hear, I was already considering a "bare bones" version, and I think you're right. Feature creep is tempting when each thing is only another $5 or $10, and it was supposed to simplify my life to only deal with 1 part number.
But even ignoring cost, the bare bones version could have a shorter user manual, fewer wires, less troubleshooting etc etc. That in itself is a benefit for many. Once I have the BOM for the new version I'll check what that might look like, might even place that order first.
Quote:
a BMS disconnect port where I can simply
connect the BMS and that cuts then the alternator
|
There's a digital input that accepts anything between 0 and 50 volts (thru a LTV-247 opto-isolator) which is intended for this purpose. It can be set to stop charging when the incoming signal goes either high or low. I have minimal knowledge of BMS's, so, does this meet the need?
If many BMS's are using CAN or Serial type communication to say "stop", I would have to think about keeping one or both of them in bare bones.
Regarding the buck regulator bypass mode mentioned above, I did some more mindful testing on my own alternator (Hamilton Ferris 125 amp) and found that it seems unnecessary. The buck regulators lose between 1 and 2 volts from input to output. I let my 300ah lithium bank drop down to 11.4V, and then checked the maximum amps I could get at idle. It was still possible to make a 9.9V field, corresponding to 48 amps output on a cold alternator. That seems good enough, especially considering how quickly the voltage rises in this region. Here is more data-
I was surprised RPM had so little effect on the output capability. It will be interesting to check how much RPM helps with cooling- that wasn't included here, each point only ran for a minute or two, and all points were relatively cold (<150F).
__________________
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 |
|
|
|
|
|