Project Dino-Solar 240

A gadget to charge the Power Tank off AC power.

The Power Tank uses a Victron MPPT 75/15 for battery charging. I experimented with this and found that it would happily charge from a DC power supply connected to the PV input.

I tried several different bench power supplies and also 18V DeWalt cordless drill batteries, and all seemed to work fine. Victron specify that the DC input voltage has to be at least 5V above battery voltage for the charger to start, and then 1V greater for it to continue running, so in practice 24 or 48V DC would be a good input voltage for my 12V system.

I settled on a Meanwell HLG-240H-48A LED driver obtained cheaply on eBay, that supplies 48V DC at 5A.

This worked just fine plugged directly into the solar input, but I decided to complicate things by adding an automatic changeover between solar and AC charging when AC power was present. My first attempt was to use a couple of diodes to OR the solar and PSU inputs, but this didn’t work. The PSU would be dragged into current limit as soon as it was turned on, and the MPPT would then ramp its output voltage up and down searching for a max power point and never find it.

The key to a successful changeover turned out to be to disconnect the solar panels, wait 5-10 seconds for the input voltage to fall to zero and the MPPT to shut down, and then connect the power supply. I made a circuit to do this automatically depending on the presence of AC power.

This junk box inspired design is based on a Europa ECMFT timer relay, and a Raspberry Pi 4 wall power supply that I’d previously cut the DC plug off for some reason. When AC power becomes present, the Raspberry Pi wall wart supplies 5V to a changeover relay, that disconnects the MPPT positive input from the solar panels and connects it to the 48V DC PSU, which is still turned off. After 10 seconds the timer relay switches the PSU on.

When AC power is lost the reverse happens. The 48V PSU turns off straight away, while the Raspberry Pi PSU keeps the changeover relay energised for a few seconds on its stored energy. This avoids the changeover relay having to break the 48V while current is flowing.

The main weakness of this circuit is that it uses a relay to break and make the DC output of the solar panels. Relay contacts typically have much reduced DC ratings compared to their AC rating, and most won’t even handle more than 30V DC.

This isn’t a huge problem, if there was lots of solar power available, why would I even be switching over to AC charging? Also my solar array is tiny and puts out less than 30V DC. However, I paid it some lip service by choosing a relay with a 30V DC rating, and putting two of them in series on the PV side. (What if the 2 relays don’t open at exactly the same time I hear you ask? Next question please…)

I tried a new enclosure construction technique for this, based on a piece of 4″ x 4″ aluminium box section. The ends are made of sheet aluminium and attached to the box section by aluminium angle. The HLG-240H-48A is screwed to the case with a generous amount of heatsink compound to help it lose heat by conduction, which it seems to manage OK.

You might notice that the prototype had a digital voltage and current meter which is now gone. This cheap Chinese meter turned out to be basically a random number generator so I ditched it.

I think it looks great, but the wiring was a real pain and ended up very messy inside, because it all had to be done through the ends. I’m not sure I’d use this technique again unless the innards could be made to slide out as a single unit. That wasn’t possible in this case because of the power supply covered in heatsink grease.

Project Happy Welder 3000

[Documenting the happy outcome]

This was a long-running project to get my welder running off the Lister diesel generator. After a few dead ends it is now officially finished and has become a piece of workshop equipment for day-to-day welding of other things.

It ended up split into two sections which I’ll call the Happy Welder 3000S and 3000T. The division was a bit arbitrary and was really about letting me reuse salvaged enclosures from my junk heap.

Happy Welder 3000S

The “S” stands for switch box or splitter. The main purpose of this part is to split the incoming supply from the generator into two. One feed goes to the welder and the other to a selection of “dumpable loads” which are switched off while welding is in progress.

The motivation behind this is to keep a decent amount of load on the engine most of the time. Diesels like to work and will get clogged up with soot if left idling for long periods of time. And the nature of welding is short periods of high power draw with long breaks in between. (at least at Container Labs it is, I’m not planning on building a ship any time soon)

I fiddled with a few different schemes to turn off the dumpable loads by sensing the supply current draw of the welder, but couldn’t get this to work reliably. So I modified the welder slightly. It has a solenoid operated gas valve inside that supplies argon to the torch while welding. This opens a second or two before the arc is struck and stays open for about 20 seconds after it goes out. Just perfect for actuating a load dump contactor.

Using some zip ties and piggyback spade terminals, I connected a relay in parallel with the gas valve operating coil. This runs off 24V DC so finding a suitable relay was no problem. To save drilling a hole* in the welder I repurposed the 3 unused pins on the foot pedal connector. I do have a foot pedal, but it plugs into the hand controller socket on the front panel.

* another hole- the eagle-eyed might notice that I’ve already replaced the captive power cord with a Neutrik Powercon inlet. I love Powercons πŸ˜€

Schematic of Happy Welder 3000S

I wanted a low voltage signal for triggering the load dump contactor. The relay I added inside the welder is quite capable of switching 230V, but the foot switch plug has male pins that could deliver an electric shock when unplugged if I used mains voltage here. So the finishing touch was a small low voltage power supply inside the 3000S enclosure just for the contactor coil. I used a 12V switched mode wall wart with the pins trimmed down and a piece of plastic attached with hot glue to insulate the stumps.

The CPC catalogue turned up an inexpensive 20A contactor with a 12V coil and normally closed contact, and the 3000S was done.

In use the “dumpable loads” are two battery chargers feeding the Power Tank, and an electric heater. The 3000S also serves as the earthing point for the generator and everything connected to it.

The battery chargers are modified switched mode power supplies which I’ll write about another time. In the bottom right you can see my long-suffering Astec LPS250 which started life as 5V, 50A, and is now cranking out 30A at 14.4V. Not bad for a “250W” unit, do I smell burning? :/

Happy Welder 3000T

T is for transformer. This box (a Pentium 4 PC in a previous life) contains all of the parts that I found were needed to make the welder accept Lister’s quirky retro power quality. I already had this enclosure in my junk pile and it fitted perfectly under the workbench. I pondered trying to squeeze the 3000S parts in here too but decided it would be a wiring and assembly nightmare.

Schematic of Happy Welder 3000T

The most important part (as determined by trial and error) is a 2.1kVA autotransformer that steps down 230V to 190. I believe this was originally used to reduce the voltage to street lighting in the early hours as an energy saving measure.

The box also contains a bridge rectifier, capacitor and power resistor (sold as a 230V, 100W cabinet heater) the purpose of which is to draw lots of current on the voltage peaks and squash them down a bit further. This was the final bodge that allowed me to max out the generator’s engine power without any overvoltage trips. Hopefully it should also protect the 12V power supply inside the 3000S from destruction by excessive peak voltage.

A small fan on the rear panel blows air over the transformer, before it exits through the resistor. This is really a must as the resistor is dissipating about twice its rated power.

The fan was also salvaged. I can’t remember what it came out of. I had a fun afternoon making front and rear panels out of pieces of scrap metal.

The first of hopefully many happy welds. (proof that a weld doesn’t need to be Insta worthy to be happy πŸ˜€ )

Fixing EMF carnage part 2

With the PFC sorted I turned my attention to the main coil unit. I started by replacing the melted tank capacitors. One had exploded, one looked a bit burnt, and the leg of a third capacitor came off in my hand.

Out of curiosity I cut open the exploded capacitor. The whole inside was just a blackened mess.

I bought a load of these Cornell Dubilier 942C series capacitors, 1uF 1000V, years ago for the OLTC 2. In Odin they are overloaded to about 3x their rated RMS current and crammed into an unventilated wooden box, so I’m not entirely surprised they failed.

What did surprise me was that every other capacitor tested fine! I found replacements for the destroyed caps in my pile of Tesla junk and the capacitor bank was ready to go again!

Inspecting the rest of the circuitry, the only other problem I could find was a shattered transistor on one of the gate drive boards, which looked like it had been mechanically damaged while taking the unit apart.

After a few days’ wait for Farnell to deliver a replacement, I headed to the container and set up all the parts of Odin minus the secondary coil for a dummy load test.

Unfortunately something wasn’t right, the primary current was well below what it should be, and the “Power Fail” LED lit up every time the fire button was pressed.

Suspecting a wounded IGBT brick that was drawing a lot of gate current and overloading its gate driver, I took the bridge apart and tested everything, but the IGBTs seemed fine! All the resistance and diode tests checked out, and a 9v battery turned them on and off happily.

Using Banggood’s finest thermal imaging camera (80 x 60 pixels resolution!) I could see that something on one of the gate drive boards was getting exceptionally hot.

It turned out to be a shorted diode in the gate drive board’s power supply that was causing the voltage to sag horribly and trigger the undervoltage lockout. UVLO is really important in this application where we are driving IGBTs well over their rated current. Trying to pass the full current with insufficient gate voltage will result in a big bang. Luckily the UVLO did its job today and there was no bang.

With the diode replaced, the Power Fail light went out and the gate waveform looked “just perfect” as Allen Millyard would say.

This looked encouraging so I put some DC bus voltage to it and the full 1250 amps of primary current were achieved with no obvious issues.

(These posts are a bit behind of events, I’ve since taken Odin to Gaussfest 2024 and everything performed fine.)

Fixing EMF carnage part 1

During Odin’s final performance at EMF there was a loud bang and everything stopped working. I decided it wasn’t worth attempting a field repair as there were basically only 20 minutes of the festival left and most of the potential spectators were heading home.

Reviewing some video of the fatal performance, I could see a blue light shining out of the PFC after which Odin’s spark output rapidly declined to nothing. This implied that the coil was still working after the PFC died, and might actually be undamaged, apart from the melted tank capacitor that I later replaced with Dawncaps.

I started by investigating the PFC. The innards were well and truly splattered. Both SiC MOSFETs had cratered, the legs of one boost diode were partly eaten away, and a thin layer of vaporised copper covered everything. Even the ferrite core of one of the current transformers had partly melted.

Clearly a quite impressive arc flash had taken place. I think the most likely explanation is that something damp and conductive got in between the boost diode legs and caused the flashover. An arc here would have connected all of the charged DC bus capacitance (4400uF total at 750V!) to the MOSFET drains, causing them to fail explosively from massive overcurrent as soon as they next turned on.

Amazingly the old diodes tested good, though the copper-coated one had a somewhat lower forward voltage. I replaced them anyway with these SemiQ parts that have double the pin spacing.

The annihilated Cree/Wolfspeed SiC MOSFETs were replaced with Infineon IMZ120R060M1HXKSA1.

I forgot to order a replacement CT, so I reinstalled the burnt one with a generous amount of hot glue. It still tested ok for continuity and primary/secondary insulation resistance, and the inductance was reasonable, if a bit lower than its undamaged partner.

Power up was completely uneventful, though the pause while the control power supply gets going can be a bit unsettling. You can see that I added a test socket for viewing the inductor current while I had the unit apart.

It runs happily and the inductor current waveform looks reasonable. I tried overloading the DC output until the 20A breaker on my house circuit tripped, and it seemed to survive that fine.

As this is a post-hoc post, I can say that the PFC also survived Gaussfest 2024 including several performances of Ian Dunne’s theremin.

Dawncaps for Odin

After my meltdown at EMF, I needed a new tank capacitor. I decided to risk buying some Dawncap DTR series from AliExpress. The 0.44uF seems to be the most popular model, but I went for the 0.33uF 3kV instead, and was careful to use what looked like the Dawncap official store.

As I was in a bit of a hurry for Gaussfest I quickly made a plywood case with little thought to ventilation.

The front panel was made of plastic sheet (PVC?) as the plywood was too thick to give clearance for the connectors. These are 120 amp AMP Radsok connectors, also known as “Degson”.

Foam draughtproofing strip was used to stop the capacitors from rattling around, and the wooden case was painted black.

This capacitor is 10% bigger than the old one (0.33uF vs 0.3) but it seemed to perform exactly the same, no adjustments were needed to PLL frequency limits or primary tapping point.

New wheels for Lister

I was getting really tired of the massive flat spots on Lister’s tyres that made moving it a serious effort. I got some pneumatic tyred wheels from Machine Mart, and some 20mm round steel bar, box section, and 20mm shaft collars.

By the tender ministrations of the Milwaukee Hole Dozer and angle grinder, the box section was turned into a set of axle collars.

I was too cheap to buy precision shafting for the axles, I went for so-called “round” mild steel bar which isn’t actually all that round. A lot of grinding was involved to get the shaft collars and wheels to fit onto it.

The next part was actually really fiddly and I apologise for not getting more pics of it. I had to jack the generator up, remove the existing wheels and axle, and offer up the new axles to the frame to mark out the bolt holes. As the unit is on loan, I didn’t want to drill any new holes in it, so I drilled the axle mounts to line up with the existing holes.

So far so good, but the next step was to fire up the generator and use it to weld its own axles together without having it vibrate its way off the temporary pieces of wood it was propped on.

It was getting dark and I was in a bit of a hurry as I couldn’t put the thing away and lock up until it had functioning wheels on it again. The welds turned out horrible, but as the saying goes:

I welded.
It helded.

This War Of Words

THIS
is an anagram of SHIT
Pithy observation, isn’t it?
Observing doesn’t help one bit

When WAR is RAW words fail.
Let EVIL LIVE and rip the VEIL
To crucify
To kill
To nail

Two letters keeping LAMBS from BOMBS
The lambs are in our prayers

EXPLOSIVES
CRATER
BURSTING LUNGS

O shattered bones
O burning hair

An AVR for the Lister diesel

I spent entirely too long pondering why Lister wouldn’t run the welder, and decided to build an automatic voltage regulator (AVR) for the generator to investigate further. My reasoning went as follows: If stepping the generator output voltage down to 200V from 240 made the welder happy, then surely regulating it down to 200V would do the same?

I started out intending to build a straight copy of the Homo Ludens AVR2 but it mutated and mutated eventually turning into the above circuit.

The AVR2 is simple and ingenious, but:

I wanted an accurately defined 200-240 or 100-120V adjustment range.

I discovered the principle of keeping the peak voltage under control with a bridge rectifier and large capacitor, and wanted to include that and make it track the average voltage, without using a multi-gang pot.

The Homo Ludens circuit needs a normally closed relay to start up. I accepted his challenge of getting rid of the relay.

The Homo Ludens triac output stage really didn’t work that well in practice with my generator that derives its field excitation from its main output. It mostly functioned as an on-off switch and hardly gave any range of phase angle control.

Explanation of my circuit:

The whole circuit is powered off the rectified and filtered output voltage of the generator. This can be either 115 or 230V nominal. C1 charges to something between 140 and 360V DC in use, clipping the generator peak voltage as it powers everything.

Depletion MOSFET Q2 and regulator U1 work together to provide an accurately regulated 10V supply that powers the low voltage part of the circuit and also functions as the voltage reference. Using a depletion MOSFET here allows the circuit to start with less than 10V AC from the generator, achieving the goal of getting rid of the Homo Ludens relay. The DN2540 is also a really docile part with quite low gain, and showed no signs of oscillation. It does get rather warm and would need a small heatsink when the circuit is running in 230V mode.

R1-R6 form two voltage dividers that sense the peak and rectified average generator output voltage. C2 and C3 provide some low-pass filtering of ripple, and for the average channel the amount of filtering is adjustable by RV1. The operating concept of the circuit is basically the same as the Homo Ludens one: the field coils and clipping resistor are driven by PWM, and the ripple on the sensed voltage functions as the PWM carrier. The smaller the ripple amplitude, the higher the control loop gain. Again like the Homo Ludens AVR2, this is a proportional controller only, no attempt was made to add integral or derivative terms.

The voltages are all scaled such that 40V RMS true sine wave input gives 1V at VPEAK and VAVG. RV2 and its associated fixed resistors make a reference voltage that varies between 2.5 and 3.0V in 120V mode, or 5.0 to 6.0V in 240V mode, thus giving adjustment ranges of 100-120 and 200-240V.

U2A and U2B function as comparators with a little AC hysteresis to avoid multiple transitions and high frequency oscillations. The values were found by trial and error to give happy PWM at twice the AC frequency.

The output stages are quite conventional, though scraping the junk box somewhat at this point. A 555 was used as an inverting MOSFET driver, and Q3 as a non-inverting one. A TC4428 dual MOSFET driver chip would have been a more elegant solution. The IRF840 and UF4007 were chosen by the same junk box scraping principle.

The original Homo Ludens optoisolated triac output stage can of course still be used with this circuit. Connect the opto-triac LED between U2A output and +10V. I would be interested to try this with the common and low cost “brushless self-excited” generators, connecting the triac in series with the capacitor. Internet wisdom says that these can’t be AVRd.

This circuit was tested with 50Hz AC supply from a variac and found to have rather low gain even with RV1 at maximum. It took maybe 30-40V change in variac setting to go through the full range of PWM. A 50k trimmer for RV1 would have been better, and the peak clipping channel could do with a similar increase in filtering. (The two iron cored chokes and series light bulb are simulating a generator field winding.)

I decided I would try it with Lister anyway though.

AVR was connected in place of original Brush generator excitation circuit. It used a variable series resistor and bridge rectifier connected to one of the generator’s 120V sections, so I did the same. With the generator switched to 240V I would only be sensing/regulating half of the output voltage, so I hoped the magnetic coupling between the two sections would be tight enough that the unregulated one would follow the regulated one.

The series fields with their excitation from rectified load current were left connected, while the AVR controlled the shunt field.

I take my breadboards seriously. πŸ˜€

Note the small inductors (salvaged from dimmer switches) to filter out MOSFET switching spikes and reduce EMI.

Turning the pot adjusted voltage from 200 to 240V as designed. It worked a lot better than I expected from testing with the variac.

Throwing a 30uF capacitive load onto the generator to make it self-excite showed good control over the voltage.

Sadly it didn’t work, the welder would trip out almost instantly on an overvoltage error, even with the AVR turned down to 200V.

What I think is happening is that the average voltage regulating channel is quite slow to respond as it has to contend with the inductance of the generator’s shunt field coils, so for very rapid changes in voltage, it basically does nothing, the voltage regulation is determined by the impedance of the generator’s windings. Which turned out to be high enough to make the welder’s PFC front end unstable.

The welder PFC then ended up in a fight with the AVR’s peak clipping channel, one trying to distort the voltage waveform into a thin and peaky shape, the other trying to chop the peaks off. The welder apparently won, distorting the voltage to the point that it tripped its own overvoltage protection.

Why won’t Lister run the welder?

[~A tale of weird waveforms~]

My main motivation for borrowing Lister was to run the welder at Container Labs. My GYS Protig 201 AC/DC claims to be “generator friendly and protected” but also “minimum generator size 7.5kVA”.

Lister is rated for 3kW at power factor 1.0, but looks massively overbuilt, so I thought it would be worth a try.

My first attempt at welding was pretty anticlimactic, on striking an arc the welder instantly shut down with error code “US1”. According to the GYS manual this means input voltage over 265V RMS. On further reading the unit claims to withstand up to 400V RMS/700V peak without damage but will apparently shut down above 265.

Since the welder has a PFC front end, I tried substituting the Odin PFC to see if this would manifest the same issue. It is rated to run at 415V RMS and has 1200V semiconductors so I had no worries about blowing it up with overvoltage. I used the Tesla Model 3 cabin heater as a dummy load for the PFC output.

This was somewhat inconclusive as the Odin PFC happily ate all of the generator output, showing no signs of serious instability under load, and making an impressive blast of hot air from the cabin heater.

The unloaded peak voltage did look somewhat high, due to the PFC’s EMI filter capacitors resonating with the generator winding inductance at the tooth ripple frequency.

Unloaded

These scope shots only show one-half of the generator output voltage, as I didn’t have an isolated scope probe handy, and the generator output is centre tapped to earth. So the total peak voltage is 472V unloaded and 368V under full load. These would equate to 335V and 261V RMS with an ideal sine wave. Since the actual RMS is 256V unloaded and 232V loaded, we certainly have some evidence of waveform distortion under both conditions.

Fully loaded

So on the face of it I could see how this could trip the welder’s overvoltage protection. I also heard from a friend who had experience of using similar generators to power his ham radio field day stations, and he said the waveforms tended to be “thin” with too high peak voltage for their RMS.

I pondered various ways of attacking the problem, a filter to remove the tooth ripple? This would need some seriously expensive and bulky inductors, so I didn’t bother. My first experiment was to step the output voltage down using an autotransformer (as I had one handy) and clip the peaks off using a rectifier, capacitor and resistive load.

This contraption (which I’ll call the Happy Welder 3000) worked surprisingly well, using the 190V tap, the peak and RMS voltages were both brought somewhat under control, and I was able to crank the welder to about 150A output at which point the engine began to bog down and belch black smoke, but would recover by letting off the TIG foot pedal.

Voltage and current drawn by the peak clipper

The Happy Welder 3000 seemed like a bodge so I went looking for a more elegant solution. I discovered that just switching the generator to 115V would give a decent result with no extra hardware needed. Voltage drop in the 25m x 2.5 sq mm extension cord (used to get generator noise and diesel fumes away from me) now limited me to a somewhat lower welding current before I got error “US2”, undervoltage this time. I was able to do a small job on mild steel this way.

I spent way too long thinking about this problem and ended up building an AVR which to my surprise, made the problem even worse! The welder was quite happy with 200V from the autotransformer, but with generator output reduced to 200V by the AVR, it wouldn’t run for more than a fraction of a second before tripping on error US1.

I don’t know how it took me so long, but I eventually stumbled on the idea of filming the scope screen while welding and examining the footage frame by frame.

I believe this frame captures the instant that the welder shuts down on error US1. Top trace is generator output voltage, bottom is current drawn by the AVR’s peak clipping channel. DVM shows the voltage across the AVR’s filter capacitor, which should be one-half of the peak output voltage.

The waveform is completely different to any I saw previously, and leaves only one possible explanation, the impedance (resistance and inductance) of the generator windings is too high for the welder’s PFC front end, it goes unstable and wrenches the waveform out of shape.

The instability pushes the peak voltage way higher than anything I measured while not welding, and does this so quickly that the meters I’d been using didn’t have time to register it. The AVR’s peak clipper tries to keep the peak voltage under control but fails.

This explains why stepping the voltage down to 200, and switching the generator to 115V, both worked and enabled me to weld, but using the AVR to reduce the voltage to 200 didn’t.

Switching to 115V gives an impedance one-quarter of the 230V setting. A transformer that steps the voltage down from 240 to 200 reduces the impedance to 76%.

On the other hand, the AVR only compensates for relatively slow fluctuations in voltage by adjusting the field current. It has no effect on the resistance and inductance of the windings, so can’t do anything about the waveform distortion.

I think I earned my professional development points on this one.

The Blind Photographer

Guide, please explain the scene.
It is tangled colours, jumbled like a dream.
A petrol-slick of possibilities
Not unlike the sun through screwed-up eyes.

Graffiti leaps out from the walls
There’s light and shadow, shape and form
The architecture’s come alive
Touch the concrete here, it’s warm

It’s evening now, the golden hour
Oh quick, you’ve got to shoot!
You’ve hardly any eyesight left.
The composition’s up to you.