ULtra Compact 1800W charger + Eltek programming

Batteries, Chargers, and Battery Management Systems.
dakoal   1 µW

1 µW
Posts: 3
Joined: Nov 04 2016 2:42am

Re: ULtra Compact 1800W charger + Eltek programming

Post by dakoal » Oct 10 2018 12:10am

jean0 wrote:
Jun 09 2018 9:17am
Ian, You're great! The bigger is NCP1015 switcher, the smaller is BC817 transistor.
I replace them, hope it will solve my problem...
Thanks a lot, buddy.
Hi,

I have 4 dead Flatpacks, not opened yet.
jean0, did you ever bring the Flatpack2 back to life with the 2 parts?

Best regards
Bernhard

grumble & grunt   1 µW

1 µW
Posts: 1
Joined: Oct 06 2018 2:14pm

Re: ULtra Compact 1800W charger + Eltek programming

Post by grumble & grunt » Oct 10 2018 12:09pm

Hi,
Just want to say a massive thanks to all who contributed in getting these gizmos running.
Remmie... you're a demi-god.

First time I've loaded code into anything and I've got a programmable, grunty supply for my battery bank.

Grassy arse.

Camon   100 µW

100 µW
Posts: 9
Joined: Nov 18 2017 6:31pm

Re: ULtra Compact 1800W charger + Eltek programming

Post by Camon » Oct 14 2018 9:12am

Hello again. today I tried again to program the voltage. I have put 122 ohm in can h and can l of arduino leonardo and another r of 122ohm in pcb of eltek. the amber led lights but the voltage does not rise

pm_dawn   100 W

100 W
Posts: 150
Joined: Jan 17 2009 3:36pm
Location: Östersund, Sweden

Re: ULtra Compact 1800W charger + Eltek programming

Post by pm_dawn » Oct 15 2018 12:22am

Hi !
Try to measure the resistance over the bus when both the leonardo and eltek is powered off.

It should be about 60ohms.

If if is lower than that remove the 120 at the Eltek Side.

I only have a resistor at my CAN2USB tool when communicating with the Eltek.


Give that a try.

Regards
/Per

Hayds13   1 mW

1 mW
Posts: 17
Joined: Dec 25 2014 12:48pm
Location: Sydney, Australia
Contact:

Re: ULtra Compact 1800W charger + Eltek programming

Post by Hayds13 » Oct 15 2018 12:33am

Hello Camon,
I can see from previous posts you've checked the serial number is in your code...excellent.
Have you tried some basic code that will just get the status from the canbus via Arduino? ie...is it talking? (There are some examples in this thread...but if you need me to repost, let me know).
My PCB breakout board came incorrectly labelled on the canbus pins. you might want to check yours.
My Arduino Leonardo will talk to the flatpack with the terminator connected or disconnected...So I don't think it's that critical.
I have a few flatpacks. All of them (except one) set the voltage correctly. The one that doesn't goes over the set voltage by about 1.7v from memory. So if I set it to maximum, I think it gets upset goes to default. You might want to try and set a lower voltage and see if it works?

pm_dawn   100 W

100 W
Posts: 150
Joined: Jan 17 2009 3:36pm
Location: Östersund, Sweden

Re: ULtra Compact 1800W charger + Eltek programming

Post by pm_dawn » Oct 15 2018 1:31am

Hi Camon !

As Hayds13 says if you have my 60A board for the 3kw units the CAN connection port is labelled wrong.

I have set fixed voltage on a number of units now.
About 15-20 units.
I have had one unit behaving a bit strange.
But I think that it was mostly just that the unit was off in calibration and also had a slow walk in progress.

Are you trying to use fixed setting or continues CAN setting?

Best Regards
/Per

Camon   100 µW

100 µW
Posts: 9
Joined: Nov 18 2017 6:31pm

Re: ULtra Compact 1800W charger + Eltek programming

Post by Camon » Oct 16 2018 10:47am

[/quote]
Hello everyone, thanks for your answers.
pm_dawn wrote:
Oct 15 2018 1:31am
Hi Camon !

As Hayds13 says if you have my 60A board for the 3kw units the CAN connection port is labelled wrong.

Are you trying to use fixed setting or continues CAN setting?

Best Regards
/Per
Currently I do not have any pcb to connect, I connect two wires directly on the ELTEK pcb.
What do you think whit fixed setting or continues can setting? I use these code.

Code: Select all

// Eltek Flatpack Permanent Voltage changer, Code By RHO


#include <mcp_can.h>
#include <mcp_can_dfs.h>
#include <SPI.h>

const int SPI_CS_PIN = 17;                                                          // Set CS pin to pin 17
MCP_CAN CAN(SPI_CS_PIN);                                                            // Set CS pin for CANBUS shield

void setup()                                                                        // Initialisation routine
{
  pinMode(23, OUTPUT);                                                                // Set pin 9 to output (backlight of the LCD)
  digitalWrite(23, HIGH);                                                            // LED on
  delay(250);
  digitalWrite(23, LOW);

START_INIT:

    if(CAN_OK == CAN.begin(CAN_125KBPS))                                            // init can bus : baudrate = 125k !!
    {
    }
    else
    {
    delay(100);
    goto START_INIT;
    }
    unsigned char login[8] = {0x14, 0x49, 0x72, 0x00, 0x31, 0x66, 0x00, 0x00};     //this is the serial number of the Flatpack + 2 [quote=Hayds13 post_id=1418753 time=1539581632 user_id=41294]
Hello Camon,
I can see from previous posts you've checked the serial number is in your code...excellent.
Have you tried some basic code that will just get the status from the canbus via Arduino? ie...is it talking? (There are some examples in this thread...but if you need me to repost, let me know).
My PCB breakout board came incorrectly labelled on the canbus pins. you might want to check yours.
My Arduino Leonardo will talk to the flatpack with the terminator connected or disconnected...So I don't think it's that critical.
I have a few flatpacks. All of them (except one) set the voltage correctly. The one that doesn't goes over the set voltage by about 1.7v from memory. So if I set it to maximum, I think it gets upset goes to default. You might want to try and set a lower voltage and see if it works?
[/quote]added bytes of 00 each)
    CAN.sendMsgBuf(0x05004804, 1, 8, login);                                       //send message to log in and assign ID=1 (last 04 means ID=1, for ID=2 use 05004808 ) 

    unsigned char setdefaultvolt[5] = {0x2B, 0x15, 0x00, 0x44, 0x16};              //this is the command for setting the default output voltage (Last two bytes, LSB first). 16 80 is the maximum voltage of 57.6 V
    CAN.sendMsgBuf(0x05009C02, 1, 5, setdefaultvolt);                              //send message to set ouput voltage to all Flatpacks connected to the CAN-bus
digitalWrite(23, HIGH); 
}

void loop()                                                                        // main program (LOOP)
{                                                                                  // nothing to do :)
}

I tested only with the two 100ohm and 22ohm resistors (I bought 120ohm resistors and I wait it)
Hayds13 wrote:
Oct 15 2018 12:33am

My Arduino Leonardo will talk to the flatpack with the terminator connected or disconnected...So I don't think it's that critical.
I only see the amber LED light up when I have the jumper connected
Hayds13 wrote:
Oct 15 2018 12:33am
You might want to try and set a lower voltage and see if it works?
Hi I try to change the value of voltage to 57Volts 1644HEX and nothing
Hayds13 wrote:
Oct 15 2018 12:33am
Hello Camon,

Have you tried some basic code that will just get the status from the canbus via Arduino? ie...is it talking? (There are some examples in this thread...but if you need me to repost, let me know).
I don't have any idea to get the status can you help me?
pm_dawn wrote:
Oct 15 2018 12:22am
Hi !
Try to measure the resistance over the bus when both the leonardo and eltek is powered off.

It should be about 60ohms.

If if is lower than that remove the 120 at the Eltek Side.

I only have a resistor at my CAN2USB tool when communicating with the Eltek.


Give that a try.

Regards
/Per
I measure with the polymeter in the terminals of the aruino leonardo and I measure 60,56 ohm

Hayds13   1 mW

1 mW
Posts: 17
Joined: Dec 25 2014 12:48pm
Location: Sydney, Australia
Contact:

Re: ULtra Compact 1800W charger + Eltek programming

Post by Hayds13 » Oct 16 2018 11:29pm

Hi Camon,

I've edited your code example with commands I used to set to 50.2v. When I try to set my flatpack to 57v in code, it actually goes to over-volt protection shuts down because it goes much higher.

Code: Select all

#include <mcp_can.h>
#include <mcp_can_dfs.h>
#include <SPI.h>

const int SPI_CS_PIN = 17;                                                          // Set CS pin to pin 17
MCP_CAN CAN(SPI_CS_PIN);                                                            // Set CS pin for CANBUS shield

void setup()                                                                        // Initialisation routine
{
  pinMode(23, OUTPUT);                                                                // Set pin 9 to output (backlight of the LCD)
  digitalWrite(23, HIGH);                                                            // LED on
  delay(250);
  digitalWrite(23, LOW);

START_INIT:

    if(CAN_OK == CAN.begin(CAN_125KBPS))                                            // init can bus : baudrate = 125k !!
    {
    }
    else
    {
    delay(100);
    goto START_INIT;
    }
//  unsigned char login[8] = {0x14, 0x49, 0x72, 0x00, 0x31, 0x66, 0x00, 0x00};     //CAMON this is the serial number of the Flatpack + 2 added bytes of 00 each)
    unsigned char login[8] = {0x15, 0x44, 0x71, 0x02, 0x11, 0x66, 0x00, 0x00};     //HB this is the serial number of the Flatpack + 2 added bytes of 00 each)
    CAN.sendMsgBuf(0x05004804, 1, 8, login);                                       //send message to log in and assign ID=1 (last 04 means ID=1, for ID=2 use 05004808 ) 

//  unsigned char setdefaultvolt[5] = {0x2B, 0x15, 0x00, 0x44, 0x16};               //???? INCORRECT ??? this is the command for setting the default output voltage (Last two bytes, LSB first). 16 80 is the maximum voltage of 57.6 V
    unsigned char setdefaultvolt[5] = {0x29, 0x15, 0x00, 0x9C, 0x13};               // 50.2V
//  CAN.sendMsgBuf(0x05009C02, 1, 5, setdefaultvolt);                               //???? WRONG COMMAND ???? send message to set ouput voltage to all Flatpacks connected to the CAN-bus
    CAN.sendMsgBuf(0x05019C00, 1, 5, setdefaultvolt);                               //send message to set ouput voltage to all Flatpacks connected to the CAN-bus

digitalWrite(23, HIGH); 
}

void loop()                                                                        // main program (LOOP)
{                                                                                  // nothing to do :)
}

Hayds13   1 mW

1 mW
Posts: 17
Joined: Dec 25 2014 12:48pm
Location: Sydney, Australia
Contact:

Re: ULtra Compact 1800W charger + Eltek programming

Post by Hayds13 » Oct 16 2018 11:38pm

Hi Camon,

This code should set your flatpack temporarily to 50.2v and 14a. You need to change the serial numbers in two places. Upload to Arduino Leonardo and power the Arduino off/on. Then use the serial monitor to see status

Example
04 1A 00 00 A3 13 F1 00 2C
Temperature = 26
Current = 0.00
OutputVoltage = 50.27
OutputPower = 0.00
InputVoltage = 241


Your flatpack will only have green led n, when this is running.

Code: Select all

#include <mcp_can.h>
#include <mcp_can_dfs.h>
#include <SPI.h>

const int SPI_CS_PIN = 17;
MCP_CAN CAN(SPI_CS_PIN);                                                              // Set CS pin for CANBUS shield
#define INT32U unsigned char
void setup()                                                                          // Initialisation routine
{
    Serial.begin(115200);                                                             // Sets the data rate in bits per second (baud) for serial data transmission to PC.
    delay(1000); 
START_INIT:

    if(CAN_OK == CAN.begin(CAN_125KBPS))                                              // init can bus : baudrate = 125k !!
    {
        Serial.println("CAN BUS Shield init ok!");
    }
    else
    {
        Serial.println("CAN BUS Shield init fail");
        Serial.println("Init CAN BUS Shield again");
        delay(100);
        goto START_INIT;
    }
     unsigned char stmp3[8] = {0x15, 0x44, 0x71, 0x02, 0x11, 0x66, 0x00, 0x00};       // ***** Serial number
       CAN.sendMsgBuf(0x05004804, 1, 8, stmp3);                                       //send message to log in
       delay(10);   
       unsigned char stmp4[8] = {0x14, 0x00, 0x9C, 0x13, 0x9C, 0x13, 0x3E, 0x17};     //this is the command for changing the output voltage 50.2v 14A
       CAN.sendMsgBuf(0x05FF4004, 1, 8, stmp4);                                       //send message to set ouput voltage to all chargers connected to the CAN-bus
      Serial.print("Output Voltage set to : ");
      Serial.println(stmp4[3]*256*0.01+stmp4[2]*0.01);
     
}

void loop()                                                                           // main program (LOOP)
{
    unsigned char len = 0;
    unsigned char buf[8] ;
    if(CAN_MSGAVAIL == CAN.checkReceive())                                            // check if data coming
    {

        CAN.readMsgBuf(&len, buf);                                                    // read data,  len: data length, buf: data buf
          INT32U canId = CAN.getCanId();                                              // read the CAN Id
          Serial.print("0");                                                          // leading zero 
          Serial.print(canId,HEX);                                                    // output CAN Id to serial monitor
          Serial.print("\t");                                                         // send Tab
        for(int i = 0; i<len; i++)                                                    // print the data
        {
            if( buf[i] < 0x10){ Serial.print("0");} Serial.print(buf[i],HEX);         // send a leading zero if only one digit
            Serial.print(" ");                                                        // space to seperate bytes
        }
       Serial.println();
       Serial.print("Temperature = ");
       Serial.println(buf[0]);                                                        //first byte is temperature in celcius
       Serial.print("Current = ");
       Serial.println(buf[2]*256*0.1+buf[1]*0.1);                                     // third (msb) and second byte are current in 0.1A (deciamp) calculated to show directly in Amps
       Serial.print("OutputVoltage = ");
       Serial.println(buf[4]*256*0.01+buf[3]*0.01);                                   // fifth (msb) and fourth byte are voltage in 0.01V (centivolt) calculated to show directly in Volts dc
       Serial.print("OutputPower = ");
       Serial.println((buf[4]*256*0.01+buf[3]*0.01)*(buf[2]*256*0.1+buf[1]*0.1));     // Power is calculated from output voltage and current. Output is in Watts
       Serial.print("InputVoltage = ");          
       Serial.println(buf[5]);                                                        // sixth byte is input voltage in volts ac/dc
//send request for new update

       unsigned char stmp3[8] = {0x15, 0x44, 0x71, 0x02, 0x11, 0x66, 0x00, 0x00};     // *** this is the serial number of the unit
       CAN.sendMsgBuf(0x05004804, 1, 8, stmp3);                                       //send message to request updated figures and keep being 'logged in' or the charger defaults to 53.5 V
       

    }
 

}

/*********************************************************************************************************
  END FILE
*********************************************************************************************************/

Camon   100 µW

100 µW
Posts: 9
Joined: Nov 18 2017 6:31pm

Re: ULtra Compact 1800W charger + Eltek programming

Post by Camon » Oct 17 2018 7:35am

Image
Hayds13 wrote:
Oct 16 2018 11:29pm
Hi Camon,

I've edited your code example with commands I used to set to 50.2v. When I try to set my flatpack to 57v in code, it actually goes to over-volt protection shuts down because it goes much higher.

}[/code]
It works¡¡¡¡¡ wow amazing first I programed to 50.2v and works :O before I programed to maximun value 1680 and it works.
Thank you, thank you so much finally I can do a 4kw charger for mi zero DS.
What is the diference between your code and mine?

Hayds13   1 mW

1 mW
Posts: 17
Joined: Dec 25 2014 12:48pm
Location: Sydney, Australia
Contact:

Re: ULtra Compact 1800W charger + Eltek programming

Post by Hayds13 » Oct 17 2018 3:57pm

Awesome Camon! Glad to hear you got it working.

Here are the main difference in code:

unsigned char setdefaultvolt[5] = {0x2B, 0x15, 0x00, 0x44, 0x16}; // (Old) setting the default output voltage
unsigned char setdefaultvolt[5] = {0x29, 0x15, 0x00, 0x9C, 0x13}; // (New) 50.2V
CAN.sendMsgBuf(0x05009C02, 1, 5, setdefaultvolt); // (Old) send message to set output voltage to the CAN-bus
CAN.sendMsgBuf(0x05019C00, 1, 5, setdefaultvolt); // (New) send message to set output voltage to the CAN-bus

User avatar
multifrag   10 W

10 W
Posts: 84
Joined: Feb 19 2016 5:44am
Location: London, UK

Re: ULtra Compact 1800W charger + Eltek programming

Post by multifrag » Oct 21 2018 7:55am

I'm trying to figure out which of the 4 pins on the flatpack S are can L and H. I have flatpack HE working and used this image for pinout, but for flatpack S I can't find a similar image. Closest I could find is this and it looks like Can L and H are suppose to be pins 3 and 4. Just wanted to check if my assumptions are correct.


Edit: Finished soldering it up and yep, my guess was correct. Just need to fit the oled and esp32 inside.

User avatar
eee291   10 kW

10 kW
Posts: 616
Joined: Nov 05 2015 4:35pm
Location: Austria, Burgenland: Güssing

Re: ULtra Compact 1800W charger + Eltek programming

Post by eee291 » Oct 26 2018 4:08pm

I found this floating around and thought someone might want this as some kind of documentation at least.
:arrow:
Attachments
Eltek CANbus Protocol.pdf
(114.2 KiB) Downloaded 20 times

pm_dawn   100 W

100 W
Posts: 150
Joined: Jan 17 2009 3:36pm
Location: Östersund, Sweden

Re: ULtra Compact 1800W charger + Eltek programming

Post by pm_dawn » Oct 29 2018 1:53am

Hi eee291 !

That documentation does not apply to the Flatpack2 HE recitfiers but for the EV chargers.
They can be found here:
https://evolveelectrics.com/collections/chargers

The IP21 look very similar to the Flatpack2HE but they have totally different CAN- protocol.

Best REgards
/Per

Post Reply