2023-08-07, 08:12 PM
DIY Battery Monitor - ESP32 based
|
2023-08-07, 09:10 PM
Hey Jason,
Thanks for the help. Will try tommorow did a system similiar to yours and added ADS1115 for the fuel level, engine data etc… have you maybe tried playing with smart switches?
2023-08-07, 09:19 PM
2023-08-07, 09:46 PM
Well i have put some switches in the sketch, tried adding through KIP and it seems to work but then KIP hangs with an "Waiting for authorization" message. Still figuring it out. Since i'm at the boat right now i hope i can make it work in the next few days thanks for all the work with this.
Hey Jason,
Ok, got it made together and attached to my SK. Right now im getting some ridicolous data; just wanted to double check i did it right? So, my Shunts are made like this: My wiring is per your scheme; INA219 -> 0,5mF capacitor -> Vin+ / Vin- -> 10ohm resistor on both positive lines -> shunt (each one side) My build is like this; So basically resistors and capacitors are soldered under the INA219 (on Vin+ and Vin-) Just to explain my config; Boat voltage is 12V. - INA219 0x40 - Service battery bank - INA219 0x41 - Solar charging - INA219 0x44 - Motor battery bank AD1115 for; ADC's (fuel tank level, ... ) Some ADC's with resistors to recognize states (bilge pump, ... ) Additional outputs for 4-channel relay board (smartswitches - blower, bilge pump, bilge ligts, .. ) So for the INA's im currently getting; My RShunt is = 0,00015 All the formulas are per your code. My ground is common for both RPi, ESP's, ... Shunt voltages measured with multimeter are normal (14,3 currently on charger). Where did i go wrong? The actual pics on the boat; The ESP is connected to CMG. Edit: just disconnected battery charger and measured VIN+ and VIN- to ground and the voltages are normal (13,4-13,5) although i get the same reading with INA (as in the screen above). The B shunt (for solar) is currently not hooked up, but that should not have any meaning right? And i'm reading ESP32 through SK, not through USB.
2023-08-23, 01:45 PM
Ok, got it solved.
The problem was my INA219 calling in the code. If i did it your way (with all the other i2c components on the bus) i got an error "Wire.h : NULL TX POINTER" so i did my own like this; Code: ///////////////////////////INA219A start But it looks like this calling is not ok, so i solved it in the end like this; Code: ina219A.begin(i2c); This looks like it's ok. Measurement is ok now.
2023-09-04, 07:14 PM
Hello JAson
I am very interested in your Battery mmonitor/charger. Great I am a bit customeised with platformIO on Windows but not on Pi Would there be drivers and modules like the sensESP available on PlatformIO with espressif332 board as you know? I tried using the setup as published but i am lacking knowlede to complete it to a suuccesfull build Regards Herman (from NL)
2023-09-04, 07:44 PM
(2023-09-04, 07:14 PM)twillert Wrote: Hello JAson PlatformIO is just a plugin in VSCode. SensESP is a library and Espressif is a board manufacturer. I would suggest you first take a look at some youtube tutorials about using PlatformIO with ESP32 and how to use libraries. We have all been there so dont worry. In your case you will use PlatformIO just for ESP’s. Pi has its own OS (OP). Your Pi is just a server for your “sensor nodes” - ESPs. To program ESPs you will use VSCode woth PlatformIO plugin.
2023-09-05, 03:16 PM
(2023-09-04, 07:44 PM)xsashox Wrote:(2023-09-04, 07:14 PM)twillert Wrote: Hello JAson I had no prior knowledge of ESP32, PlatformIO, VSCode or SensESP. I just used the SenseESP documentation and went from there - https://signalk.org/SensESP/pages/getting_started/ it was really straightforward and once setup, and the template is downloaded, you just have to swap the src/main.cpp and platformio.ini to my version to have the same setup as me. |
« Next Oldest | Next Newest »
|
Users browsing this thread: 1 Guest(s)