DIY Electric Car Forums banner

eltek charger canbus communication through bluetooth,

43K views 100 replies 13 participants last post by  urgi 
#1 ·
I have an eltek charger and i have connected it to a Bluetooth ODB 2 scanner
via the can interface.

I have got it to connect to the module using hyper terminal in windows at least i think it has. It gives numbers when the charger is connected to the mains and i issue the ATMA command....

This is the first time i have done any work with can and i am a bit stumped. :confused:

I dont know how to send a message to the charger to enable it. I have attached a load and want to see if i can power it up and control voltage and current.

I have the protocol http://www.evolveelectrics.com/PDF/Eltek/Eltek CANbus Protocol.pdf

I just need some guidance, can anyone help me?
 
#5 ·
its a Vgate OBD scan, its a little blue box. I was actually planning on getting an usb to can.

I have no idea whether it will work either but it was a freebie so i thought i would give it ago.

I dont know how to convert to hex and how to format correctly with msb and lsb

would i type 02ff or 0x2ff?

then 0 or 1 to enable

how do i work out the next values?

the next two bytes are charger power reference in % divided by 10 so if i wanted 10% the next number i would put in would be 01?
 
#7 · (Edited)
Hi,

So i suppose you use an elm327.

For an elm327 you need to
-at least define the can speed: AT SP6 (speed 500 kb/s, header 11bits)
-monitor the bus: AT MA
-before sending commands, define the header AT SH 00 03 00. I suppose you don't know the charger number, so 0x300 is a broadcast header
-then you can send commands to the charger in order to control voltage/power/enable. 8 bytes need to be send, according eltek power charger doc. These 8 bytes are send in hexa
After sending, usually elm327 stop receiving. So you have to send AT MA after each sending.

(I have not tested all I have write above...Don't have a power charger and don't like elm327. But this could be ok :D)

Eltek Doc:
2.1 Charger control
The EV Powercharger is controlled by the charger control message. The charger control message instructs the charger to turn on/off, deliver a specified amount of
power and not exceed the provided DC voltage and current limit.
Once an EV Powercharger receives a charger control message it starts transmitting its status messages. If the charger suddenly stops receiving charger control messages
from the control system it considers itself logged off . When logged off the charger stops sending status messages and turns off (CHARGER_ENABLE = 0). The charger
communication timeout is 1 second after the last received charger control message.
CAN identifier: Broadcast: Base CAN identifier
Individual charger control: 1 + base CAN identifier + (charger address – 1) * 16 (individual charger control)
Length: 7 bytes
Reception interval: 1000 ms (used for communication timeout)
Sender: Control system
Receiver: Charger
Bit 7 (MSB) Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 (LSB)
Byte 7 RESERVED
Byte 6 CHARGER_MAXDCCURRLIMIT_MSB
Byte 5 CHARGER_MAXDCCURRLIMIT_LSB
Byte 4 CHARGER_MAXDCVOLTLIMIT_MSB
Byte 3 CHARGER_MAXDCVOLTLIMIT_LSB
Byte 2 CHARGER_POWER_REFERENCE_MSB
Byte 1 CHARGER_POWER_REFERENCE_LSB
Byte 0 CHARGER_ENABLE
Table 1 Charger control message
Signal Description Min Max Data conversion
CHARGER_ENABLE Turns the charger on or off (PFC and DC/DC on/off) 0 1 Physical = (HEX)
CHARGER_POWER_REFERENCE Power reference demand in percent of maximum power 0.0% 100.0% Physical = (HEX / 10) [%]
 
#8 ·
Hello all

Yes Tomdb you are right it would be much easier with a CAN to USB, I have on order a module similar to what you linked, its good advice.

z_power this is also a good idea, i do need to learn programming, but i cant help feel like i would be better off getting someone to do it for me, if im going to use the charger i think it would be best to use it with a simple microprocessor rather than windows, can i ask how you have programmed the charger to deactivate when full?

Planitare

The ATI command gives LM327 ver 1.4 or something similar

I set the can speed to 500kbs and 11bits through the ATSP command

the ATMA command gives a chain of numbers starting in 350 which i assume is the broadcast header you speak of.

I think i am actually communicating with the charger, its just what i am entering is gibberish as i don't know the correct syntax and i dont understand MSB and LSB, if i put in stuff starting with 02ff there is communication betwen the module and the charger, i presume its sending an error message saying the data entered is not valid.

What i really need is an example.

the charger is controlled by "ox2ff" would i enter 02ff, 02 ff or 02xff?

the next part is just a zero or a 1 to enable or disable the charger.

say if i wanted a max voltage of 250V and a current of 1 amp what would i write next?

The datasheet says its HEX/10 does that mean i divide the voltage i want by 10 and convert to hex or times the voltage by 10 and convert to hex?

do i need spaces between each of the bytes?

Thankyou all for your suggestions and help :D its much appreciated.
 
#9 · (Edited)
Can you give the data the charger send 03 50 ...... ?

When using a can bus you have to send two groups of numbers:
-header (11 bits for the Eltek powercharge)
-data 1 to 8 bytes

11 bits is completed up to 12 with a zero and then send in hexa: xyz (3 numbers/letters). For exemple 2FF for broadcast (or 300 for the charger number 1). Don't send a "x" like 0x2FF. Just send 3 hexa, each for 4 bits. (It was wrong in my previous message)

With some dongle (for exemple canusb) the header and the data are send in one command line
With elm327 I think you have to send first the header with the command AT SH xyz (xyz=3 numbers/letters for the header). Exemple AT SH 2FF
Then send the data in an other line in hexa.

I think the line is 01 E8 03 VV VV CC CC 00
-01 for enable
- E8 03 for the max power range 0 to 1000 decimal, 1000=100%, so 0000 to 03E8 in hexa but you have to reverse 03 and E8
- max current same coding as power. For 1 amp send 10 decimal so 00 0A hex then remplace CC CC by 0A 00
- max voltage same coding as power. I suppose that for 250v send 2500 decimal so 09C4 then remplace VV VV by C4 09
- I am not sure you need to send the last 00.

So the command could be 01 E8 03 C4 09 0A 00 00 or 01 E8 03 C4 09 0A 00

After sending the data send AT MA and you will receive three responses: Status1 Status2 and Error. Hope these 3 messages will not be lost betwen you send the 7-8 bytes data and the following AT MA.

I can not test all this so, I am absolutly not 100% sure.

You have to send more then at least once a second the data 7-8 bytes. If not the charge is stopped.
I think you don't need to repeat the AT SH command. I believe it is stored in the elm327 and automaticaly send.
 
#11 ·
hi, Big mother whale

I found this on Elithion:
Code:
Transmit to charger anchor
ID     Bytes    Byte 0          Byte 1 Byte 2   Byte 3 Byte 4   Byte 5 Byte 6
2FFh	7	Enable (1)	Max power (2)	Max voltage (3)	Max current (4)

Notes:
Period: 100 ms
Control flags. Only 1 bit is used, all others are 0:
Bit 0: 1 to enable charging; 0 to disable charging
Maximum power [0.1 %] little-endian
Fixed at 100 %
Maximum DC output voltage [100 mV] little-endian
Set to the pack voltage when all the cells are full and balanced (Max cell voltage x number of cells in series)
Maximum DC output current [100 mA] little-endian
Set at the Charge Current Limit

Receive from charger anchor
The BMS controller looks for battery current information on the CAN bus from a single charger. 
(If multiple chargers are used, and they use different CAN IDs, the BMS can only read current from only one charger.)


ID	Bytes	Byte 0	Byte 1	Byte 2	Byte 3	Byte 4	Byte 5	Byte 6	Byte 7
305h	8		Current (1)	

Notes:

[100 mA], + = into battery, little-endian.
So I think my previous post is ok.:) Forget the 7 after the 2FFh because this is the length of the data (Enable, Power, Voltage, Amperage). Elm327 send it automaticaly. So I think the data is 7 bytes, not 8 so you have to send 01 E8 03 C4 09 0A 00

:)
 
#12 ·
I have tried what you suggested and i cant get it to work, everything seems to check out and i think what you have worked out is correct, I have a can to usb on order im sure it will work with what you suggest with that.

thank you for your help you have been most kind.

I will let you know when the can to usb arrives and tell you how i get on with it.
 
#13 ·
This is strange, planetaire's instructions seem OK and should do the job.

I'd start with listening to te bus - powered charger sends periodic (~1 sec.) message with its serial number and base CAN ID. Even without your own activity you should read this msg from the bus. If your device doesn't read valid messages try changing bus speed setting, your charger might have had it altered in the past from standard 500 kbps to one of the others possible.

Do you have oscilloscope? It IS very hepful :) First part of this publication: http://www.keil.com/download/files/canprimer_v2.pdf is a good tutorial on CAN basics and gives some good debugging hints.
 
#14 ·
The ATMA command gives the serial number without a problem.

350 10 10 71 12 58 09
the first bit is the address? the second part is written on the outside of the charger.

i seem to have one way communication at least.

i do have a scope yes i could use it to check if anything is being sent from the module.

I hope im inputting the right commands, it could be user error.
 
#17 ·
In my opinion what you send is ok. Just repeat severall times per second the
01 E8 03 C4 09 0A 00 enter

But what you receive is strange for me:

...350 10 10 71 12 58 09
the first bit is the address? the second part is written on the outside of the charger....
How can you get 350 ? According eltek powercharge doc this would be 308 318 ...3E8...3F8.
And you would receive 8 bytes not 6.

Is 10 10 71 12 58 09 the serial number of you device ?
 
#16 ·
Yes this could be it. i had a look to find if there was any way to repeat the command after a time interval but i found nothing.

this is what im inputting in hyperterminal once i have connection:

AT SH 2FF folowed by enter

i get an OK

01 E8 03 C4 09 0A 00 enter

is this correct?

it seems to either say "no data" or it repeats the serial number.
 
#19 ·
I have now got a USB to can bus module like the one suggested.

It reads from the charger, and gives the same as the Bluetooth module. with 350 and the charger serial number for the data

I have tried entering 2ff in the ID and 01 E8 03 C4 09 0A 00 in the data and
repeating it on a cycle every second, i am still getting nothing from the charger,

I have a meter connected to it to measure its output

i can post some screenshots of how i have set it up, im not sure what i am doing wrong :confused:
 
#22 ·
If you think there is a modified can base adress, remember that if the charger send his serial number at 350h, you should send at 350h-8 =348h the voltage and so on.

But 2ff is a broadcast so all charger would use it.

And you receive only 6 bytes, so this is not what is described in the power charger doc.
So is there several model of power charger ?
Or your power charger have been re configured ? for example active can protocol (0=car , 1=eltek). Or header 29 bits not 11.

You could also try to receive some read only parameters.
protocol version, Charger version
 
#25 · (Edited)
This looks strange, doesn't comply with available pdf document from Eltek. This message you're reading should contain 8 bytes of data. As planetaire suggested there may be different protocol enabled; did you try mentioned 0x348 id for control?

edit: your setting of standard vs extended shouldn't change anything about received frames but i'm not 100% sure now...
 
#26 · (Edited)
I would too send normal frames, not extended. With Id=348h on top of your screen. Also less then 1000mS between two send.
Use "send a single frame"

I don't have infos about your can usb dongle. Is it able to receive and send "at the same time" unlike the elm327 ?

Try also to receive infos from the charger, protocol version, charger version ...

Have you connected a load on the charger ?
 
#27 · (Edited)
Sorry about the delay have been busy with xmas i hope you all have had good holidays.

Yes there is a load on the charger, but i have seen people power them up with just a multi meter attached to the output, i did think about under voltage protection but i cant imagine this to be the case.

I have had a good play and couldn't get a response from the charger so i looked about on the internet and found this on a brammo forum

http://brammoforum.com/index.php?topic=2791.msg21594#msg21594

therer is a guy there called athlon who says

"first packet required by an Eltek is a "login to charger" and contains the charger serial number and ID. after the logi you can control an Eltek by regular packet but you need to specify the charger Id"

there is also a screenshot of some can packets sent and received.

Also This charger might be OEM i got it cheap on ebay and there seems to be a surplus from the BMW i3 which could be an important bit of info.

any suggestions on how to "login"?
 
#28 · (Edited)
They use a Eltek Flatpack. I use too several 2kW of them. But you have a Eltek Powercharge.
Yes the Flatpack need a login. But not the powercharge in standard mode.

Also This charger might be OEM i got it cheap on ebay and there seems to be a surplus from the BMW i3 which could be an important bit of info.
I my opinion you explain why you receive only 6 bytes : they use a special protocol. May be bmw proprietary. (With a flatpack we receive 8 bytes, the can bus speed is 125 kb/s and the header have 29 bits)

So you have to find this protocol, or may be it is possible to reverse the protocol to Eltek one, this is describe in the power charge doc.
 
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top