ESP32 help

Sleonard2649

New member
Joined
Aug 30, 2019
Messages
16
Do any of you know somebody familiar with ESP32 dev boards? I'm trying to get data from my 'Smart' Chinese BMS. I have the ESP32 but have no idea how to make this work.
 

daromer

Moderator
Staff member
Joined
Oct 8, 2016
Messages
5,463
Where are you stuck? What have you done? How have you wired it up?

I would say this is not really about esp32 as such since you will most likely do the same thing on arduino bords, esp8266 or others if you use same code.

Arduino IDE?
 

Wolf

Well-known member
Joined
Sep 25, 2018
Messages
1,320
As daromer said what are you trying to do ?

Get data from a cheap chinese BMS. We got that.
What is the BMS model what does it have for outputs or interfaces. WIFI,Bluetooth, TCP, UDP, Modbus, Canbus, Serial?
Where do you want the datato go? Influx, Mqtt, SQL Node-red, Cloud?
How do you want to visualize this data excel, grafana, web dashboard, phone app?
Questions that need answers so we can answer your question. :)

Wolf
 

Sleonard2649

New member
Joined
Aug 30, 2019
Messages
16
image_oyrnnh.jpg

BMS currently has a bluetooth communication dongle. I'm looking to swap that out with wifi capabilities of my ESP32 dev board. I researched the following three github apps:
https://github.com/CRaccani/smart-BMS-NodeMCU
https://github.com/tomcosk/BMSBatteryMonitor
https://github.com/simat/BatteryMonitor

Presumably, if I get one of these running on my ESP32, I will be able to at least monitor the info via a web page on my home network? CRaccini seems to have control capabilities which would be awesome!
 

Korishan

Moderator
Staff member
Joined
Jan 7, 2017
Messages
6,352
With ESP32, you can't use BT and WiFi at the same time. The only way you could do this is to (rapidly) switch back and forth between connection types. This is a lot of overhead and will be prone to bugs and dropped packets on either radio.
 

Sleonard2649

New member
Joined
Aug 30, 2019
Messages
16
Korishan said:
With ESP32, you can't use BT and WiFi at the same time. The only way you could do this is to (rapidly) switch back and forth between connection types. This is a lot of overhead and will be prone to bugs and dropped packets on either radio.
I don't want to use bluetooth anymore, since it requires me to be in the shed with my batteries.
 

Korishan

Moderator
Staff member
Joined
Jan 7, 2017
Messages
6,352
I thought you were gonna try to use BT to communicate with the BMS and then WiFi to send it out.

Are you trying to hardwire the EPS32 into the bms?
 

daromer

Moderator
Staff member
Joined
Oct 8, 2016
Messages
5,463
And how much have you done?

Connection? Code?

Or do you expect us to do the work for you?
 

Wolf

Well-known member
Joined
Sep 25, 2018
Messages
1,320
Sleonard2649 said:
.............I researched the following three github apps:
https://github.com/CRaccani/smart-BMS-NodeMCU
https://github.com/tomcosk/BMSBatteryMonitor
https://github.com/simat/BatteryMonitor

Presumably, if I get one of these running on my ESP32, ..........................CRaccini seems to have control capabilities which would be awesome!
CRaccani solution was portet from mega256 to esp8266 not esp32.
tomcosk solution involves a linux box or a raspi.
simat solution is on a beaglebone or another linux platform

Guess you are gonna have to start from scratch.
Personally I would use the (noble)bluetooth palette in node-red to see if you can communicate with the BMS.If that works grab the decode info from simat and get busy. Wont need an esp32 just a raspi............

Wolf
 

daromer

Moderator
Staff member
Joined
Oct 8, 2016
Messages
5,463
ESP8266 almost work out of the box on esp32. You dont need to do that big changes unless the libraries used only exist on one place. Then you have to redo some smaller code.
 

Wolf

Well-known member
Joined
Sep 25, 2018
Messages
1,320
daromer said:
ESP8266 almost work out of the box on esp32. You dont need to do that big changes unless the libraries used only exist on one place. Then you have to redo some smaller code.
I know that but you still have to change somecode and get different libraries for wifi its not an upload the sketch and your done scenario. :p

Wolf
 

daromer

Moderator
Staff member
Joined
Oct 8, 2016
Messages
5,463
Its not for sure. Neither less we dont know what op have done or expect. The first One is spot in code to use i would say..the Quick look i Took its not Hard to get going. Ut you need to understand the esp32.

With that Said... I dont see the reson just taking an esp8266 instead and you are Good to go :)
 

Wolf

Well-known member
Joined
Sep 25, 2018
Messages
1,320
daromer said:
With that Said... I dont see the reson just taking an esp8266 instead and you are Good to go :)

That's what I would do.
If someone has already done the heavy liftingon anesp8266................... :).
No need to recreate the wheel.
Wolf
 

Sleonard2649

New member
Joined
Aug 30, 2019
Messages
16
Got it!ESP8266 is on order. I should havegone that route in the first place. :rolleyes:
Thanks folks!
 

Sleonard2649

New member
Joined
Aug 30, 2019
Messages
16
Sleonard2649 said:
Got it!ESP8266 is on order. I should havegone that route in the first place. :rolleyes:
Thanks folks!
Success!

image_tobgcg.jpg
 

daklein

New member
Joined
Sep 14, 2019
Messages
3
Nice! How's it working out, still good?

I have a 10s leaf pack in an Electrak tractor, that I want to monitor cell & pack voltages, to charge and discharge as a powerwall with the house. So I need a BMS and small controller like nodemcu, to control a relay to turn on charger, and several more relays to enable 1-4 microinverters for discharge to match house loads on average.
 

Sleonard2649

New member
Joined
Aug 30, 2019
Messages
16
It works well for viewing voltages. I don't know if you'll be able to trigger relays.
 

sshoecraft

New member
Joined
Jan 23, 2021
Messages
25
Awesome thanks! If you don't mind, I'm going to use some of this code in the firmware of my wifi module.
 
Top