Can you describe what you mean by “falls over”? What messages do you see? Does the controller reboot?
The code version you are running includes a fix for the error message you see.
At worst, could you try another memory card and/or format the existing one on a PC, it could be corrupt.
This issue was raised and fixed over here… SD card disappeared · Issue #202 · stuartpittaway/diyBMSv4ESP32 · GitHub
As in the picture above if I browse to the Storage tab, and do nothing, I see the red bar "Cannot communicate… " after a couple of seconds and the controller restarts. I’ve tried other cards seems consistent? Seems to read the card OK after controller update so it sounds like some history on the card is causing it. Nothing else on the card. I’ve got a spare controller on the bench I can experiment with. The problem report you mention seems slightly different and I was seeing that previously although I’m not sure I tried not pressing mount before?
Ok, I would need to see the output of the usb serial console to see the actual error logs.
Hi! If there is anyone that would want to help me make the order online from JLCPCB for the new 4.6 modules. There are a few parts missing from stock, would need help with chosing alternative ones as well as avoiding any other common mistakes. I have a tendency to worry a lot, so would help a ton if someone could help me manage my anxiety when making the choices that need to be made. I can compensate you for your time. Thanks a lot!
Managed to create another small problem… Had trouble reading some old sdcards I had on the bench. The ones I could read:
/dev/sdt1: UUID=“6C50-2EDB” BLOCK_SIZE=“512” TYPE=“vfat” PARTUUID=“f8e36e66-01”
The ones I couldn’t read had no PARTUUID. If I recreate the partition table they get one.
So something subtly different on the old cards partition or filesystem.
Tried that with the offending sdcard and it works fine on the bench but still crashes in the battery.
I (150699) diybms-webreq: API call: monitor2
D (151166) diybms: Send addr=90, func=3, len=8
D (151436) diybms: Recv 97 bytes, id=90, cmd=3
I (151466) diybms-webreq: API call: storage
[W][sd_diskio.cpp:186] sdCommand(): token error  0x11
[E][sd_diskio.cpp:621] ff_sd_status(): Check status failed
assert failed: xQueueSemaphoreTake queue.c:1549 (pxQueue->uxItemSize == 0)
Backtrace: 0x40084189:0x3ffe90c0 0x4008e4fd:0x3ffe90e0 0x40095299:0x3ffe9100 0x4008f50d:0x3ffe9230 0x400e9108:0x3ffe9270 0x400edd1f:0x3ffe92a0 0x400ee3b8:0x3ffe92d0 0x4012a4ed:0x3ffe9310 0x4012a6ec:0x3ffe9330 0x4012a725:0x3ffe9350 0x4012a84a:0x3ffe9370 0x4012c84e:0x3ffe93b0 0x400edc13:0x3ffe93f0 0x400e8c18:0x3ffe9420 0x401a2de3:0x3ffe9450 0x400e7359:0x3ffe9470 0x40123d11:0x3ffe9720 0x40122aa0:0x3ffe9750 0x40123372:0x3ffe97f0 0x40121e84:0x3ffe9810 0x401a4b56:0x3ffe9830 0x40121fa9:0x3ffe9850
ELF file SHA256: 837dfffd9b1850d8
ets Jun 8 2016 00:22:57
Does re-formatting the cards help?
Recreating the partition table and the filesystem made the old sdcards visible.
Recreated both on the card from the battery and it works fine on the spare controller on the bench: visible and no crashes. Put it back in the battery and it crashed as above. Presumably a physical issue of some sort. I should try swapping the display?
Display or the power supply to the controller are possible issues I would think
@Andrew_Congdon if you have a bench supply, one idea would be to try using that for a while to power the controller, you’ll be able to compare amps consumed by the controller and pinpoint unexpected peaks or shorts that get the amps over the limit set in the supply (and reboot the thing)
I am just about to start building the DIY Bms for my solar powerwall and i have a question about pylontech emulation. I hope is the right place to ask and not breaking any forum rules.
My inverter (voltacon conversol max gen1) does not have canbus (the manual states it has but it does not, after days of research and phonecalls with voltacon it has been confirmed only rs485 is available )
Option 1: can i use the emulation through the rs485 port of the DIY controller?
Option 2: can i use a Canbus to Rs485 bidirectional converter to connect DIY bms controller CAN to my inverter’s bms port rs485?
Any help will be much appreciated.
hi and welcome to the forum,
having or not having canbus is one thing.
the main issue is what protocol and instructions your voltacon conversol max gen1 inverter uses to communicate with “its” battery.
Pylontech simulation (as victron one) works with h/w that expect these particular instructions.
I’ve never heard of this voltacon you have, so no idea, just pointing out the general concept.
basically Voltacon inverters are just another rebranded subsidiary OEM Voltronic (examples of other Voltronic derived invertrs: MPPSolar range, Axpert, Orient Power).
also this inverter does work (the supplier even sells kits of this inverter with pylontech batteries ) with pylontech batteries plus many more others successfully but through the rs485 port.
Tried an external power supply, no change. Changed power cable, tried power to ESP32 and 5V, no change. Put a monitor on the supply line, stable 5V 22mA with display lit and 18mA in screen saver. No change when controller crashes. Tried changing the display to a dimmer model and it crashes every few seconds without browsing! Must be something on the boards themselves… time to swap them out and try to recreate on the bench.
So finally the Atiny 1624 chips arrived at the end of April (ordered on January, where supposed to be on March, than changed to June) , modules are already working.
Definitely there should be a short tutorial/film on how to program those, it took me a while to figure this out.
I used to program the Atiny 1624 a FTDI converter with a schottky diodie on RX-TX and a resistor on to “UPDI Reset”, to upload the code I used the AVRDUDESS 2.14 where the FTDI was chosen as “Serial UPDI”. Changing the speed of COM port is not that necessary (few seconds of difference).
Can you share the schematic?
Mine flat-out refuse to reply to my attempts to connect a serial interface.
OK, So to program the Atiny 1624 using UPDI :
----- Hardware ----
- I used a FT232 converter set up to 3.3V.
- VCC and GND goes directly from the converter to VCC and GND on the UPDI.
- TX (yellow on the photo) is connected to RX (orange) through a diode where the stripe on the diode is heading TX.
- RX is also connected to the UPDI Reset (white cable) through a 480 Ohm resistor.
- More about the hardware is here: UPDI Serial Programming - TeddyWarner.org
---- Software ----
- Install AVRDUDE (its a command-line software but don’t dive into how to use it, you are not going to do any commands) : Releases · avrdudes/avrdude · GitHub
- Install AVRDUDESS (its a GUI for the AVRDUDE): Releases · ZakKemble/AVRDUDESS · GitHub
- Download the .hex file of DIYBMS software for cell monitors to be uploaded to Atiny1624: Releases · stuartpittaway/diyBMSv4ESP32 · GitHub
- Open AVRDUDESS,
- set Programer to “Serial UPDI” (not the FTDI, it didn’t work for me) ,
- setup COM port of your FTDI converter,
- choose Atiny1624 in MCU(-p),
- select FORCE (-F)
- select Erase flash and EEPROM… (-e).
- choose the .hex file in FLASH,
!!! Note: I used the 5K version of .hex file, 2K4 and 10K and didn’t work for me !!!
- Hit Program(!)
- You should see progress of the job, everything takes around 5-20 seconds so it quite fast.
---- DIYBMS Setup (the one which worked for me) ----
- Go to DIYBMS Settings
- Choose Communicaton speed 5K
- Choose 5000ms Inter-packet gap
I also managed to program Atiny1624 using Arduino but it’s way more complicated because you need first to program the Arduino to act as a programmer using dedicated software called Jtag2updi firmware (which also need additional libraries to work) and finally use AVRDUDDES to make the final programming, more here: Turn Your Arduino to a UPDI Programmer - Electronics-Lab.com
CANBUS and RS485 are different things - however there is work in progress for an RS485 emulation, see here… PylonTech RS485 protocol emulation by ruza87 · Pull Request #195 · stuartpittaway/diyBMSv4ESP32 · GitHub
Help with the operation and reading Shunt DYBMS vs Victron BMV 712.
For 10 days I have been away with the installation running and checking it a bit remotely. In this interval the battery has been discharged very little. In the last two months he had identified a deviation in the SOC reading between the two of 10% to which he had not attached importance. Yesterday I decided to do a test to discharge the battery a little more and stop the solar production of the inverter to force the discharge and the increase in deviation between the two readings has caught my attention (above the BMS SOC and below the BMV712 SOC, 73% in DIYBMS and 47% in BMV). Is such a deviation normal? How do you think I could force them to equalize a little more?
First make sure you are running the latest code on the BMS shunt and controller. There were several improvements made earlier this year.
After that, make sure the settings are the same between the two shunts and charge the battery to 100%
If you look at one of my videos, I compared the diybms shunt to victron and it was nearly identical in my tests.