Old BMS General Thread

Threads relating to the BMS system begun by Peter Perkins

Moderators: GregsGarage, retepsnikrep

User avatar
retepsnikrep
Posts: 1387
Joined: Sat May 26, 2007 4:50 pm
Location: North Yorkshire England
Contact:

Postby retepsnikrep » Tue Oct 21, 2008 10:58 am

Every day, well most days :wink:
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.

mattcarr
Posts: 389
Joined: Sat May 12, 2007 2:27 pm
Location: Hampshire

Postby mattcarr » Tue Oct 21, 2008 11:35 am

I think that I would love to have something like this for use in my Gwiz. I might have to read the whole forum again and see what it is that I need to get and to do. I do like the idea of a nice gadget like this sat on the dash giving me all sorts of information.
Apparently there is one available for the Gwiz, but it is limited as to what information it displays.

GregsGarage
Posts: 870
Joined: Tue Apr 01, 2008 5:27 pm
Location: Galashiels, Scottish Borders
Contact:

Postby GregsGarage » Wed Oct 22, 2008 11:59 am

mikep_95133 wrote:
retepsnikrep wrote:I agree it's an obscure Picaxe editor bug as the text always looks fine. No one reported this problem with the earlier version so it's a bit annoying.

Anyway you can just delete the REMED text or do some backspace hopscotch to get rid of what must be a hidden character causing the error :roll:

mikep_95133 wrote:Greg was also right that the power has to be off to the Slave board when the Picaxe Editor is first told to run. Then in the first couple of seconds, the power is then turned on and then the downloading to the Picaxe chip works fine.


This is not consistently true though :? for my 50 digital slaves it's not true at all as they see the download straight away and don't have to be powered off as described. Very odd but I suspect it's to do with the cheapo serial download system used which does not comply with the Serial PC standards but works on most machines (PC's) and is a bit of a fudge.

An enhanced serial download circuit is described in the Picaxe documentation, that may be more reliable, but I havent tried it.


I wonder how your slaves would program using the Analog software? I'll try the enhanced circuit to see how it does.

Mike


Hi Peter and Mike,

I have been away and have just been catching up on the thread. Lots of stuff been happening! 8)

Glad to see someone else found the weird editor problem and a solution.

The program download to the slaves requires the power to be off because of the slower clock timing that we have set. If you under or overclock the chips then the download software won't be able to communicate to it. By connecting the power after starting the download you catch the chip before the clock speed changes.

One feature I would like would be the mph to be larger, say over 2 lines if possible. I am thinking of mounting the master display as a replacement for my speedo. Am I correct in thinking the mileage info is saved even if the master is reset or powered off.
Greg Fordyce

Daewoo Matiz
http://www.evalbum.com/4191

User avatar
retepsnikrep
Posts: 1387
Joined: Sat May 26, 2007 4:50 pm
Location: North Yorkshire England
Contact:

Postby retepsnikrep » Wed Oct 22, 2008 2:56 pm

GregsGarage wrote:The program download to the slaves requires the power to be off because of the slower clock timing that we have set. If you under or overclock the chips then the download software won't be able to communicate to it. By connecting the power after starting the download you catch the chip before the clock speed changes.

One feature I would like would be the mph to be larger, say over 2 lines if possible. I am thinking of mounting the master display as a replacement for my speedo. Am I correct in thinking the mileage info is saved even if the master is reset or powered off.


Greg. Welcome back, can we have a sitrep with your setup when you get a chance. Have the cells died whilst you have been away etc!!! :shock:

I don't get the download issue on my slaves running at 8mhz.

The SV2000 video chip can't do double size characters on it's own ASFAIK.

I think someone would have to hard code something that looked like big numerals that we could call. You might be able to do something in the Master software but the display routines are memory intensive. What dimensions are normal characters? How are they made up?

If we imagine a subroutine which prints the big character below

serout Video,Baud9600,(27,83,X,0," ***")
serout Video,Baud9600,(27,83,X,1,"* *")
serout Video,Baud9600,(27,83,X,2,"* *")
serout Video,Baud9600,(27,83,X,3,"* *")
serout Video,Baud9600,(27,83,X,4," ***")

Note this does not appear correctly on the Forum :roll: But it does look like a big Zero and is 5x5.

You get something that looks a bit like a "0" if you then command the Master software to display those strings at a set cursor horizontal position (That's the number X) you could simulate a larger character. So we need someone to make up the characters 0-9 something like that. You want to be able to get a minium of two large characters side by side, and you would probably want some other info at bottom of screen. So remember total display area is 16chr x 9lines. I sugest use 5 wide and 5 high max (25 bytes) per character to see how that goes. Does that make sense? Good over to you!! :wink:

Further thoughts. If you look at the start of the Master program there is a 256 byte eprom table, I've used a few lines of it but it may be possible to store the BIG characters in this area, and then the routine to display them could be much smaller. If we define our characters as 5x4 (20bytes) then we could fit the numbers 0-9 in 200 bytes :shock:

Now I'm not sure how readable they would be but it's an idea. I could move the data out of there if needed. 5x5 characters would consume 250 bytes so that's as big as they could be if we use that method.

A for/next loop could retreive the charcaters from the eprom and build them on the screen. So we need a few characters to play with in various formats (Height/width) upto a max of 25 bytes per large character. Back to you again :D

The Mileage (miles) and Distance (feet) info is stored in eprom every time a mile rolls over, and is saved during a reset/power off. However the eprom is cleared during program download, so you must note the reading beforehand and edit the Software you are about to upload so it contains the old reading in the below line. If you want to keep it that is. The Master software checks the eprom stored value every time it runs, and if it = 0 then it loads the value in the line below as the starting number.

After you have run the new software once and the mileage has been written to the eprom then this number is ignored, as the stored eprom value no longer = 0. :D

"symbol OdoMeter = 0 ;Initial OdoMeter setting, used to set eprom saved Odo to this reading (Used if program updated)"


Edit

OK I cleared out the eprom table so here it is below. Now have a go at designing some larger charachters that fit the specs 5x5 and fit into the table space.

`*** Program Eprom Data Storage 0-255 bytes used for large LCD numbers 0-9 ***

TABLE 0,24 (" *** * ** ** * *** ");Store (0 Zero)
TABLE 25,49 (" ");Store data in eprom table (1)
TABLE 50,74 (" ");Store data in eprom table (2)
TABLE 75,99 (" ");Store data in eprom table (3)
TABLE 100,124 (" ");Store data in eprom table (4)
TABLE 125,149 (" ");Store data in eprom table (5)
TABLE 150,174 (" ");Store data in eprom table (6)
TABLE 175,199 (" ");Store data in eprom table (7)
TABLE 200,224 (" ");Store data in eprom table (8)
TABLE 225,249 (" ");Store data in eprom table (9)

The top one should produce a zero :wink: The display routine will chop the table entry for 0 into 5 byte chunks and display them one underneath the other on the screen to build the character.

Someone else have a go at building the other numbers please.
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.

GregsGarage
Posts: 870
Joined: Tue Apr 01, 2008 5:27 pm
Location: Galashiels, Scottish Borders
Contact:

Postby GregsGarage » Thu Oct 23, 2008 11:17 am

Ok Peter I will give it a go with making some 5x5 numerals. One question though, in the example you gave for a zero shown below I count 19 characters, 12 * and 7 spaces?

TABLE 0,24 (" *** * ** ** * *** ");Store (0 Zero)


Should I be making the actual characters 4x5 and where does the seperating space go, before or after the character? Does this space need to be in the character or not?

I have also had the idea that we could use different characters besides the "*". Thinking back to the days of the Sinclair ZX81 and similar computers, simple graphics were achieved by using special characters of different shapes. I can't find a character set on the speedchips website for the SV2000 video chip, but I did find this,http://www.asciitable.com/.

It might be possible to build numerals using say characters from ASCII codes 179 to 223 shown on the web site above, assuming they are the same as the SV2000 chip. Using these it may be possible to create readable numbers of say 3x3 size, leaving more room for other information on the display. For example a zero, using the ascii codes above, could be 201,205,187,186,32(space),186,200,205,188. This would give a 3x3 "0", for an "8" it could be 201,205,187,204,196,185,200,205,188.

You could also use the blocks to create a fuel gauge bar graph, or any other bar graph on your text display.

Of course all this depends on what the actual character set is of the SV2000, but it can be loaded with custom fonts.

Or the easy option would be to just put the mph on the top line with a blank line below it so that it stands out on its own, I should be able to fit a reasonably large display in place of the speedo.
Greg Fordyce

Daewoo Matiz
http://www.evalbum.com/4191

User avatar
retepsnikrep
Posts: 1387
Joined: Sat May 26, 2007 4:50 pm
Location: North Yorkshire England
Contact:

Postby retepsnikrep » Thu Oct 23, 2008 12:20 pm

Greg

The example does contain 25 characters but the forum does not display spaces correctly :roll: In the below example i have replaced the spaces with a hyphen.

-***-
*---*
*---*
*---*
-***-

The above would be created from this string "-***-*---**---**---*-***-"

It may be possible to use bits rather than bytes later to achieve the above so that would shrink the data by a factor of 8 :wink:

I have e-mailed the SV2000 chappie and he is sending me details of the supported ascii set, so we may get some useful block/shapes to use.

The loadable fonts sound a nightmare, he is sending me more details but they are only one line high, so just a different style rather than size.

You/we could make a simple for/next loop to send the ascii codes from 0-255 to the display chip to see what comes up!! Need to avoid (27) I think. I might try that tonight.
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.

GregsGarage
Posts: 870
Joined: Tue Apr 01, 2008 5:27 pm
Location: Galashiels, Scottish Borders
Contact:

Postby GregsGarage » Thu Oct 23, 2008 12:28 pm

O.k.,

I will work on a 5x5 character set for now, and wait and see what the full ascii set is for the chip.
Greg Fordyce

Daewoo Matiz
http://www.evalbum.com/4191

User avatar
retepsnikrep
Posts: 1387
Joined: Sat May 26, 2007 4:50 pm
Location: North Yorkshire England
Contact:

ASCII

Postby retepsnikrep » Thu Oct 23, 2008 4:06 pm

I ran a little program forcing the display to output all it's stuff, and here are two pics of the charcters the video chip can display :wink:

It's extended ascii code.

www.solarvan.co.uk/bms/Ascii1.jpg

www.solarvan.co.uk/bms/Ascii2.jpg

Numbers 219 - 223 look most useful to build solid big white numbers

http://www.cdrummond.qc.ca/cegep/inform ... ascii1.gif

http://www.cdrummond.qc.ca/cegep/inform ... ascii2.gif

Might be able to make them a bit smaller now. Over to you Greg!!

Someone must have done this before somewhere.

Image

There is probably a table we can download :?
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.

User avatar
retepsnikrep
Posts: 1387
Joined: Sat May 26, 2007 4:50 pm
Location: North Yorkshire England
Contact:

Postby retepsnikrep » Thu Oct 23, 2008 4:53 pm

We can also use the Picaxe 255 byte eeprom table like this to store the values/design of the characters. In my 5x5 (0 Zero) example it would look something like this with (32 = space) and (219 = white block)

EEPROM 0, (32,219,219,219,32,219,32,32,32,219,219,32,32,32,219,219,32,32,32,219,32,219,219,219,32)

EEPROM 25, (x,x,x,x,x,x, etc etc) This would be (1 One) and so on.
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.

GregsGarage
Posts: 870
Joined: Tue Apr 01, 2008 5:27 pm
Location: Galashiels, Scottish Borders
Contact:

Postby GregsGarage » Thu Oct 23, 2008 5:57 pm

Great stuff Peter,

I will work on some 3x3 characters using the blocks 219-223. I had made a start on 5x5 but will leave that for know.
Greg Fordyce

Daewoo Matiz
http://www.evalbum.com/4191


Return to “BMS thread”

Who is online

Users browsing this forum: No registered users and 47 guests