Boat data monitor - what next.....

  • Thread starter Thread starter GHA
  • Start date Start date

GHA

Well-Known Member
Joined
26 Jun 2013
Messages
12,552
Location
Hopefully somewhere warm
Visit site
This one was actually very successful, been running 24/7 pretty much flawlessly for a long time now :cool:
Wifi boat data monitor - what's left to measure!

But could do better...

SO just to get the ball rolling, idea is jlcpcb make the boards which are dead cheap for the functionality provided. ESP32 chip either surface mounted or header pins for a dev board, some other surface mount chips and rj45 sockets for breakout boars. So far below is 4 channels very accurate voltage, built in accurate barometer , some switches providing 12v for relays etc, 2 channels rs232, one of whch pseudo multiplexes into 4 inputs for non vital data like victron smartshunt/solar reg etc; ina219 current sensor. and a breakout board for ds18b20 thermometers.

Idea is there will be header pins so it can be a plugin board for a raspberry pi zero, so one stop shop for monitoring a whole host of things on yer boat for little cost and under 200mA. Signalk doies all the work on the pi , data goes into an influxdb database. I couldn't get software to make the pretty graphs running on the Pi without using up too much resources so use grafana on a laptop to do that. Works just great!! Esp software is micrpython and quite easy to burn onto the board with thonny.
boatybits/boatymonpy

Thoughts? Still haven't got round to checking if the engine revs works on V1 yet, would be nice to have.

3f2kqQT.png


Recent wind -
2aYlnuK.png
 
Looks great. Like the RJ45 use.

What regulator are you using?

Reason i ask is that you can burn allot of power on that choice.

Are you planing to sleep it to save more power (regulator permitting)?
 
Looks great. Like the RJ45 use.

What regulator are you using?

Reason i ask is that you can burn allot of power on that choice.

Are you planing to sleep it to save more power (regulator permitting)?
Not sure about power, I'm not an electronics engineer and google schooled and mostly have used ebay bits for power so far, but would be nice to have a regulator on there. Looking at this project which uses a sy8401 - mairas/SH-ESP32-hardware
But think I need 5v for the pi zero & 3.3v for the esp32, the esp averages about 40mA from memory but spikes much higher when sending wifi so taking 3.3v from the Pi might not be wise. Or maybe OK with some big capacitors but that's more bits. Or 2 x sy8401..
If the first design works perfect it will be a complete fluke!
Power is low so squeezing to get every last bit of efficiency isn't really that important. Or sleep, mAhour savings, no real point, wash your solar panels once a week instead :)
 
Slowly coming along, just playing round with layout so far but should be able to get the main board and 2 x breakouts on the same pcb. If it ever works :)
Looks like it will need 2 power supplies, 3.3v & 5v but that's only another 50p or so.

B8jdYtw.png
 
@GHA are you having any boards made soon?
Quite a bit of design to do yet but hopefully pretty soon. The sensors are quite straightforward and can be copied from the last batch of boards but power and multiplex are new to me so bit wary of getting it wrong. Jlcpcb have a lot of components available for assembly but still takes a while for a google schooled non engineer to wade through :)

Not sure best way to achieve "4 in, one out" multiplex for serial - suggestions anyone? There's a flat $3 fee for each lot of extended components which isn't much but adds up so basic components are better if possible.
Something sort of like this maybe?
https://datasheet.lcsc.com/szlcsc/1907231804_Texas-Instruments-TI-CD74HC4052PWR_C402158.pdf
Or 3 of these? Not really sure what I'm doing here ;)
https://datasheet.lcsc.com/szlcsc/1811082015_ON-Semiconductor-NC7SV157P6X_C184123.pdf

PCB Prototype & PCB Fabrication Manufacturer - JLCPCB
 
Last edited:
Don't think it will go that low ;)
Last lot was less than $10 a board, raspberry pi zero about the same. Challenge you to find anything with the same capabilities for under $500 ;)
No, I'm talking about the money that goes into keeping and running the boat.
 
Not sure best way to achieve "4 in, one out" multiplex for serial - suggestions anyone?
Not sure I understand correctly what you're trying to do -- is it 4 x RS232 serial inputs (no transmit) into ESP32 and read them one-by-one i.e. not simultaneously? If so then you can simply bring the levels down with a resistive divider (+ a protection diode) and route each input to separate ESP32 GPIO pin. ESP32 UARTs can be reassigned to different pins so you could do the multiplexing in software.

For power you could use any of the gazillion tiny dc-dc modules available from aliexpress etc. Something like these: 0.58US $ 10% OFF|DC DC Buck Step down Power Supply Module 5V 12V 24V to 5V 3.3V 9V 12V Fixed Output High Current|Integrated Circuits| - AliExpress
NB The link is just for illustration, I didn't check if this particular module is of any actual use.
 
ESP32 UARTs can be reassigned to different pins so you could do the multiplexing in software.

For power you could use any of the gazillion tiny dc-dc modules available from aliexpress etc. Something like these: 0.58US $ 10% OFF|DC DC Buck Step down Power Supply Module 5V 12V 24V to 5V 3.3V 9V 12V Fixed Output High Current|Integrated Circuits| - AliExpress
NB The link is just for illustration, I didn't check if this particular module is of any actual use.
Good idea about reassigning uart input pins (y)- would mean another max232 chip but that's only 50 odd cents, max chip works for any levels and sorts any outputs as well. . And could test it before ordering. No shortage little power modules already but the idea is to have everything on one board so no extra components needed for the Pi or esp32 chip. Plug in 12v and go. Might be a way of loading the micropython onto the esp with jumpers & node red from the Pi as well but haven't looked at that yet, once micropython is on esp32 everything can be done over wifi.
Thanks! :cool:
 
What advantages does a max232 have over two resistors and a diode, if you needed inputs only?
Esd protection, 3.3v signal from any voltage input though can't remember if I've checked 3.3v like victron smartshunt outputs, certainly works with 5v & 12v.And more outputs might be handy one day. Can 2 resisters / diode cope with differing input voltages and create 3.3v signal? Link to a circuit? Not being an electrical engineer anything learned is a good thing :)
For 50 cents it's worth it just for the added protection for me.
 
You're probably right, if the board space allows a max232 takes care of all sorts of input protection and allows outputs for the future.

The simple level shifter would be something like this:
shift.png


PS. If the input didn't go negative (rs232 does), the even simpler level shifter is just one diode.
 
Can you not use a Max233 and get rid of some of the extra componentry?

Will you be making the design available, or offering entry on to a job lot from the PCB fab?
 
You're probably right, if the board space allows a max232 takes care of all sorts of input protection and allows outputs for the future.

The simple level shifter would be something like this:
View attachment 113504


PS. If the input didn't go negative (rs232 does), the even simpler level shifter is just one diode.
Thanks, plenty space on 100mm board, actually getting cold feet about onboard esp32 & power supplies, might just do headers for Pi & ESP32 doit as it's all known and works, plus 3.3v can come from the esp. Favourite power supplies are these , but not that brand- seem to hold the voltge up well under load,must do a rest one day :)
uyL2ICQ.png
 
Top