DIYBMS v4

oke i will look in to that tomorrow. can you tell me how to set the fuses or where to find that?
i mean by that what are the setting for the cpu like clock speed scalers etc? if you dont know the setting by heart what i guess you dont :p, pleas tell where i can find this.
i can fix this manuel in atmel studio then i dont have to do an new upload.

Kind regards
jency

The values are in platformio.ini file as I mentioned.

; lfuse = 1110 0010 = CKDIV8 & Calibrated Internal 8MHz Oscillator
; hfuse = 1101 0110 = EESAVE & 1.8V BOD detection level
; efuse = 1111 0100 = ULPOSCSEL2/ULPOSCSEL1/ULPOSCSEL0/BODPD1/BODPD0
board_fuses.lfuse = 0b11100010
board_fuses.hfuse = 0b11010110
board_fuses.efuse = 0b11110100
1 Like

Just for information, this is the new controller design I’ve been looking at. It fixes a number of issues people have had and also improvements requested.

Please don’t ask about availability - its going to take a long time to get this working reliably and doesn’t “physically” exist yet. It may not work!

It has…

  • ESP32 - both DevKitC and Pico supported
  • Interface for CANBUS
  • Interface for RS485
  • A large colour touch screen (optional)
  • Eight I/O lines
  • Two ports for modules - allowing up to 128 modules on 1 controller
  • Two mechanical relays + it will likely have two or more solid state relays
  • DIN rail mounted case
  • ISP programming port for automatically programming the modules/shunt etc (no need for platformio or usbasp adapter)

All of the above is interfaced to the ESP32 using SPI interface and every available I/O pin is used!

13 Likes

:crazy_face:

That board looks pretty nice, you likely will want to add a couple reverse current protection diodes on the power inputs just in case.

It might make sense to add a footprint for the CAN connection to be an RJ45 since that is what a few of the charge controllers use (pin 1 and 2 IIRC).

hi @stuart,

I think this is correct but i am not 100% sure can you verify?
when i tried this fuse setting i still dont have it connecting to the module.

Edit:: BODPD must be disabled but it still didnt work when disabled.
i feel i am so close but getting frustrated right now hhaah

Kind Regards
Jency

Looks very nice.
I have a small concern about display. It looks like a good feature, however, if controller board is powered directly from battery it might create an unnecessary load. I do not know how much current such display is using, but maybe it would be a good idea to make it switchable? Like add a button (probably hardware switch) to turn it on/off?

The display is about 40mA and is completely optional, I may not even support/write code for it, but its a frequently requested feature so I’d like to include it on the controller just in case.

The display has a touch interface so I can use that instead of physical buttons to power it off when not in use/idle. It also supports a sleep mode to save power. The backlight is also driven from a PIN so I can switch that off.

1 Like

The values need to be

board_fuses.lfuse = 0xE2
board_fuses.hfuse = 0xD6
board_fuses.efuse = 0xF4

You shouldn’t need to mess with the AtmelICE program. Platformio fully supports the AtmelICE programmer if that is what you have Atmel-ICE — PlatformIO latest documentation

i know it should work. but i keep getting this error: avrdude: jtag3_open_common(): Did not find any device matching VID 0x03eb and PID list: 0x2141

Same problem here, with a fix…

https://www.avrfreaks.net/forum/atmel-ice-avrdude-cannot-find-device

That new controller spec certainly looks nice - rs485 would be nice for me as I just received docs for the renogy charge controller I’m using from them (and the time issue isn’t a problem as it’ll take me a decent chunk of time to implement the interface to the controller - there’s a lot there.

Stuart, great work on the shunt! I can’t wait until that is a bit further along. I’m even more excited about the possibility of an upgraded controller board!

I’ve got an interesting one for you. I am using both MQTT and Influx. Influx shows 16 cells, MQTT only shows 15. It is missing the last cell. The webpage and influx all show every cell. MQTT is just missing the last one. All the other voltages line up when comparing the other 2 data sources. It is the final cell that just won’t display.

I took a brief look at the code, but as nobody else seems to have an issue I didn’t know if it was just a weird quirk or if I should try flashing it again.

Also, is there an easy way to reset the wireless credentials without re-flashing a controller?

I am curious why someone wants an LCD.

Also, isn’t the LCD a perfect candidate for a daughter card or cable connected thing? Doesn’t the LCD want to be some distance from the controller/modules?

If the concern is security, then I see no reason why the code can’t be updated to have a login and even https. I would do this, but I see no need. I have a wifi router and it is secure.

If I were you (@stuart) , I would not want the hassle of code for an additional user interface.

Hi Tom are you running the latest code, that was release a few weeks ago? The one with the dark theme.

You can reset the WiFi credentials from the controller. If you reboot it and wait for the led to light, you now have 3 seconds to connect the 2 WiFi rst pins together.

OMG yes such a relieve, i took me quit some time to get it running but it finaly worked.
Thx for your support @stuart

Probably because of the same reason that you wants to have INAs. For someones particular case this feature might be exactly so vital as INAs for you. (A place without a router: a shed in the forest, RV, Boat without any Wi-Fi/internet).

1 Like

Great, well done

I think I got code from before that. I’ll upgrade.

Ahh okay. I recall reading about that at one point but I must have forgotten about it.

Is there any harm to the device to send an MQTT update when the system refreshes instead of every 30 seconds?

Hello,
I have successfully flashed 20 ATTINY modules but the ESP controller (Wemos D1 mini Pro was a FAKE 4MB) despite the change board_build.ldscript = eagle.flash.4m1m.ld it just flashes and I can see it but not address it in the browser