Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 19-03-2024, 11:04   #106
Registered User

Join Date: Apr 2009
Location: Staging in Honolulu before sailing to Vancouver this summer
Boat: Southern Cross 35
Posts: 70
Re: Open Source Arduino Alternator Regulator

Quote:
Originally Posted by markxengineerin View Post
The microprocessor is an ESP32, I just use the term "Arduino" out of habit. https://www.amazon.com/-/es/WEMOS-ES.../dp/B07P1L7839

As for ChatGTP, I'm not impressed with it's ability in electronics so far. It has given me very errant information that's easy to find (correctly) on datasheets, and the code it generates is not better or easier to work with than googling for examples/searching GitHub.

Same experience with ChatGPT on my side...
__________________
Serge
spirare is offline   Reply With Quote
Old 19-03-2024, 11:27   #107
Registered User

Join Date: Apr 2009
Location: Staging in Honolulu before sailing to Vancouver this summer
Boat: Southern Cross 35
Posts: 70
Re: Open Source Arduino Alternator Regulator

Quote:
Originally Posted by markxengineerin View Post
Do people just want to read CAN messages , or also write them?

At minimum a CAN command to terminate charge. Some BMS uses CAM to control shore charger and smart alternator controller (aka Orion Jr BMS https://tinyurl.com/ytbzn5ro).


Quote:
Originally Posted by markxengineerin View Post
There are a bunch of external switches
-On/off
-Force Float
-Limp home mode
-High/Low charge rate

Recommendations for how these should be set up? For easiest installation, I was thinking they could be mounted right on the enclosure. Then people could extend the wires to their control stations as desired. Recommendations for cheap + durable switches? I might leave it up to the user to select unless there is something that's really non-controversial.

Beware when extending control wires... RFI problem from onboard SSB Transceiver are common and hard to solve. Inputs need a minimum of hardware RFI protection and shielded wire harness for remote control.
__________________
Serge
spirare is offline   Reply With Quote
Old 19-03-2024, 11:35   #108
always in motion is the future
 
s/v Jedi's Avatar

Cruisers Forum Supporter

Join Date: Feb 2009
Location: in paradise
Boat: Sundeer 64
Posts: 19,004
Re: Open Source Arduino Alternator Regulator

Quote:
Originally Posted by markxengineerin View Post
The microprocessor is an ESP32, I just use the term "Arduino" out of habit. https://www.amazon.com/-/es/WEMOS-ES.../dp/B07P1L7839

As for ChatGTP, I'm not impressed with it's ability in electronics so far. It has given me very errant information that's easy to find (correctly) on datasheets, and the code it generates is not better or easier to work with than googling for examples/searching GitHub.
A quick glance over the answers it gave and which I posted above shows solid code and very good reasoning. Basically it took the show in the thread.
__________________
“It’s a trap!” - Admiral Ackbar.

s/v Jedi is offline   Reply With Quote
Old 19-03-2024, 11:47   #109
Registered User

Join Date: Aug 2020
Posts: 922
Re: Open Source Arduino Alternator Regulator

Quote:
Inputs need a minimum of hardware RFI protection
Do you have a suggestion for hardware RFI protection on a digital input channel, as would be used for these switches? I was planning on using some generic "debounce" code, which I haven't looked deeply into yet, but guessing it would do something like waiting 0.5 seconds before accepting the change in state of a switch as intentional.
__________________
Contribute to OpenSource Alternator regulator for LiFePO4 XEngineering . net
markxengineerin is offline   Reply With Quote
Old 19-03-2024, 13:15   #110
Registered User

Join Date: Apr 2009
Location: Staging in Honolulu before sailing to Vancouver this summer
Boat: Southern Cross 35
Posts: 70
Re: Open Source Arduino Alternator Regulator

Quote:
Originally Posted by markxengineerin View Post
Do you have a suggestion for hardware RFI protection on a digital input channel, as would be used for these switches? I was planning on using some generic "debounce" code, which I haven't looked deeply into yet, but guessing it would do something like waiting 0.5 seconds before accepting the change in state of a switch as intentional.
Software denouncing should always be implemented as well as the basic hardware input protection. The standard industry practice is well covered here. This is usually sufficient for EMI, ESD and it will give some RFI protection... which is probably all you need for your application. I am not sure if the ESP32 has built-in protection for its input... this is something I have not yet looked into but I will shortly ?

Also, since longer wires are more susceptible to pick up RFI, twisted pair for data and a shielded harness for controls is highly recommended. Again, this is the minimum and it generally enough to deal with the most RFI. Often RFI problem aboard boats comes from a faulty SSB / Tuner / Antenna installation... so this is always the starting point in solving this type of problem.

Feel free to ask for more information or details...I used to design & test RFI proof equipment in the 300Hz to 500Mhz range as well as EMI and ESD.
__________________
Serge
spirare is offline   Reply With Quote
Old 19-03-2024, 13:39   #111
Registered User

Join Date: Aug 2020
Posts: 922
Re: Open Source Arduino Alternator Regulator

Thank you, it would be great if you could comment on the ESP32 when you get to it. I will also read up.
__________________
Contribute to OpenSource Alternator regulator for LiFePO4 XEngineering . net
markxengineerin is offline   Reply With Quote
Old 19-03-2024, 14:17   #112
Registered User

Join Date: Aug 2020
Posts: 922
Re: Open Source Arduino Alternator Regulator

I will post the "ESPDuino" board again, because I could imagine the input protections being built into the board (?) rather than internal to the processor. https://www.amazon.com/-/es/WEMOS-ES.../dp/B07P1L7839 I have not been able to find a reliable looking supplier for these. The one I have on hand says "WEMOS D1 R32" on it, but the product doesn't exist on the WEMOS website. Needless to say, there is no schematic available.

On the bright side, performance to price ratio is amazing, and it has been working great in the prototypes.
__________________
Contribute to OpenSource Alternator regulator for LiFePO4 XEngineering . net
markxengineerin is offline   Reply With Quote
Old 19-03-2024, 14:40   #113
Registered User

Join Date: Mar 2007
Location: Rocky's Boat Yard
Boat: Tayana V42 - Passages
Posts: 618
Re: Open Source Arduino Alternator Regulator

+++ElegantOTA
__________________
You can make more money but you can't make more time.
jcapo is offline   Reply With Quote
Old 19-03-2024, 17:35   #114
Registered User

Join Date: Apr 2009
Location: Staging in Honolulu before sailing to Vancouver this summer
Boat: Southern Cross 35
Posts: 70
Re: Open Source Arduino Alternator Regulator

Quote:
Originally Posted by markxengineerin View Post
Thank you, it would be great if you could comment on the ESP32 when you get to it. I will also read up.
The controller is made by Esspressif
Doc is for your board is here

If you want to distribute this as a product, you should consider a board from a well established board provider.

Anyways, ESP32 chip have a minimum built-in protection on all Input/Output. Industry standard practice call for additional protection for everything external to the mainn board. An easy way to isolate and protect your remote Inputs is by adding an opt-coupler and a low-pass filter. The opt-coupler will protect your main board from EMI & ESD and a simple RC low-pass filter will catch most of the RFI that the wires may pickup.
__________________
Serge
spirare is offline   Reply With Quote
Old 20-03-2024, 11:17   #115
Registered User

Join Date: Aug 2020
Posts: 922
Re: Open Source Arduino Alternator Regulator

Nice find on the board schematic, thank you.

It was difficult to decide which board to use. I started with Arduino Uno, then was encouraged to look at ESP32 because of Wifi/Bluetooth. I wanted to keep Arduino R3 compatibility because they're so popular, so ended up with "Espduino" which is ESP32 in Arduino Uno form factor. Then I realized that the program is going to be too large for Arduino Uno R3 (specifically, the CAN capability), so now it's "only Espduino".

There is also the new Uno, "R4 Wifi", which has a CAN bus built in, keeping the Uno form factor. I need to look deeper and see if it would be plug and play, that would be a good option for those who want to spend an extra $20+ for "name brand" vs. unknown. The concerns are the logic levels and if the pinouts will match (or can be programmatically re-routed like ESP32). It is on my to-do list.
__________________
Contribute to OpenSource Alternator regulator for LiFePO4 XEngineering . net
markxengineerin is offline   Reply With Quote
Old 24-03-2024, 11:14   #116
Registered User

Join Date: Aug 2020
Posts: 922
Re: Open Source Arduino Alternator Regulator

ElegantOTA is working to flash updates through Wifi, using a .txt file of configuration parameters. It's very basic now, no error checking or advanced parsing, just reading some integers that must appear in the correct order. But, it's far enough along to show that it's going to work. I think this will be a nice convenience for anyone who wants to edit parameters (amps targets on high/low settings, temperature limit, source of "battery voltage" ie Victron device, NMEA2k, or the device's own measurement) but have no interest in deeper customizations. Thanks for the suggestion!

I spent some time thinking about UNO R4 (from last post), and I'm going to keep it in mind for future versions. But for now, it becomes too complicated to allow multiple boards, given the different compatibility of pin numbers, the 10+ different libraries involved, the slightly different steps to program different boards, etc. ESP32 is still much faster/better/cheaper option and I don't regret the UNO form factor, yet.

I also got some NMEA2K code compiled successfully, but I can't test it in action as I don't have the right combination of hardware on hand for another few weeks.

Next on list of software things: researching Victron's use of CAN communication, and Signal K. I know nothing about either topic, so, some stupid questions:
-Do Victron devices plug directly into a boat's NMEA2K network, or do they have their own separate CAN system? Are there ever two separate CAN networks on a boat?
-What involvement should an alternator regulator have with Signal K, and why? As I understand it, Signal K is a good way of reading/displaying data from a variety of sources (NMEA networks, or directly from sensors, etc). If all Signal K systems have a black box which converts NMEA data to Signal K, and if this regulator already supplies NMEA data, is there any advantage to producing Signal K data directly, or would it just be wasted effort?

Also: figuring out how to write output from ESP32 to web browser. So far I have only done the reverse.
__________________
Contribute to OpenSource Alternator regulator for LiFePO4 XEngineering . net
markxengineerin is offline   Reply With Quote
Old 24-03-2024, 11:38   #117
Registered User

Join Date: Sep 2019
Location: Lifeaboard
Boat: FP Lavezzi 40
Posts: 3,008
Re: Open Source Arduino Alternator Regulator

Quote:
Originally Posted by Jon Hacking View Post
Catamarans usually have multiple engines, & some engines have multiple alternators (we happen to have both, so 4 alternators).

It would be nice if multiple controllers could talk to each other, so they make the same decisions at the same time, & not be fighting each other. Protocol doesn't really matter, I suppose. Al's earlier design used CAN over CAT-5 to do this, with a pair of standard RJ45 connectors on each board, to make things cheap & easy. But he had to make up new CAN sentences to accomplish this.
Why not 1 controller for 2 alternators, just 2 or 4 temp probes so the hotter of 2 defines regulation for both, rest is just done as it would be one big alternator. Thats how Nordkyn VSR200 works and perfect for 2 alternator on same engine.
Yes you loose min on one but they are mostly quite identical as the engine room influences the temps the most.
Saves costs and makes install much easier.
CaptainRivet is online now   Reply With Quote
Old 24-03-2024, 11:50   #118
Registered User

Join Date: Aug 2020
Posts: 922
Re: Open Source Arduino Alternator Regulator

I think that idea could work, as long as:
-Don't care about (small?) differences in field amps caused by different field resistances between the two alternators
-Total field amps < 15
-Don't mind the additional complexity and "risk" factor ie what happens when one Alternator belt falls off?

The temperature sensing (for those who don't already have sensors as part of an existing installation) is going to be digital "OneWire" sensors (see earlier in this thread).
Many of those can be connected to the same physical hardware channels, and software figures out which is which, so the number of places to measure is not limited in any way.

There will be a thermistor option, keeping it in case anyone wants to keep existing thermistors or prefers them for some reason, but each new one of those takes up an analog input channel.
__________________
Contribute to OpenSource Alternator regulator for LiFePO4 XEngineering . net
markxengineerin is offline   Reply With Quote
Old 24-03-2024, 12:08   #119
Registered User

Join Date: Sep 2019
Location: Lifeaboard
Boat: FP Lavezzi 40
Posts: 3,008
Re: Open Source Arduino Alternator Regulator

Quote:
Originally Posted by markxengineerin View Post
I think that idea could work, as long as:
-Don't care about (small?) differences in field amps caused by different field resistances between the two alternators
-Total field amps < 15
-Don't mind the additional complexity and "risk" factor ie what happens when one Alternator belt falls off?

The temperature sensing (for those who don't already have sensors as part of an existing installation) is going to be digital "OneWire" sensors (see earlier in this thread).
Many of those can be connected to the same physical hardware channels, and software figures out which is which, so the number of places to measure is not limited in any way.

There will be a thermistor option, keeping it in case anyone wants to keep existing thermistors or prefers them for some reason, but each new one of those takes up an analog input channel.
Exactly thats how the Nordkyn VSR200 works.
Have 2x115A Mitzi on one engine with one VSR200 and the temp differences are very small, not worth get 2 regulators for 5A more or less.
Its especially for alternators like Mitsubishi 115A or the Valeo 125A which already have internal temp regulation and the VSR200 has additional temp sensors so it modulates the sense wire according to the regulation you need, so you can also run it hotter and get more output as internal temp regulation is very conservative. This way you don't have to modify alternator to external regulation (but can still extermally regulate it), which is important for newer Volvos with MDI box as with modification you loose D+ and engine won't start anymore without the D+.
CaptainRivet is online now   Reply With Quote
Old 24-03-2024, 16:43   #120
Registered User

Join Date: Mar 2007
Location: Rocky's Boat Yard
Boat: Tayana V42 - Passages
Posts: 618
Re: Open Source Arduino Alternator Regulator

Quote:
Originally Posted by markxengineerin View Post
Also: figuring out how to write output from ESP32 to web browser. So far I have only done the reverse.
Have a look at ESP32 Async Webserver

https://github.com/me-no-dev/ESPAsyncWebServer

That package makes serving static or dynamic HTML files pretty easy. Easy to upload a config file too.
__________________
You can make more money but you can't make more time.
jcapo is offline   Reply With Quote
Reply

Tags
alternator, regulator


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Arduino based alternator regulator Epicurean Marine Electronics 3 18-02-2023 05:36
Arduino based Alternator Regulator Project wayne.b Electrical: Batteries, Generators & Solar 11 11-03-2021 10:16
[SOLD] Balmar Regulator, 100A Alternator & 35A alternator JimJohnston General Classifieds (no boats) 0 07-10-2018 19:36
A DIY barograph based on an Arduino shield PauloOnArbutus Marine Electronics 5 23-01-2016 04:58
3 stage regulator or internal regulator for AGMs? sgtPluck Electrical: Batteries, Generators & Solar 13 05-09-2008 08:50

Advertise Here


All times are GMT -7. The time now is 02:13.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.