Page 38 of 62

Re: Old BMS Hardware Thread

Posted: Thu Jan 20, 2011 9:26 am
by GregsGarage
Hi Derek,

You might want to start a new thread for the 8 cell lead acid slave board. Had a quick look, don't fully understand it all.

Re: Old BMS Hardware Thread

Posted: Sat Feb 05, 2011 3:35 pm
by jackbauer
A few pics of the completed boards.

Re: Old BMS Hardware Thread

Posted: Sat Feb 05, 2011 4:53 pm
by retepsnikrep
Thats a lot of work Jack. Fingers crossed they all work out OK.

I will make changes to the master code to allow 5 second cell polling when on the mains charger to maximise cell balancing time. I need it for my 50 cell setup!

Still need more ideas for the accurate loop timer.

We can't use timer one and interrupts in the master code as that will interfere with the master serial bus. So may have to do Gregs watchdog hack with it's one second heartbeat and connect it to a spare input. Greg can you chip in link?

Re: Old BMS Hardware Thread

Posted: Sun Feb 06, 2011 11:04 am
by GregsGarage
The watchdog software is here. HEX file

It toggles pin 7 once per second and should be fully compatible with current master software. The idea is to connect pin 7 to an unused pin on the master, possibly one of the crystal pins shown in the schematic. Discussion of the 1 second timing loop starts here.

Re: Old BMS Hardware Thread

Posted: Sun Feb 06, 2011 3:12 pm
by retepsnikrep
Thanks for that Greg. Just noticed however it uses Timer1 which I think pulsin also uses :cry: That means the pulsin in will be corrupted I think. Have you tested this in a master board does the watchdog still time out?

I will be trying the 5 second charge balancing mod tomorrow. I've done some work on the other master code to disable balancing except when in charge mode. Not ready yet though.

Re: Old BMS Hardware Thread

Posted: Sun Feb 06, 2011 6:45 pm
by GregsGarage
I have that version on my master with no problems. If it does cause the watchdog to miss the odd watchdog pulse it won't matter much, the watchdog only needs to see one pulse every minutes or so. My testing so far has been limited.

I have been working on getting my battery packs wired up. Last week got all 4 battery boxes connected together and plugged in the Zivan for a few minutes. It works, pack voltage started to rise a little. Next step is to get all my slaves wires to the master, then the controller wired in. It's all getting very close to getting on the road. :D

Re: Old BMS Hardware Thread

Posted: Sun Feb 06, 2011 6:51 pm
by retepsnikrep
Greg the issue may be that it falsley thinks it has recd a pulse from the Master. If it keeps resetting pulsein it may never time out? Can you test this by say removing the master chip and powering up the board. The watchdog alarm should sound after x seconds.

Re: Old BMS Hardware Thread

Posted: Sun Feb 06, 2011 7:10 pm
by GregsGarage
When I tested it the watchdog triggered fine with no pulse, I just left it in a menu which stops the pulses from the master. So as far as I can tell it didn't affect your code at all. I don't know if I will get a chance this week to try it again. Are you up for testing it on one of your boards? It should have no effect on existing operation of the master, you should just see pin 7 on the watchdog toggle.

Re: Old BMS Hardware Thread

Posted: Sun Feb 06, 2011 7:20 pm
by retepsnikrep
OK i'll try it this week. I will be using pin RA4 which is pin 6 on left side of master pic to recieve the 1S pulses.

I think i have the code sussed.

The charger on balancing loop delay has been reduced to 3 seconds. This gives about 4 seconds for the entire loop, we have to keep the total delay (loop time) under 5 seconds or the slaves serial inputs will timeout. I should have set them to 10 seconds :shock: oh well in the next version i will!! :roll:

Once an alarm turns off the charger the loads are also turned of on the slaves, and the master reverts to fast mode. (No balancing)

When charger is active master operates in slow mode controlling loads as reqd. Balancing is only active when charging.

Re: Old BMS Hardware Thread

Posted: Sun Feb 06, 2011 7:34 pm
by GregsGarage
retepsnikrep wrote:OK i'll try it this week. I will be using pin RA4 which is pin 6 on left side of master pic to recieve the 1S pulses.


Try the watchdog software first with a known working version of the master before doing any changes to the master software. You just want to be sure it doesn't affect the master in any way while still doing it's watchdog functions.