DIYBMS v4

thanks ,

I’m reading George Boudreau replys to the thread…

i have the leaf modules on my packs i had them made as soon as george uploaded them, they are rock solid ulthough i do seem to get the odd CRC errors but it doesnt stop them from working

I tried moving the jumper and using the external antenna, but no change. Just for fun, I built a second controller board and tried that, but also no change. The new 8266 should be here in the next day or two.

If you’re using the D1 mini pro with optional external antenna you need to move a resistor or remove it and put a solder blob between the two points to enable the external antenna header. Just gets a 90 degree switch.

Once you flash your Arduino to use for arduino isp the port isn’t /dev/ttyUSB*. It will be /dev/ttyACM*. “dmesg |grep tty” should show that.

1 Like

Thanks. I was able to rotate the jumper, but it didn’t fix my WiFi issue. I didn’t think it would, but it was something to test.

usb 1-3.3: ch341-uart converter now attached to ttyUSB0

legend!

now to get figure out why avrdude.conf or .avrduderc isnt seeing it.

Once I put my Uno clone in isp mode then uploading from platformio was a piece of cake. I could sit there and flash one, wait for it to boot, disconnect, repeat. Worst case you hit upload a second time and off it goes. Never edited a config file. Always use Linux. If you get nowhere let me know. I’ll record the process and see if it helps.

I’ve been at it a couple days now and dont seem to be getting anywhere soon. I would greatly appreciate it if I could either see the process or have a gander at your .config as that seems to be the issue. Even the man page doesn’t show an example .conf so I’m really looking for that atm.

Maybe I need to start again from scratch on an rpi with a direct port…

But yes, a recording would probably work wonders.

Hello.

My son wants to read one module for one single cell on a project they do in school. They have to use a cortex hardware, so we can’t use the code from here. We sniffered on the uart TX of the controller module to simulate the hex string we need to send to the module to get the voltage data out of it. But the “green blink” isn’t coming.

The HEX String we sniffered was:
F6 E6 FA F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F0 20 C8 FE 00

very frustrating :slight_smile:

We only need voltage from one module, or in first place the magic blink.

The code for the voltage request is in here…

PacketRequestGenerator.cpp

“sendCellVoltageRequest” function.

1 Like

The green LED will only light if the packet of data is addressed to it, otherwise it will silently pass it onto the next module (or back to the controller).

1 Like

ok. thanks, we will give it a try :slight_smile:

Small video about my new running light. Works particularly well when it is dark :slight_smile:

And thanks to Marpfei for his great Grafana.

https://imgur.com/WuRwejT

@stuart can somehow be supported for your great work? Paypal or Patreon.com?

1 Like

The new 8266 arrived today and it works. I don’t know why the old one wouldn’t create an AP or connect to my WiFi, but the new one does. Thanks for the help!

Rich

@dru_rew


IIRC I had to edit the upload protocol and specify the port was all. See the images and hope they help! There is a typo in there. I hit a key before the screenshot. platform = atmelavr (no ‘s’).

1 Like

Legendary! But, other than your beautiful syntax :wink: I got about that far as well.

So what programmer board are you using? I have an attmega2560pro and have connected the bms board to the icsp header. I used arduino ide to set it up as an arduiono isp. No joy there.

Otherwise I’ve tried using an esp programmer hw305, it should work…its recognised as ch341-uart, but also no joy.

One thing I did figure out is the EEPROM.h, originally I was using the esp/EEPROM.h and what I really needed was avr/EEPROM.h, maybe that deserves some documentation…

I guess platformio is designed to be complicated to “help” (I should say hinder) in the long run with debugging. Classic MS. And you know how usually people are like “oh yeah, here’s that header file you need”…platformio is like, “yeah no that’s impossible. Looking for EEPROM.h? Have a look at these useless esp libraries.”

If I had the mind to do it, Id port this all over to cpp and run it in arduino ide. But I dont have the mind to do it. I’ll just buy the usbuart thingy and be done with it.

I mean absolutely no disrespect…Its just an ms rant that comes from different ways of doing things.

Thank you guys for all the help and responding to a noob. Ill be sure to tell you how it goes.

Edit: You know, I bet its because of my usbhub.
Edit: Its not the hub.

I’m using an Uno clone that I’ve had for years. It has all worked flawlessly once I made the couple changes shown above. protocol is where I was initially hung up but Goog showed me the way. Then just port and I set the speed to something I knew should work without issues.

1 Like

I gave up and ordered the usbuart everyone says works.

@stuart Hi Stuart, I just watch you YT video “DIYBMS v4 Latest code updates & programming module/controller” ( nice work )
I see there is an option to program those boards where the R19R20 are swapped, can you tell me is this code correct to allow the system to function correctly and the the temp range correctly reported
?. Is there anything we should know about this, is it ok to leave these boards as is ? or recommended to de-solder and swap the R19R20 ? thanks