Re SOC. That's a good idea but lets get it working as is for now then consider that. I need a timing routine for an other project so must get to grips with timer1
Did you remember to change the pull down resistors on your slaves?
We have to remember the slaves operate the optos using sink driven outputs. They idle high.
So when the slave pic ouputs are high the optos are off. This is used as it works better at lower cell voltages.
The master is not the same and uses source drving i.e. Output low opto off.
I'll try and look again at this today with my multi slave board and half a dozen cell. Peter
Old BMS Software Thread
Moderators: GregsGarage, retepsnikrep
- retepsnikrep
- Posts: 1387
- Joined: Sat May 26, 2007 4:50 pm
- Location: North Yorkshire England
- Contact:
Re: Old BMS Software Thread
Regards Peter
Two MK1 Honda Insight's. One running 20ah A123 Lithium pack. One 8ah BetterBattery Nimh pack.
One HCH1 Civic Hybrid running 60ah A123 Lithium pack.
Two MK1 Honda Insight's. One running 20ah A123 Lithium pack. One 8ah BetterBattery Nimh pack.
One HCH1 Civic Hybrid running 60ah A123 Lithium pack.
- retepsnikrep
- Posts: 1387
- Joined: Sat May 26, 2007 4:50 pm
- Location: North Yorkshire England
- Contact:
Re: Old BMS Software Thread
I tried this this morning with 8 cells on bench no problems at all. Used same sofware i uploaded yesterday.
Seems to work very well Current consumption per slave is <1ma
I like the fail safe way it cuts the load if Master dies but can still bring it back on if cell V goes over 3.85V.
Seems to work very well Current consumption per slave is <1ma
I like the fail safe way it cuts the load if Master dies but can still bring it back on if cell V goes over 3.85V.
Regards Peter
Two MK1 Honda Insight's. One running 20ah A123 Lithium pack. One 8ah BetterBattery Nimh pack.
One HCH1 Civic Hybrid running 60ah A123 Lithium pack.
Two MK1 Honda Insight's. One running 20ah A123 Lithium pack. One 8ah BetterBattery Nimh pack.
One HCH1 Civic Hybrid running 60ah A123 Lithium pack.
-
- Posts: 870
- Joined: Tue Apr 01, 2008 5:27 pm
- Location: Galashiels, Scottish Borders
- Contact:
Re: Old BMS Software Thread
Problem is on my end then.
I did change the pull down resistors and they worked with the pulse software. I'll reprogram the slaves again, maybe one of them didn't program correctly. Don't know if I will have time to do it today.
I did change the pull down resistors and they worked with the pulse software. I'll reprogram the slaves again, maybe one of them didn't program correctly. Don't know if I will have time to do it today.
Greg Fordyce
Daewoo Matiz
http://www.evalbum.com/4191
Daewoo Matiz
http://www.evalbum.com/4191
- retepsnikrep
- Posts: 1387
- Joined: Sat May 26, 2007 4:50 pm
- Location: North Yorkshire England
- Contact:
Re: Old BMS Software Thread
OK try these, cosmetic changes mainly, but i did remove the Master pauses as they are not reqd as long as you have at least two or more slaves.
http://www.solarvan.co.uk/bms/PBP_SERIA ... 220910.txt
http://www.solarvan.co.uk/bms/PBP_SERIA ... 220910.hex
http://www.solarvan.co.uk/bms/PBP_SERIA ... 220910.txt
http://www.solarvan.co.uk/bms/PBP_SERIA ... 220910.hex
Greg I have sent your button kit.
My Master and 8 slaves is still sitting there happily on the bench chugging away
This master has no sort of timing routine in it now for the main loop. In the short term it will be easiest to just scope the master watchdog pulses once you have all your cells attached/running and calculate how much of a pause we need to add to make the main loop execute once per second. Not rocket science but good enough.
http://www.solarvan.co.uk/bms/PBP_SERIA ... 220910.txt
http://www.solarvan.co.uk/bms/PBP_SERIA ... 220910.hex
http://www.solarvan.co.uk/bms/PBP_SERIA ... 220910.txt
http://www.solarvan.co.uk/bms/PBP_SERIA ... 220910.hex
Greg I have sent your button kit.
My Master and 8 slaves is still sitting there happily on the bench chugging away
This master has no sort of timing routine in it now for the main loop. In the short term it will be easiest to just scope the master watchdog pulses once you have all your cells attached/running and calculate how much of a pause we need to add to make the main loop execute once per second. Not rocket science but good enough.
Regards Peter
Two MK1 Honda Insight's. One running 20ah A123 Lithium pack. One 8ah BetterBattery Nimh pack.
One HCH1 Civic Hybrid running 60ah A123 Lithium pack.
Two MK1 Honda Insight's. One running 20ah A123 Lithium pack. One 8ah BetterBattery Nimh pack.
One HCH1 Civic Hybrid running 60ah A123 Lithium pack.
-
- Posts: 870
- Joined: Tue Apr 01, 2008 5:27 pm
- Location: Galashiels, Scottish Borders
- Contact:
Re: Old BMS Software Thread
retepsnikrep wrote:OK try these, cosmetic changes mainly, but i did remove the Master pauses as they are not reqd as long as you have at least two or more slaves.
I will try the version you have working first. My plan is to pull all the pics and insert them one at a time, testing each one as I go.
Thanks.Greg I have sent your button kit.
This master has no sort of timing routine in it now for the main loop. In the short term it will be easiest to just scope the master watchdog pulses once you have all your cells attached/running and calculate how much of a pause we need to add to make the main loop execute once per second. Not rocket science but good enough.
I suspect that it would take the same time to do a quick and dirty solution as to code in some sort of timing routine. We need to start a timer and pause the loop until 1 second has passed since the last time through. This is how the amp hour calculations are done in my motor controller, except that they force the loop to run at 1000hz so it actually counts amp/milliseconds! I might have a look tonight and see what is available for timing in the pic.
Greg Fordyce
Daewoo Matiz
http://www.evalbum.com/4191
Daewoo Matiz
http://www.evalbum.com/4191
- retepsnikrep
- Posts: 1387
- Joined: Sat May 26, 2007 4:50 pm
- Location: North Yorkshire England
- Contact:
Re: Old BMS Software Thread
Just time the watchdog stay alive pulses and add a pause so we get one a second.
It's not that easy to implement a 1s timer in PBPRO as the chip is running at 8mhz and max time period for Timer1 is less than half a second. Plus I suspect timer1 is being used in the background my some of the pcbpro commands so we could corrupt it!
It's not that easy to implement a 1s timer in PBPRO as the chip is running at 8mhz and max time period for Timer1 is less than half a second. Plus I suspect timer1 is being used in the background my some of the pcbpro commands so we could corrupt it!
Regards Peter
Two MK1 Honda Insight's. One running 20ah A123 Lithium pack. One 8ah BetterBattery Nimh pack.
One HCH1 Civic Hybrid running 60ah A123 Lithium pack.
Two MK1 Honda Insight's. One running 20ah A123 Lithium pack. One 8ah BetterBattery Nimh pack.
One HCH1 Civic Hybrid running 60ah A123 Lithium pack.
-
- Posts: 870
- Joined: Tue Apr 01, 2008 5:27 pm
- Location: Galashiels, Scottish Borders
- Contact:
Re: Old BMS Software Thread
Was looking on the pbp forums for some timer ideas and found these. The first one is a clock routine that you include in the program and the second one had an idea using timer2 near the bottom of the post.
http://www.picbasic.co.uk/forum/showthread.php?t=190&highlight=elasped+time
http://www.picbasic.co.uk/forum/showthread.php?t=10571
I think the timer2 solution might have merit, will have to look a little closer at it.
http://www.picbasic.co.uk/forum/showthread.php?t=190&highlight=elasped+time
http://www.picbasic.co.uk/forum/showthread.php?t=10571
I think the timer2 solution might have merit, will have to look a little closer at it.
Greg Fordyce
Daewoo Matiz
http://www.evalbum.com/4191
Daewoo Matiz
http://www.evalbum.com/4191
- retepsnikrep
- Posts: 1387
- Joined: Sat May 26, 2007 4:50 pm
- Location: North Yorkshire England
- Contact:
Re: Old BMS Software Thread
Greg you are welcome to look at the timer ideas. I've spent (wasted) quite a bit of time getting my head round it and just breaking the code so I'll be going for a pause added to make the loop once a second Unless you come up with a working routine that is. Also there is not much code space left and a pause will only take two bytes leaving some spare for any other tweaks.
Regards Peter
Two MK1 Honda Insight's. One running 20ah A123 Lithium pack. One 8ah BetterBattery Nimh pack.
One HCH1 Civic Hybrid running 60ah A123 Lithium pack.
Two MK1 Honda Insight's. One running 20ah A123 Lithium pack. One 8ah BetterBattery Nimh pack.
One HCH1 Civic Hybrid running 60ah A123 Lithium pack.
-
- Posts: 870
- Joined: Tue Apr 01, 2008 5:27 pm
- Location: Galashiels, Scottish Borders
- Contact:
Re: Old BMS Software Thread
I can see now that I was wrong, it is indeed a bit more complicated than it looks.GregsGarage wrote:I suspect that it would take the same time to do a quick and dirty solution as to code in some sort of timing routine.
The simple pause will be the way to go. I would expect that the number of slave will affect this value. What do you think about making this adjustable in one of the menus?
Got the buttons today, thanks Peter.
Greg Fordyce
Daewoo Matiz
http://www.evalbum.com/4191
Daewoo Matiz
http://www.evalbum.com/4191
-
- Posts: 870
- Joined: Tue Apr 01, 2008 5:27 pm
- Location: Galashiels, Scottish Borders
- Contact:
Re: Old BMS Software Thread
I found the problem with my slaves, one of the pics wasn't programmed correctly. So the question is which version should I use? At the moment I have version 15 of the master and version 6 in 7 of the slaves. Should I go for the newer version 16 for the master and version 7 for the slaves?
Greg Fordyce
Daewoo Matiz
http://www.evalbum.com/4191
Daewoo Matiz
http://www.evalbum.com/4191
Who is online
Users browsing this forum: No registered users and 19 guests