Hi, I was trying to understand your source. I understand that the change from 2.048 to 1.250 doesnt affect source code because you always have the calibration factor to configure it in espController, does it?
I mean, if we calculate:
2048 and 475k and 402k, we have 2mv/adc and a resistor-divider’s factor of 0.458, so 4.363 (2/0.458)
b. 1250 and 68k and 27k, we have a 1.221 mv/adc and a resistor divider’s factor of 0.284, so 4.295 (1.221/0.284)
Both not are exactly the same (4363 vs 4295), I understant that this little difference is corrected with the calibration of voltages that we have to do the “first day”, isn’t it?
Hi, I am trying to work with a Wemos D1 mini and a Arduino Uno to test this great DIYBMS with arduino pro mini modules.
I have been fighting since yesterday. In order to avoid optocoplers problems I have connected directly TX and RX ports between Wemos D1 mini and Arduino Uno (and their grounds)
But not luck
Arduino is receiving a 37byte buffer instead a 38byte one, that is which Wemos sends.
The last two bytes of that 37byte buffer are the CRC, but I can’t identify well the first bytes.
So I suposse that I missing the first bytes or mixing it.
Does anybody knows how to debug a bit more, or where could be the problem?
I have only change the diybms_attiny841.cpp and .h files, and minor changes in main.cpp
I don’t know where to search.
May be an 16Mhz arduino is not compatible with 2400 baud rate? May be check with 1200 ?
There is a lot of code in the modules for controlling interrupts - especially the “wake on serial frame” I suspect that is causing problems when migrating to other ATMEL chips.
You could try commenting out all the “sleep” code.
If you are just playing with two devices at the moment no problem, but don’t connect to a battery/cell or you will start releasing the magic smoke without the optoisolators in place!
Yes, only two devices. Yes. I have do a lot of test, I think I have also test without sleep code, but I will try again. Sleep code is the place where I have been finding less information about.: how to wake up and atmega328 from sleep with UART. I am now reading about attiny841, I think it has “special aptitudes” to wake up from UART.
This is an example from Nick Gammon for atmega328 that works perfectly: https://arduino.stackexchange.com/questions/13167/put-atmega328-in-very-deep-sleep-and-listen-to-serial
Tomorrow I will try:
Repeat this try: no sleep code and not use software serial to debug (I have implement it)
change and use Software Serial as communication system and Hardware serial to debug. (@stuart may be you already know that it is impossible to use softserial, have you ever tried?)
Join RX pin in arduino with another pin (for example pin 2) and use pinChangeInterrupt stuff
Try simple sketch (blank one, nothing to do with diybms) to comunicate each other so I could begin a simple way, after add sleep code, after add … and so on.
I will post if I could get some improvement, I know that there are people also trying to use atmega chips.
If you have some soldering ability you should be able to put together the missing components after jlcpcb populates it with the SMDs they populate. I’ll likely make a video of the process so you can see how it goes. I’ve previously asked about kits but so far there isn’t one. The closest there is so far is getting jlcpcb to do as many SMDs as they can.
Its my understanding @stuart doesn’t want this to be commercialized like that. It is also worth noting that this is going through many changes as time goes on. When I first started getting interested in the project a couple of years ago from now is a big difference in the finished product. It would likely be better to learn how to troubleshoot change and adapt things. I’m not sure this is at a finished product stage yet. The older version likely is, but there are reasons that a redesign was done…
If you live in Florida, I may be able to help you with building it after this pandemic. If not, there are other makers and other places where you can get help with needed. Its important to note that it is a project at this time. As @stuart has mentioned previously, no promises are provided. It may work great for you, but it may not.
Hopefully you are able to participate though! Its an exciting project for sure with many cool features.
Dear @stuart did a great job for making such a cheap and amazing BMS for those who can not afford the batrium BMS
But I read all replies and comments by consuming two days nd concluded that this good BMS but not stable enough for the people like me who do not have enough time to watch the system on regular bases It’s almost 1 year you launched the great BMS but the no user even show that it’s working perfectly for someone getting the problem of resting the server for some the modules to stop working dear I want to implement it for 13s and nearly 80p what you suggest because its your product if I get the boards manufactured from a professional company
Hi Stuart, I have finally it working. (more or less )
Main problem is about delay between first dummy and the real one, and also the time that has the ArduinoUno module to wait for the real packet, and times between packets.
I think that it is because of the original BMS Attiny841 module has a LOW FUSE to use internal oscilator and so it only need 6 cicles to wake up from sleep, arduino uno has a LOW FUSE that use external crystal/osc to its start up time is about 1ms.
But I need to configure with much more time than that 1ms
I wi try to check with and arduino pro mini in which I will burn the equivalent LOW FUSE as in Attiny841. (internal oscillator)
At this time: controller’s website reports: 52 ignored errors, 2268 sent, 1918 recieved, roundTrip 350ms (only one module).
Is that ok, does it need to be 0 errores, and sent=recieved in a good system?
Hi, usually people with problems are who write and post in forums. But you can also great videos of youtube with people that have made this system in their own more than 1 and 2 years ago.
as it is “DIY” it is probably that sometimes you have to reset it, but i you dont want to be worried about it, go and buy a profesisonal system as Batrium. I think that what we can read, is always worst cases.
Regards,
Happy Easter! Thanks for that detailed response, I really appreciate it. I have several battery packs I have made out of recycled laptop batteries and I use a simple BMS balance board that works, but they are stand a lone and can not be monitored. If I want to develop what I have into a larger manageable system I need to be able to monitor it, so that is why I am looking around for something. I subscribe to Adam Welch’s Youtube channel and he uses v3 of this board and just did a review of v4. I did not know jlcpcb would provide some of the components soldered on the board, I have never ordered a pcb board so I will have to check it out. I need to look at all the github files and understand them, I know there is a management module/hub. I see the modules are connected together, but I did not see balance leads to all the cells, looks like just the main positive and negative of each battery pack and no balance leads for each cell, did I miss something? How does it do balancing?
I am in Auburn, WA, so about as far away from you as we can get and still be in the Continental US.
haha, very true regarding the distance. I hope to be able to travel again (I live in a converted bus when I’m not hiding from the pandemic) I like to hangout in the mid-west.
As far as specifics I just ordered all the stuff a couple days ago, so it will be awhile before I can give you a definitive answer. Anything else from me will just be a guess at this point.
The ordering process is all new to me as well. I’ve done a few projects here and there but I’ve resisted SMDs although I have used them before. I’ll likely post a video regarding my experiences and trials when I get that far.