Quote:
Originally Posted by E27006
Reading through Drive excel spreadsheet, there are a few instances of b3 26 27 and instances of b3 06 47 on Mettsci
Peter, if you send either of those that strings to the gauge, do they illuminate upshift or downshift indicators?.
|
I'll try that Malcom this week. But I would expect that data to come from ECM which does not communicate on METSCI bus.
I've now sorted a caluculate checksum routine which works thanks! Randy, I understand that now as well.
Quote:
b0 = $E6 ;Calculate Checksum Routine
b1 = $40
b2 = b0 + b1 ;Add all bytes of packet together b2 = value + value + value + value etc
b2 = NOT b2 ;NOT result
b2 = b2 + 1 ;Add 1 to result
b2 = b2 AND $7F ;AND result and checksum in b2
|
I've just captured a short video for youtube of gauge under my control!!!!! LOL
Audio is rubbish. Sorry!
http://www.youtube.com/watch?v=Q9-Qda-6to4
My 18X Picaxe basic code for the gauge driver is here in case anyone wants to take a look. (Ignore Warning!)
http://www.solarvan.co.uk/insight/ME...040709_V11.txt
Thinking ahead now about removing the BCM what comms will I need?
I'll need to capture the messages from the MCM to the BCM on METSCI.
I will need to send messages to both the Gauge/BCM on METSCI and the MCM on BATTSCI.
So I think I need three or four RS485 serial channels.
1) Receive from MCM on METSCI. This is only 10 x 3 byte packets with 100ms gap between packets so 18X can probably cope with this.
2) Transmit to Gauge on METSCI. As above 10 x 3 byte packets with 100ms packet gap. In fact I might try just sending E1 (Soc) and E6 (Assist/Regen) codes on METSCI bus to see if gauge just ignores fact B4 & B3 code packets are missing. I'll also try to work out the max refresh rate, can I send more Soc packets per second, in fact can we send back to back packets for instant gauge response? Again 18X can cope with this. In fact 18X may just sit in between i.e.
METSCI MCM ---> Picaxe18X ---> BCM & GAUGE
It can forward BCM specific data to BCM but also drive gauge with our own data!!
3) Transmit to MCM on BATTSCI bus. This is more complicated 2 x 12 byte packets with 16ms packet gap. So probably need a 28X2 as the data will have to be modified on fly depending on info from BMS current etc.
I could of course leave the BCM in situ but insert the 28X2 into the BATTSCI between them.
BATTSCI BCM ---> Picaxe28X2 ---> MCM
4) It looks at data comming in from BCM and BMS and then sends out to MCM. Keeping the current readings comming in from BCM and simply forwarding, that but sending modified soc/voltage data as reqd!! Similar to METSCI above.
Looks like this all requires four RS485 channels, probably an 18X for METSCI and 28X2 for BATTSCI.
I might start on a pcb for this later this week.