DIYBMS v4

I expect so, never tried but sure Google has the answer

how could i fix this {Error: Invalid ‘C:\Users\user\Documents\Visual Studio code\diyBMSv4Code-master\ATTINYCellModule\platformio.ini’ (project configuration file): ‘Source contains parsing errors: ‘C:\Users\user\Documents\Visual Studio code\diyBMSv4Code-master\ATTINYCellModule\platformio.ini’
[line 27]: ‘-P$UPLOAD_PORT\n’
[line 28]: ‘-b$UPLOAD_SPEED\n’’}
i will really appreciate your help.

I’m trying to use this platformio stuff to upload to the D1 mini (4Meg) but it fails to upload every time:

Retrieving maximum program size .pio/build/nodemcuv2/firmware.elf
Checking size .pio/build/nodemcuv2/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [====      ]  44.2% (used 36172 bytes from 81920 bytes)
Flash: [=====     ]  52.7% (used 550776 bytes from 1044464 bytes)
Creating BIN file ".pio/build/nodemcuv2/firmware.bin" using ".pio/build/nodemcuv2/firmware.elf"
Configuring upload protocol...
AVAILABLE: espota, esptool
CURRENT: upload_protocol = esptool
Looking for upload port...
Use manually specified: /dev/ttyUSB0
Uploading .pio/build/nodemcuv2/firmware.bin
esptool.py v2.8
Serial port /dev/ttyUSB0
Connecting....
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: f4:cf:a2:d4:4b:c2
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...

**A fatal error occurred: Invalid head of packet (0x80)**
*** [upload] Error 2

I’ve made changes to the ini file like so:

platform = espressif8266

board = d1_mini

framework = arduino

upload_speed=921600

upload_protocol = esptool

upload_port = /dev/ttyUSB0

;80Mhz

board_build.f_cpu = 80000000L

; As used in ESP8266 D1 MINI PRO 16M bytes(128M bit) Flash

; buy from here https://amzn.to/2OF7Mzn

build_flags = -Wl,-Tesp8266.flash.4m3m.ld

I’ve tried uploading a scratch from Arduino IDE and that works fine so there is nothing wrong with the D1 mini. Has anyone else had problems with this?

1 Like

Fixed it, speed was too high. However now it’s running I can see and join the wireless network it broadcasts but when I got to http://192.168.4.1/ it doesn’t respond and timesout.

When you post quotes like that, can you frame them with 3 backticks ``` on their own line above and below, please? It makes it so much more readable.

Sorry, I can’t help with your networking problem.

Sure thing.

Weird thing is, yesterday I put the older version of the code on there (before I realised there was a newer version) and that let me connect on http://192.168.4.1/ no problem.

Also I’ve been trying to program my cell monitors with an Uno but it’s not working. If i buy one of these https://www.amazon.co.uk/dp/B0785RQ766/ref=cm_sw_em_r_mt_dp_U_vz5HEbT12A5KJ will that do the job for me?

1 Like

Thanks for the information on ordering V4.21 … I have now done so … but, still being somewhat new to electronics, I have a few questions to confirm my understanding …

  1. I still need to order 2 parts correct? The 2 parts that JLCPBC do not have on their automated system for the SMT application … or, are the parts ordered (because they were in the BOM that I uploaded to JLCPCB )but simply will not be placed on the boards by JLCPCB and I’l do that myself when I receive the boards?

  2. I just order the ‘cell’ level boards, not the controller correct? I will also need to create a separate order for a controller board or is that inherently included in the Gerber files from the version 4.2 branch?

Thanks for any help!

You will have to order those parts yourself. When I did it I had to order the attiny chips and the 2 pin connectors.

The controller board is a separate Gerber file (I’m pretty sure). I think you can get most of the components SMT by JLCPCB for that too.

Yeah … I started the JLCPCB order using the Gerber file contained within the overall Gerber file … if that makes sense … seems to work until I get to the BOM and CPL file stuff … so I used the same BOM and CPL from the main folder and … I don’t know if it worked … the board did not seem to get populated with the components on the website, whereas they did with the cell level boards …

I finally managed to connect to http://192.168.4.1/ and I’ll put a note here about it because it took me ages to find out what the issue was. I discovered that once I have connected from my mobile phone to the D1 wireless (DIY_BMS_CONTROLLER) network, I can only connect to the above address that first time. If I reboot the D1 before connecting it to my home network I can then still see the DIY_BMS_CONTROLLER ssid and join it but when I try to go to the above address it just times out. Even if I reinstall the software on the D1 I still have the problem. I accidentally figured out that I have to tell my phone to forget the DIY_BMS_CONTROLLER network and then find and join it anew to then be able to get the page up on the 192.168.4.1 address. It only seems to work the once though but I guess once is enough if you manage to connect it to your home network first go. Anyway, this looks to be an issue with android phones rather than the BMS software. I’ll leave this here in case anyone else ever hits this problem.

Yeah, somewhere above someone branched off the repository and added a BOM file for the controller board. That’s what I used and it populated the components.

Still having trouble finding this … if some can lead me to it or confirm that the BOM to use for the Controller is the same BOM used for the cell level boards …

Thanks :slight_smile: .

I found the git repository on my machine still, the url to clone it is:

I used this, but only for the controller as that’s still the same

Thanks! You guys are the best. All ordered!

I have the same problem i entered the password and when i press “submit” D1 Mini restart without saving the setting. I tried to upload an old version and it worked without a problem.

I’ve had the same problem this week. Turn off mobile data on Android before connecting the WiFi hotspot.

Can someone just confirm that this is the right tool for programming the cell monitors, I really need to order it today.

https://www.amazon.co.uk/dp/B0785RQ766/ref=cm_sw_em_r_mt_dp_U_vz5HEbT12A5KJ

I’ve been watching for a response from when you recently asked. Someone will probably chip in soon :slight_smile:

I ask you to make such firmware. thanks