Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Electronics : driving via canbus Eltek 2kW Flatpack2 supplies
Page 3 of 5 | |||||
Author | Message | ||||
noneyabussiness Guru Joined: 31/07/2017 Location: AustraliaPosts: 512 |
hey pete, sorry to revive this old thread, but having no end of trouble with these power supplies... try to set the voltage but none of my original sketches are working... all the libraries have changed etc... could you please post up your current code and what libraries you are using to set the voltage?? driving me nuts this is... I think it works !! |
||||
Tinbum Newbie Joined: 12/08/2021 Location: United KingdomPosts: 4 |
See my last post for a fix I found. |
||||
noneyabussiness Guru Joined: 31/07/2017 Location: AustraliaPosts: 512 |
um.. sorry your last post just confused the hell outta me, what exactly did you change as ive tried both of petes codes and it wont compile with the same error... I think it works !! |
||||
noneyabussiness Guru Joined: 31/07/2017 Location: AustraliaPosts: 512 |
ok.. so this worked... so far #include <SPI.h> #include "mcp_can.h" #include <mcp_can_dfs.h> // first unit unsigned char login[8] = {0x11, 0x08, 0x71, 0x14, 0x51, 0x26, 0x00, 0x00}; //this is for logging into your flatpack. Must use your serial number. const int SPI_CS_PIN = 10; MCP_CAN CAN(SPI_CS_PIN); // Set CS pin #define VOLTAGE 5750 #define CURRENT 450 uint8_t outset[8] = {CURRENT & 0xff, (CURRENT >> 8) & 0xff, VOLTAGE & 0xFF, (VOLTAGE >> 8) & 0xFF ,VOLTAGE & 0xFF, (VOLTAGE >> 8) & 0xFF ,0x3E, 0x17}; volatile int got_cb_data = 0; // 0x1130 = 44.00V // 0x12C0 = 48.00V // 0x1680 = 57.60V // low byte first {0x29, 0x15, 0x00, 0x30, 0x11}; unsigned char setdefaultvolt[5] = {0x29, 0x15, 0x00, 0x80, 0x16}; float potvolts; void setup() { Serial.begin(115200); pinMode(3,INPUT); pinMode(12,INPUT); START_INIT: if(CAN_OK == CAN.begin(MCP_ANY, CAN_125KBPS, MCP_8MHZ)) { Serial.println("CAN BUS Shield init ok!"); } else { Serial.println("CAN BUS Shield init fail"); Serial.println("Init CAN BUS Shield again"); delay(1000); goto START_INIT; } CAN.setMode(0); delay(200); CAN.sendMsgBuf(0x05004804, 1, 8, login); // id = 1 so XX = 04 delay(200); CAN.sendMsgBuf(0x05019C04, 1, 5, setdefaultvolt); } void loop() { } using the library poida referred to earlier... I think it works !! |
||||
nickskethisniks Guru Joined: 17/10/2017 Location: BelgiumPosts: 458 |
I just bought 2 eltek 2kw units today, also 2 1.8kw units. So it's a little bit exciting if I get the code running. I want to try making an efficient battery charger being powered by my generator. How do you guys are doing this? Can the units be connected directly to the batteries or is it best I connect a (solar) buck converter between the unit and the batteries? Or a diode after every unit. I only have 1 pcb for testing, are there suitable gerbers out there that I can copy? (I can always make my own if necessary) |
||||
Tinbum Newbie Joined: 12/08/2021 Location: United KingdomPosts: 4 |
I connect directly to the battery via a fuse. (I have some pcb's available, my own design, that I had manufactured). |
||||
noneyabussiness Guru Joined: 31/07/2017 Location: AustraliaPosts: 512 |
i have 2 in parallel from my generator connected direct to batteries via breakers... they work fantastic... I think it works !! |
||||
nickskethisniks Guru Joined: 17/10/2017 Location: BelgiumPosts: 458 |
Ok, interesting. You probably want to use a series resistor to charge up the internal capacitors, or put on the psu first to avoid some sparks? But after that the psu can stay connected even when it's not on? So, I can basically set the current limit over can bus to limit the current? Edited 2022-12-11 15:57 by nickskethisniks |
||||
poida Guru Joined: 02/02/2017 Location: AustraliaPosts: 1418 |
yes, you can set the current limit via CANBUS commands, and this can happen in real time (i.e. not some fixed setting that applies after reboot) The current limit only works within the narrow voltage output range. It is NOT 0 Volts to 56V It is something like 48V to 56V from memory. Probably wider range, maybe 44V. dunno So the load needs to work in a way that it reduces the current it draws to a lot less than nominal in the range of 56V down to 48V (or 44V) I was a little saddened to see this, since when I first saw these I thought "great! a universal 2kW power supply" no, it's a great, very, very efficient supply for 48V nominal batteries for charging and driving the attached systems. The current limit does work, and it is not very fast, it drops the current to maintain output current limit at about 10 Amps per second I had tests showing this clearly. Also, the output voltage is set by CANBUS command, again not very fast but it is accurate (thanks to low impedance connections into the back of the Eltek my testing had it to within about 0.1V I had a setup on the bench where I could use a pot to set the voltage and current and it would work as expected. Each time the voltage or current setting changed more than a small amount (to remove the effects of noise) a CANBUS command would be sent to the PS and it would react immediately taking on the new operating settings. These settings were not permanent. To make them permanent you need to send different CANBUS commands to write to the "default" output settings. wronger than a phone book full of wrong phone numbers |
||||
poida Guru Joined: 02/02/2017 Location: AustraliaPosts: 1418 |
I have one, that is used to charge my 400Ah battery. Once I set the DEFAULT output voltage it became the best battery charger ever invented. The efficiency is about 95% at 2kW this is insane. My particular situation is to have the ELTEK setup so I can charge my battery ahead of time when we know street power will be out. I have a remote control facility to allow me to do this via a web interface. And when we need to run the generator I just change it over to source 240V AC from it, switch over to "manual" and charge the battery. This means I can run the gen for 4 hours, get 8kW.hr and run the house on that over night with no noisy gen running. Being with AUSNET I have no time of use tariff so it's one rate for 24hrs. They might be thinking of offering TOU, they sent me a survey that included questions on TOU so who knows. If I can get on a TOU deal, I will charge the battery using off peak rates in Winter to top up the battery when there is f%&k-all sun. wronger than a phone book full of wrong phone numbers |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2135 |
"Being with AUSNET I have no time of use tariff so it's one rate for 24hrs" Also on Ausnet, they can be difficult to deal with. New tariff started in August, no option 20c/kWh 2100 hrs EAST to 1500, 40c/kWh 1500 to 2100. Does not get adjusted for daylight saving so peak is now 1600 to 2200. Others with grid connected solar have to pay more yet get a pittance for what they deliver. |
||||
nickskethisniks Guru Joined: 17/10/2017 Location: BelgiumPosts: 458 |
Peter, thanks again for your work! It worked (not yet tested with a load)! But I should order better rotary encoders, mine are really bad, maybe a debounce function would work better. Although I got the same problem as noneyabussiness, I think I have a work around for that issue. The hint Tinbum gave, had sent me in the right direction. Although lack of knowledge about can protocol and limited programming skills had me spending a lot of time solving the actually simple solution. I first needed to change this CAN.readMsgBuf(&len, buf); Into this: CAN.readMsgBuf(&canId, &len, buf); And then: c1 = 0x05004004 + 0x10000 * ps_no; In to this: c1 = 0x85004004 + 0x10000 * ps_no; Edited 2022-12-13 06:14 by nickskethisniks |
||||
poida Guru Joined: 02/02/2017 Location: AustraliaPosts: 1418 |
the encoders need to be good quality. I first used two from local electronics hobby chain store (Jaycar) and they are bad. One worked sort of now and then. The other would not give a correct quadrature pulse output when rotating counter clockwise (or something like that) Both units gave spurious short pulses on one of the outputs when near transition point going from pulse to pulse. Jaycar part I then got a couple of proper ones from RS-Components at 2x the price and they work as expected. I wasted a lot of time trying to debounce and filter the spurious signals but as soon as the good encoders arrived things just worked immediately without any debounce code (nor noise filtering on their outputs) wronger than a phone book full of wrong phone numbers |
||||
nickskethisniks Guru Joined: 17/10/2017 Location: BelgiumPosts: 458 |
Ok, maybe a little out of topic but after 2 days testing, I wanted to write down some numbers. I own a hyundai hy3200 gasoline generator and I'm always looking for the best fuel efficiency, because in December and January it is used a lot due to lack of sun. And prices up to 2€/l gasoline is not little. I never did decent testing before but now I started with it... At first, I just wanted to compensate the loads, but it's not that great, because I learned generator (ICE) efficiency goes up with the power... I didn't know it was that big of a difference... turns out it really is! I also wanted to be gentle to the unit by loading it only with 1000W. Also, it is housed in a small, insulated shed(?), only on when there is enough electricity use. Because every time the energy goes inside and outside the battery there is a conversion loss. My previous battery charger had only a power factor of 0.60, the flatpack 0.99-1! I think this makes a noticeable difference in fuel efficiency. Since its winter over here (between -1 and -6°C) I had to warm up the generator first. A previous test, running it completely empty gave me 936Wh/l, this was with a 900W load and a power factor of 0.6 Running this test with the flatpack it gave me 1085Wh/l, this was also with around 900w but this time with a power factor of 1. Test 1: 500W AC in to the flatpack 98% efficiency 810Wh/l Test 2: 1500W AC in to the flatpack 96.2% efficiency 1490Wh/l Datasheet says that I could reach 1696Wh/l with 2/3 nominal load, which is 1866VA, so I hope to see further improvement. There is somewhat misleading information like 1.11l usage for nominal power (2800VA), that is basically the same for 2/3 nominal load... Also, the generator is an inverter type and I think it runs more stable (the control loop?) due to the better power factor. Edited 2022-12-15 08:13 by nickskethisniks |
||||
wiseguy Guru Joined: 21/06/2018 Location: AustraliaPosts: 1156 |
Hi Nicks, thanks for the off-topic post it was most interesting to me. I have a Hyundai HY3000 inverter generator - mine is a bit of a pig to start, it has an automatic choke and from cold it briefly runs and dies about a dozen times before it finally decides to run continuously & then doesn't miss a beat. The starter battery gave up about 18 months ago and it was an odd size & unreplaced as yet, so you either use jumper leads to the car or be prepared to yank the starter cord a few dozen times. I also intend to use my generator as an 240VAC source to power my flatpack charger for the 48V storage cells when there is no solar and I wondered what power settings would be most efficient to charge at, thanks for the info and if you update with new data I would be interested. Does your generator have the eco switch and do you use it in that mode ? If you need documentation and schematics, I have some for the HE2 Flatpak 2KW units just pm me if you want them. The first time I attempted to charge by 48V cells with just the one flatpack (I have a few) the Hyundai power overload tripped, despite being only 2kW of load so I need to finish my comms to the flatpack and start it at a lower rate and maybe it will let me increment it in a few steps to full power? Edited 2022-12-15 22:28 by wiseguy If at first you dont succeed, I suggest you avoid sky diving.... Cheers Mike |
||||
nickskethisniks Guru Joined: 17/10/2017 Location: BelgiumPosts: 458 |
Yes, it's always on eco setting, now, it has almost 800h on it, I don't know how much life I could expect from something like this. It can be put on by remote, so I don't need to go out to start it. I'm happy with it, but it seriously went up in price since I bought it. New test: Today's test was 15min idle and next 5h loaded with 1720W average AC load (eltek). Fuell consumption was 5.1liter let's say 5l when loaded, so about 1700Wh/l, so that is 200Wh more then previous record! I had to ramp up the load cause it failed to do 1700W straight away, it might be the slow response of the eco setting. I'm running on E10 (95 with 10% ethanol), I could test with 98. (price is now 1.569€/l E10 and 1.799€ for 98 at the pump) I’m certainly interested in documentation. Edited 2022-12-17 05:33 by nickskethisniks |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2135 |
Increasing the octane number to 98 is unlikely to make enough difference to to justify the cost. Most small engines are designed to accept 92 or higher but with fixed carburetor jets and ignition timing gain little from higher numbers. For that it needs an engine management computer with feedback from a number of sensors to control fuel flow and ignition timing. . |
||||
wiseguy Guru Joined: 21/06/2018 Location: AustraliaPosts: 1156 |
Nicks please either send me an email or pm me yours and I will send you some information. If at first you dont succeed, I suggest you avoid sky diving.... Cheers Mike |
||||
nickskethisniks Guru Joined: 17/10/2017 Location: BelgiumPosts: 458 |
Thanks for the info! Anyone suggestions for mounting the eltek? I was thinking of making brackets and mount it against the wall. |
||||
noneyabussiness Guru Joined: 31/07/2017 Location: AustraliaPosts: 512 |
i used 3 25mm conduit half saddles... 2 on bottom and 1 on top.. sort of like " clamps "... works a treat and solid I think it works !! |
||||
Page 3 of 5 |
Print this page |