ULtra Compact 1800W charger + Eltek programming

VERY GLAD you have succeeded and also because it confirm that the flatpack S have the same commands then the flatpack 2 HE

I don't have info in order to limit the amperage :oops: . But you could do this with the voltage limit.
Juste a loop that read the amperage and change the voltage limit.

In my previous post I don't have time to explain the 3 voltages.
The first voltage is the output voltage measured by the system controler. If you don't have this info use the second voltage
the second voltage is the one you want to be the output voltage rectifier
the third is the internal overvoltage protection limit for the rectifier. (Non volatile). I use the same as the 1 and 2. Max is 59.5V.
It is also possible to decide that ramp-up will be in 5 seconds or 60 seconds. The command I give was for 5 seconds.

Here is the info I have in order to permanently change the default voltage (Doesn't work in my device)
It is the output voltage when you are not logged or logged off.

If not logged when sending the command, this is a broadcast command:
header 05 00 9C 02 data length 5 : 2B 29 00 LL MM
LL MM is the voltage (same coding as before)
Also you can send header 05 01 9C 02 and the same 5 bytes
This to send only to the rectifier # 01.

This new voltage will be used after a power off/on.


If logged, and your device have id=01 send:
header 05 01 9C 00 date length 5 : 29 29 00 LL MM
In this case, the rectifier must send you a respons.



I suppose that the LSB is send before Msb as previous. But in the doc there is a mistake and they write Lsb for both bytes. :oops:

If you succeed, please tell us.

:D
 
Had some more time yesterday and today to play around with the Flatpack S

Unfortunately the permanent voltage trick did not work.

However i have found the way to limit the current.

I made a testsetup with 4 Yuasa 12Volt 12 Ah Leadgell batteries in series. At 57.5 Volt maximum output of the flatpack S this would mean a 14.3 Voltage for the each battery which is excellent for testing.
On one of the first runs the flatpack was only charging with 25.60 Amps while the voltage was only 54 Volts so room to spare. At first I was a little disappointed that it could only output 1400 Watts instead of the advertised 1800 W and 33.6 Amps.

Turns out that the maximum current is also in the same string as the voltage setting

String for voltage setting : "send 05 FF 40 04 header and 8 bytes AA BB CC DD EE FF GG HH"

Where :
BBAA (in HEX!) is the maximum current setting (I have set it at A2 01 for 41.8 Amps (1820 Watts divided by 43.5 Volt which is the lowest voltage setting)
DDCC (in HEX!) is the system voltage measurement (no idea what it really does but i have set this the same as th e output voltage setting so 80 16)
FFEE (in HEX!) is the output voltage in centivolts (0.01V) (I have set this at 80 16 for 57.6 Volt which is the highest voltage setting)
HHGG (in HEX!) is the overvoltage protection setting (I have set this at 3E 17 for 59.5 Volts)

So the complete string for setting the maximum voltage (57.6V) and maximum current is : 05 FF 40 04 header and 8 bytes A2 01 80 16 80 16 3E 17

Unfortunately i have only 1 Flatpack S charger and i need 2 to test this on my Zero SR.
If anybody has a one for sale, Let me know :D
 
I finally got a straight answer out of the chinese suppliers on Alibaba - there is no supply of Flatpack S in the chinese market. They suggested I contact the local distributor :lol:

Typical deceptive bullshit, given that there are Flatpack S rectifiers specifically advertised.

Fantastic work remmie!
 
remmie1972 said:
Had some more time yesterday and today to play around with the Flatpack S

Unfortunately the permanent voltage trick did not work.

However i have found the way to limit the current.

I made a testsetup with 4 Yuasa 12Volt 12 Ah Leadgell batteries in series. At 57.5 Volt maximum output of the flatpack S this would mean a 14.3 Voltage for the each battery which is excellent for testing.
On one of the first runs the flatpack was only charging with 25.60 Amps while the voltage was only 54 Volts so room to spare. At first I was a little disappointed that it could only output 1400 Watts instead of the advertised 1800 W and 33.6 Amps.

Turns out that the maximum current is also in the same string as the voltage setting

String for voltage setting : "send 05 FF 40 04 header and 8 bytes AA BB CC DD EE FF GG HH"

Where :
BBAA (in HEX!) is the maximum current setting (I have set it at A2 01 for 41.8 Amps (1820 Watts divided by 43.5 Volt which is the lowest voltage setting)
DDCC (in HEX!) is the system voltage measurement (no idea what it really does but i have set this the same as th e output voltage setting so 80 16)
FFEE (in HEX!) is the output voltage in centivolts (0.01V) (I have set this at 80 16 for 57.6 Volt which is the highest voltage setting)
HHGG (in HEX!) is the overvoltage protection setting (I have set this at 3E 17 for 59.5 Volts)

So the complete string for setting the maximum voltage (57.6V) and maximum current is : 05 FF 40 04 header and 8 bytes A2 01 80 16 80 16 3E 17

Unfortunately i have only 1 Flatpack S charger and i need 2 to test this on my Zero SR.
If anybody has a one for sale, Let me know :D

What happens if you try to command a voltage higher than the maximum, with a lower amperage to keep the total wattage low?
I need to hit 66.4v for this to be useful to me...
 
Hi

Setting a voltage higher than 57.6 results in a voltage of 57.6 so no luck if youvwould want to use it for anything higher. Same goes for lower than 43.5 . It just outputs 43.5

// 00 10 should be 40.96 returned is 43.8 measured is 44.0
// 00 11 should be 43.52 returned is 43.7 measured is 43.6
// 00 12 should be 46.08 returned is 46.2 measured is 46.1
// 00 13 should be 48.64 returned is 48.8 measured is 48.7
// 00 14 should be 51.20 returned is 51.3 measured is 51.2
// 00 15 should be 53.76 returned is 53.8 measured is 53.8
// 00 16 should be 56.32 returned is 56.4 measured is 56.4
// 80 16 should be 57.60 returned is 57.0 measured is 56.9
// 00 17 should be 58.88 returned is 57.7 measured is 57.6
// 00 18 should be 61.44 returned is 57.7 measured is 57.6
[\quote]
 
Is that the power supply?http://m.ebay.co.uk/itm/ELTEK-VALERE-FLATPACK2-HE-48-2000V-48v-Rectifier-module-/262060988963?_trkparms=aid%253D222007%2526algo%253DSIC.MBE%2526ao%253D1%2526asc%253D20150519202351%2526meid%253D5feb11a817e946dbb1976563f7e93d7f%2526pid%253D100408%2526rk%253D1%2526rkt%253D1%2526sd%253D281812197972&_trksid=p2056116.c100408.m2460
 
Hi all.

I have a very good news.
I have several rectifiers and have permanently changed their default voltage. :lol:

To do this you have to:
-log your device as already explained
-send then only one command.
This is the command with an example:
header 05 01 9C 00
data length 5
29 15 00 FE 10

01=Rectifier Number 01
FE 10 = 43.50 volts, same codage as already explained.

After this command wait until the rectifier log off.
You will see the output voltage going to the new default value, in my case 43,50V
Then power it off.

That's all. The mod is permanent.

I do this with no load on the output (No battery).

P.S. There was a wrong value on the doc I previously received.
 
Can you permanently set them for ~58v output?

Do they go CC mode or hick-up mode when voltage gets pulled down below the set voltage?
 
CONFIRMED.

This also works on a Flatpack S rectifier.
Default voltage set to 57.6 Volt (highest it is capable of) and it does go into constant current mode. Tested this with 4 pcs 12V 12Ah leadgell batteries in series.

Great work Planetaire !!
By the way you can also use header 05 00 9C 00 data length 5 : 29 15 00 LL HH with LL the low Byte of the voltage setting and HH for the High byte of the voltage setting (which is in centivolts)
This way it sends out a broadcast and you don't need the ID number of the charger.

[strike]Didn't[/strike] tested if it would work without logging in. [strike]Probably not though.[/strike] Nope doesn't work. You have to log in first, which makes sense.

So for 57.6 Volts use header 05 01 9C 00, data length 5 and data bytes 29 15 00 80 16 (1680 HEX = 5760 => 57.6 Volts) be sure to use Extended CAN-BUS mode (29 bits identifier), 125 kbps busspeed and all bytes in HEX format (should be obvious from the 9C and the 2B anyway :D ).

Here's the arduino code i used :

EDIT : THERE WAS A SCREWUP ON MY PART IN THE CODE, I used the wrong message which was previously given. The code is correct now.

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

const int SPI_CS_PIN = 10;                                                          // Set CS pin to pin 10 (could be 9 for other CANshields)
MCP_CAN CAN(SPI_CS_PIN);                                                            // Set CS pin for CANBUS shield

void setup()                                                                        // Initialisation routine
{

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, 0x14, 0x71, 0x11, 0x08, 0x20, 0x00, 0x00};     //this is the serial number of the unit + 2 added bytes of 00 each, sernr on the unit reads 141471110820)
    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] = {0x29, 0x15, 0x00, 0x80, 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(0x05019C00, 1, 5, setdefaultvolt);                              //send message to set ouput voltage to all chargers connected to the CAN-bus
}

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

/*********************************************************************************************************
  END FILE
  Voltage settings 
  80 16 => 1680 HEX = 57,60 Volt (= highest possible voltage
  E6 14 => 14E6 HEX = 53,50 Volt (= factory set voltage)
  FE 10 => 10FE HEX = 43,50 Volt (= lowest possible voltage)
*********************************************************************************************************/
 
That's super exciting news gentlemen! Great work pulling of hacking the power supplies so elegantly!
 
I just got quoted 750 euros for a single Flatpack S 1800W ex shipping and with no waranty by Eltek Germany :shock: OUCH!
 
remmie1972 said:
I just got quoted 750 euros for a single Flatpack S 1800W ex shipping and with no waranty by Eltek Germany :shock: OUCH!


I got mine for 100$ on ebay.. but these are rare.

If you buy them directly from Eltek rep these come to about 400$ CAD for the world most compact and powerfull rectifier of 47W/cu in

Btw thanks guys for the great work regarding the hack!!

Doc
 
400 CAD$ is about 275 euros so Eltek Germany is rippping me off :twisted:

275 euro's is a price I would consider reasonable for such a small but powerfull charger.
 
This is awesome. I just wish I didnt need two of them to hit my voltage needs.
 
Note that while the Flatpack2's are no doubt a great PSU they are *not* the ones that are primarily being discussed in this thread. The Flatpack S is much smaller/lighter but of course much harder to get ahold of at reasonable prices.

Not trying to rain your parade Roadrash, just want to make sure people don't get confused with the very similar naming schemes.
 
In my projet I have connected several elteck flatpack 48v serialy, needing more then 57.5v dc.

So i am sure that the can bus is not isolated from the output.
Unlike the 110vdc and 220vdc versions of the flatpack 2.

So be carefull.
 
2 of these plus the onboard charger would make a pretty boss ~5kW charger for J1772. $800 bucks isn't bad for that solution would be totally worth it!
 
Anyone found cheaper source for HE S 1800W model?

Also how to set current limit for these units? Voltage controls fine, but it does not react to current commands.

Also is it possible to disable output by default, when there is no CAN comm?
 
circuit said:
Anyone found cheaper source for HE S 1800W model?

Also how to set current limit for these units? Voltage controls fine, but it does not react to current commands.

Also is it possible to disable output by default, when there is no CAN comm?


No more info yet.. this product is very recent and popular info about it are very low. My friend and i are playing with CANbud with few Eltek.

Once we have more info we will post these.

Doc
 
Some more info about the Flatpack communication protocol. This works for both a Flatpack 2 HE and a Flatpack S

0x05014400
During walk-in (the period where the voltage builds up slowly) the rectifier periodically (every 10 seconds or so) sends out the following message when it's not logged in :
05014400 is the identifier and the serial number is the message followed by 00 00
Walk in can be chosen to be either 5 seconds long or 60 seconds long. For charging my Zero I have opted for the 60 second walkin. It helps current spike when plugging in.

So in case of of my rectifier (ser nr 141471110820) it is
0x05014400 0x14 0x14 0x71 0x11 0x08 0x20 0x00 0x00 (all HEX numbers)

If you respond ONCE with 0x05004804 0x14 0x14 0x71 0x11 0x08 0x20 0x00 0x00 (serial number + 2 bytes 00) the rectifier sends out exactly 64 messages with the status every 0,2 seconds (or so) before reverting to sending 0x05014400 again every 10 seconds without status messages. If you send the same 0x05004804 again before those 64 messages are up, the rectifier sends out another 64 messages. So in summary, if you send the response command at least every 10 seconds the rectifier stays logged in and keeps sending status messages.

the status messages are (like described earlier in the thread) :
0x05014010 AA BB CC DD EE FF GG HH where
AA is the intake temperature in Celcius
BB is the output current Low Byte
CC is the output current High Byte. the current high and low byte combined give the current in deci amps (* 0.1 Amp)
DD is the output voltage Low byte
EE is the output voltage High Byte. the voltage high and low byte combined give the voltage in centivolts (* 0.01 Volt)
FF is the input voltage Low Byte
GG is the input voltage High Byte. the input voltage high and low byte combined gives the AC input voltage in volts
HH is the output temperature in Celcius

after the walk in period is reached the status messages change to :
0x05014004 AA BB CC DD EE FF GG HH when the rectifier is in normal (Constant voltage) mode
0x05014008 AA BB CC DD EE FF GG HH when the rectifier is in Constant Current mode (current-limiting)
0x0501400C AA BB CC DD EE FF GG HH when the input voltage is low (mains plug pulled)

however, during this stage every 10th message is different. The rectifier sends out a message :
0x0500NNPP 1B JJ KK LL MM NN PP 00
NN and PP are the last 2 bytes of the serial number. This has stumped me during diagnostics. I had my code perfect for 1 rectifier and the other was different. Unit i had the messages from 3 rectifiers and i saw the common link :)
The 1B as the first byte of the message is sometimes a 1C (don't know why).
I believe this is a request from the rectifier to keep being "logged in"


So in short
when the identifier starts with 0x0500 you have to reply with serial number which is containd in the message (do keep in mind that with a 0x05004400 the serial number is the first 6 bytes of the message and with 0x0500NNPP the serial number is the second till the seventh byte (shifted 1 byte)

when the identifier starts with 0x0501 it's a status message (and even the identifier shows different statuses)


All the above is just to keep being logged in and receive status messages.
There are (as explained earlier in the thread also ways to control the rectifier)

If it has send a message 0x05004400 or 0x0500NNPP (NNPP last 2 bytes of serial number) you can respond with a message to alter the voltage and even the maximum current setting.
First you have to send a response 0x05004804 with the serial number as message (just to keep it logged in)
Second you send the message
0x05FF4004 AA BB CC DD EE FF GG HH where
AA is the max current Low Byte
BB is the max current High Byte
CC is the voltage measured Low Byte (set it the same as the desired voltage Low byte)
DD is the voltage measured High Byte (set it the same as the desired voltage High byte)
EE is the desired voltage Low byte
FF is the desired voltage High byte
GG is the over voltage protection Low byte
HH is the over voltage protection High byte

example
If i send 0x05FF4004 0x64 0x00 0x44 0x16 0x44 0x16 0x3E 0x17
it sets the max current to 10.0 amps (0064 in HEX is 100 is 10.0 Amps)
it sets the voltage output to 57.0 Volts (1644 in Hex is 5700 is 57.00 Volts)
it sets the over voltage protection limit to 59.5 Volt (173E in Hex is 5950 is 59.50 Volts)

I Think the rectifier remembers this setting as long as it's logged in, so in theory you would only have to send this command once (but keep sending the log in command periodically (0x05004804 with the serial number)

The 0x05FF4004 is for a 5 second walk in period (after 5 seconds the output voltage reaches it's goal
if you substitute this with 0x05FF4005 (last 4 change to a 5) the walk in period will be 60 seconds. This is stored in non volatile memory and is active from that moment on every time you switch on the rectifier.

I send the command for the max current and output voltage every time I see a log in request (identifier starts with 0x0500) As said this probably is not necessary but I do switch the canbus to another rectifier sometimes so I have to send it more often.

Also keep in mind that if the rectifier loses contact with the controller (i.e. you don't send any answers) the rectifier will revert to it's original settings (default voltage and maximum current)

For those interested I have changed the code on my arduino as follows. It has automatic serial number detection and status message decoding. I've optimised it as far as possible with my average programming skills but is does the job I want it to do. It has an LCD for showing the message (2x16 characters), it shows any unknown identifier and message (which i have not seen yet), and has a pushbutton to control the maximum current. It sets it initially to 10.0 amps and with every push of the button it adds another 10 Amps. After it has reached 40 Amps and you push the button again it reverts back to 10.0 Amps. The display shows the chosen current output.

Happy Tinkering All :)

Code:
// from rectifier : (requests for logins)
// 05014400 + ser nr + 00 00 from rectifier  : HELLOOW where are you ! rectifier sends 05014400 and 6 bytes serial number and followed by 00 00 (login request)
// 0500xxyy + 1B + ser nr + 00 is send during normal voltage every second. xxyy is the last 2 bytes from the serial number
// after either of these send 05004804 every 5 seconds ! to keep logged in. rectifier does not send login requests so after 10 second the numbers stop until 05014400 is sent
// from rectifier : (status messages)
// 0501400C + status data : walkin and below 43 volts (error) and during walk-out (input voltage low)
// 05014010 + status data : walkin busy 
// 05014004 + status data : normal voltage reached
// 05014008 + status data : current-limiting active

// send TO rectifier (act as controller)
// 05004804 + ser nr + 00 00 from controller : send 05004804 and 6 bytes ser number followed by 00 00 
// 05FF4004 controller sends current and voltage limits (last 4 is 5 sec walk-in, for 60 second walk-in use 05FF4005)
// 05FF4005 controller sends current and voltage limits (last 5 is 60 sec walk-in, for 5 second walk-in use 05FF4004)

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

const int SPI_CS_PIN = 10;
word maxcurrent = 0x64;                                                              // set initial maxcurrent to 10A output
unsigned char len = 0;
unsigned char serialnr[8];
int msgreceived;
MCP_CAN CAN(SPI_CS_PIN);                                                             // Set CS pin for CANBUS shield
LiquidCrystal lcd(1, 3, 4, 5, 6, 7, 8);                                              // LiquidCrystal(rs, rw, enable, d4, d5, d6, d7)  or LiquidCrystal(rs, enable, d4, d5, d6, d7) 

void setup()                                                                         // Initialisation routine
{
 pinMode(A0, INPUT);                                                                 // Set pin A0 to input (pushbutton)
 digitalWrite(A0, HIGH);                                                             // activate pull-up on A0
 pinMode(9, OUTPUT);                                                                 // Set pin 9 to output (backlight of the LCD)
 digitalWrite(9, HIGH);                                                              // Backlight enable
  lcd.begin(16, 2);                                                                  // splash screen on LCD
  lcd.print("Flatpack Charger");
  lcd.setCursor(0, 1);
  lcd.print("Made by RHO");
    
START_INIT:

    if(CAN_OK == CAN.begin(CAN_125KBPS))                                              // init can bus : baudrate = 125k !!
    {
        lcd.setCursor(0,0);
        lcd.print("CAN BUS init OK!");
        delay(100);
    }
    else
    {
        lcd.setCursor(0,0);
        lcd.print("CAN BUS init Fail");
        lcd.setCursor(0,1);
        lcd.print("Init CAN BUS again");
        delay(100);
        goto START_INIT;
    }
    lcd.clear();
}

void loop()                                                                           // main program (LOOP)
  {
    
  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


    if(canId==0x05014400)                                                             //this is the request from the Flatpack rectifier during walk-in (start-up) or normal operation when no log-in response has been received for a while
       {
         for(int i = 0; i<8; i++)                                                 
         {
         serialnr[i]=buf[i];                                                          // transfer the message buffer to the serial number variable
         } 
         CAN.sendMsgBuf(0x05004804, 1, 8, serialnr);                                  //send message to log in (DO NOT ASSIGN AN ID use 00)
         msgreceived++;                                                               // increase the variable "msgreceived" 
         unsigned char stmp7[8] = {lowByte(maxcurrent), highByte(maxcurrent), 0x44, 0x16, 0x44, 0x16, 0x3E, 0x17};    // set rectifier to maxcurrent 57,0V (16 44) and OVP to 59.5V (17 3E) qnd long walk-in 4005 or short walk in 4004
         CAN.sendMsgBuf(0x05FF4005, 1, 8, stmp7);                                                                     //(last 4 in header is for 5 sec walkin, 5 is for 60 second walkin)
       }

    
    else if(canId==(0x05000000+256*buf[5]+buf[6]))                                    //if CANID = 0500xxyy where xxyy the last 2 digits of the serial nr
      {
        for(int i = 0; i<6; i++)                                                 
          {
            serialnr[i]=buf[i+1];                                                     // transfer the buffer to the serial number variable (neccesary when switching the CAN-bus to another rectifier while on)
          } 
        unsigned char serialnr[8] = {buf[1], buf[2], buf[3], buf[4], buf[5], buf[6], 0x00, 0x00};                     //this is the serial number of the unit which is covered in the request (unit announces its serial number)
        CAN.sendMsgBuf(0x05004804, 1, 8, serialnr);                                                                   //send message to log in (DO NOT ASSIGN AN ID) use 00
        msgreceived++;
        unsigned char stmp7[8] = {lowByte(maxcurrent), highByte(maxcurrent), 0x44, 0x16, 0x44, 0x16, 0x3E, 0x17};     // set rectifier to maxcurrent 57,0V (16 44) and OVP to 59.5V (17 3E) qnd long walk-in 4005 or short walk in 4004
        CAN.sendMsgBuf(0x05FF4005, 1, 8, stmp7);                                                                      //(last 4 in header is for 5 sec walkin, 5 is for 60 second walkin)
      }


    else if((canId==0x05014004)or(canId==0x05014008)or(canId==0x05014010)or(canId=0x0501400C))                        // these are the status messages (05014004 is not current-limiting, 05014008 is current limiting 05014010 = busy with walkin, 0501400C in input voltage low)
      {  
           msgreceived++;                                                                                             // record number of messages received
           if(msgreceived>40)                                                                                     
            {
             msgreceived=0;
             CAN.sendMsgBuf(0x05004804, 1, 8, serialnr);                                                              //send message to log in every 40 messages (DO NOT USE ID NR, USE 00) this because during walk-in the 0500xxyy is not send and the rectifier "logs out" because of no received log-in messages from controller
             msgreceived++;
            }
           
           lcd.setCursor(0, 0);                                                        //show data on the LCD screen 0x050140yy 0xAA 0xBB 0xCC 0xDD 0xEE 0xFF 0xGG 0xHH
           lcd.print("T=");
           lcd.print(buf[0]);                                                          // 0xAA = Temperature in
           lcd.print("/");  
           lcd.print(buf[7]);                                                          // 0xHH = Temperature out
           lcd.print("   ");
           lcd.setCursor(8,0);
           lcd.print("I=");
           lcd.print(buf[2]*256*0.1+buf[1]*0.1);                                       // 0xBB = Current Low Byte, 0xCC = Current High byte. Current in deciAmps (*0.1 Amps)
           lcd.print("  ");
              
           lcd.setCursor(8,1);
           lcd.print("Vo=");
           lcd.print(buf[4]*256*0.01+buf[3]*0.01);                                     // 0xDD = Voltage out Low Byte, oxEE = Voltage out High Byte. Voltgae in centivolts (*0.01 Volt)
           lcd.print("  ");
                      
           lcd.setCursor(0,1);
           lcd.print("Vi=");          
           lcd.print(256*buf[6]+buf[5]);                                               // 0xFF = Voltage in Low byte, 0xGG = Voltage in High byte. Voltage in Volts (because voltage is below 255 Volts, high byte is always 0)
           lcd.print("  ");
           
           if((digitalRead(A0)==0))                                                    //read digital pin Analog0 and if it is high (pushbutton is pressed) 
             {
             maxcurrent = maxcurrent + 100;                                            // raise maxcurrent with 10 A
             if(maxcurrent > 400)                                                      // to be able to lower the current with one button, if the maxcurrent > 40 the current is reset to 10
               {
               maxcurrent =100;
               }
             digitalWrite(9,HIGH);                                                                                        // switch on the backlight
             CAN.sendMsgBuf(0x05004804, 1, 8, serialnr);                                                                  // send message to log in (DO NOT ASSIGN AN ID) use 00
             unsigned char stmp7[8] = {lowByte(maxcurrent), highByte(maxcurrent), 0x44, 0x16, 0x44, 0x16, 0x3E, 0x17};    // set rectifier to maxcurrent 57,0V (16 44) and OVP to 59.5V (17 3E) qnd long walk-in 4005 or short walk in 4004
             CAN.sendMsgBuf(0x05FF4005, 1, 8, stmp7);                                                                     // (last 4 in header is for 5 sec walkin, 5 is for 60 second walkin)
             lcd.setCursor(0, 0);                                                                                         // announce chosen current on LCD
             lcd.print("Current set to  ");
             lcd.setCursor(0, 1);
             lcd.print(maxcurrent*0.1);
             lcd.print(" Amp        ");
             delay(1000);
             }       
      } 
    else
      {
        lcd.setCursor(0,0);                                                            // if the canId is unknown
        lcd.print(canId,HEX);                                                          // show the can Id and the message on the LCD
        lcd.setCursor(0,1);
        for(int i = 0; i<len; i++)                                                    
          {
          if( buf[i] < 0x10){ lcd.print("0");} lcd.print(buf[i],HEX);                  // send a leading zero if only one digit
          }
        delay(1000);                                                                   // show the message for 1 second and then continue
      }
    }
    
  }

/*********************************************************************************************************
  END FILE
*********************************************************************************************************/
 
That is some absolutely awesome work Remmie! Thank you so much for your efforts and sharing with the community.

You're currently working with a single rectifier, do you think anything fundamental needs to change to drive a pair of rectifiers connected in series with a pre-configured total target voltage? I'm thinking 28s lithium packs such as Zero etc.

I think this would be an ideal onboard charging solution for many electric vehicles, either a single rectifier up to 60v or two for 120v - that covers an enormous range of battery configurations with unbeatable power density and reliability.
 
Back
Top