And now for something completely different...
I
have been tidying my lab post kit production to make room for future
experiments. In the process I have been skipping loads of junk. I do
have trouble throwing things away that work just as well as when they
were new and expensive but are now utterly out of date and superseded by
much smaller, better and cheaper things. I power them up periodically to test them and hope they
might fail and give me an excuse to chuck them.
I powered up an old PC and six electrolytic caps exploded in quick succession, sounding like a distant firework display! Presumably a victim of the great capacitor plaque in the early 2000s. Remarkably it still managed to boot into XP but it had signed its own death warrant and went straight to the skip.
Several more PCs with only 256MB of RAM went when I found they wouldn't even load a supported version of Linux. Only a Shuttle with 1GB of RAM that successfully runs LXLE survived the cull.
I also have a Tektronix 8560 multi-user software development unit that is actually a DEC PDP11-73 mini-computer in a 19" rack with a Kennedy Model 9000 open reel tape drive and a Dylon Model 1015B Magnetic Tape Controller.
It was purchased by the company I worked at for £48,000 in 1984 and supported 8 software developers on dumb terminals connected via RS232. They gave it away for nothing in the early 90s. To put that in
perspective £48,000 would buy a decent house in 1984 that would have
been worth a lot more in the nineties. Computers must be the worst
investment ever! The rack is probably the only bit that retains any value.
It has 1MB of memory on two large cards and the processor is only
about as powerful as an Intel 286, but with a much nicer instruction
set. We had to write PDP11 assembler in some university workshops and it
is the nicest instruction set I have come across.
It was replaced by two MicroVaxes and later PCs of course. The ironic thing is it replaced Motorola EXORcisers, which were single user desktop computers, so things sort of went in circles.
When the machine was delivered it had a PDP11-23 but the embarrassing thing was it didn't perform as well as the 8 bit EXORcisers because, although it was a 16 bit processor with 1MB of memory, each process had to fit both the instructions and data into a 64K segment, just the same as the 8 bit machine. The 8 bit linker program was smaller so there was more room for the target program. We had to immediately upgrade to the PDP11-73 CPU that has separate instruction and data segments allowing the full 64K to be used by a process for its data. I still have the original processor: -
It runs Unix version 7 re-branded TNIX. It is built like a tank, so of course it still powers up fine, asks if the time and date is still 2006 (the last time I powered it up) and if not suggests I enter a time and date with 1982 as an example. No Y2K bugs here!
It is nearly as loud as a vacuum cleaner and smells of burning for the first few minutes. I think there must be a thermistor or a dropper resistor in the PSU that quickly gets very hot and burns off the dust.
Even the tape drive still works once I had remembered how to set it up, but it only holds about 20MB and would take something like an hour to write that much. The only thing that failed is the foam block that holds the end of the tape in place in the spool. It has started to disintegrate as foam seems to do eventually.
It is in need of a good home but I think it is too modern and not rare enough for a Museum. One day I might skip the insides and use the case to house a big 3D printer or lots of little ones.
Tuesday, 26 January 2016
Monday, 25 January 2016
Ultra Low Dropout Regulator for flicker free LEDs
Cheap 12V LED lighting strips are very sensitive to small voltage changes. This is because they just have multiples of three white LEDs in series plus a small resistor to set the current. The voltage across the LEDs is more or less constant at 3 × 3.2V, so the resistor sees the difference between that and the supply voltage, around 2.4V. This means that a 10% change in supply voltage produces around 40% change in current and hence brightness.
ATX PSUs have poor regulation on the 12V rail but this doesn't affect the rest of a 3D printer because everything is regulated downstream. The stepper drivers are constant current and the heaters are temperature controlled.
Here is a dip in the 12V rail caused by the 10A bed switching on. As you can see the swing is 12.2 to 11.6V, around 5%. This results in about a 20% reduction in light which is very noticeable.
One way to fix the problem would be to make an accurate 12V from the unused 5V rail using a small boost converter. I didn't want to cause any EMC issues, so I decided to use a low drop out (LDO) regulator to regulate to just below 11.6V. I thought it would just be a single chip solution, but after a lot of searching, the lowest drop LDOs I could find were 0.5V and I didn't want to waste that much.
I decide to roll my own using a low RDSon MOSFET as the series element. The LEDs only take about 0.5A, so the drop out voltage with a MOSFET with an RDSon of a few milliohms can potentially be a few millivolts, hundreds of times better than any LDO chip I could find.
In practice I used a BTS134 MOSFET I had lying around with an RDSon of 60mΩ. To put that in perspective that is less than the voltage drop in the wires I used.
This is the circuit I came up with: -
I regulate the negative side of the LEDs so that I can use an N channel MOSFET. Virtually any logic drive MOSFET should work. I wired this after my RPi switching circuit described here: hydraraptor.blogspot.co.uk/2014/06/lights-camera-action.
I use a TL431 adjustable precision reference as the control element. These are great little chips that can do anything from replace a zener diode to being an audio amplifier. The green LED acts as a level shifter to ensure the cathode voltage of D1 is higher than the reference voltage, a requirement of the chip. A white LED would give more margin.
VR1 should be initially set for the maximum output voltage and then gradually reduced until the flickering stops when the bed is switching. Handily the green LED flickers when the LEDs are flickering aiding adjustment without being blinded by the light.
C1 prevents the circuit oscillating at about 50kHz by providing negative feed back. I found its value by trial and error as there wasn't any phase shift versus frequency data in the data sheet. Basically R3 and R4 form an RC network with the gate capacitance of the MOSFET. This will produce a 90°phase lag at high frequencies. The TL431 must also create a 90°phase lag around 50kHz. To prevent oscillation C1 has to reduce the loop gain to less than one when the total phase shift is 180°. The circuit was stable with 1nF but had a bit of ringing. With 10nF it was a bit slow to respond.
The scope view below shows the performance of the regulator. The yellow trace is the 12V supply to the LEDs. The cyan trace is the negative supply to the LEDs (shown at a bigger scale). The purple trace is the difference, i.e. the voltage the LEDs see. It is virtually constant and the drop across the regulator goes as low as 40mV.
The maximum voltage across the MOSFET is only about 600mV (the size of the dips in the 12V rail). That makes the dissipation about 300mW, which is easily dissipated without a heatsink. Don't set VR1 too low though as the dissipation will go up rapidly.
Here is a veroboard layout done in VeeCad: -
If there is enough interest I could make a PCB to combine this with the RPi interface and also add a 5V in connector to avoid the need for the micro USB plug.
ATX PSUs have poor regulation on the 12V rail but this doesn't affect the rest of a 3D printer because everything is regulated downstream. The stepper drivers are constant current and the heaters are temperature controlled.
Here is a dip in the 12V rail caused by the 10A bed switching on. As you can see the swing is 12.2 to 11.6V, around 5%. This results in about a 20% reduction in light which is very noticeable.
One way to fix the problem would be to make an accurate 12V from the unused 5V rail using a small boost converter. I didn't want to cause any EMC issues, so I decided to use a low drop out (LDO) regulator to regulate to just below 11.6V. I thought it would just be a single chip solution, but after a lot of searching, the lowest drop LDOs I could find were 0.5V and I didn't want to waste that much.
I decide to roll my own using a low RDSon MOSFET as the series element. The LEDs only take about 0.5A, so the drop out voltage with a MOSFET with an RDSon of a few milliohms can potentially be a few millivolts, hundreds of times better than any LDO chip I could find.
In practice I used a BTS134 MOSFET I had lying around with an RDSon of 60mΩ. To put that in perspective that is less than the voltage drop in the wires I used.
This is the circuit I came up with: -
I regulate the negative side of the LEDs so that I can use an N channel MOSFET. Virtually any logic drive MOSFET should work. I wired this after my RPi switching circuit described here: hydraraptor.blogspot.co.uk/2014/06/lights-camera-action.
I use a TL431 adjustable precision reference as the control element. These are great little chips that can do anything from replace a zener diode to being an audio amplifier. The green LED acts as a level shifter to ensure the cathode voltage of D1 is higher than the reference voltage, a requirement of the chip. A white LED would give more margin.
VR1 should be initially set for the maximum output voltage and then gradually reduced until the flickering stops when the bed is switching. Handily the green LED flickers when the LEDs are flickering aiding adjustment without being blinded by the light.
C1 prevents the circuit oscillating at about 50kHz by providing negative feed back. I found its value by trial and error as there wasn't any phase shift versus frequency data in the data sheet. Basically R3 and R4 form an RC network with the gate capacitance of the MOSFET. This will produce a 90°phase lag at high frequencies. The TL431 must also create a 90°phase lag around 50kHz. To prevent oscillation C1 has to reduce the loop gain to less than one when the total phase shift is 180°. The circuit was stable with 1nF but had a bit of ringing. With 10nF it was a bit slow to respond.
The scope view below shows the performance of the regulator. The yellow trace is the 12V supply to the LEDs. The cyan trace is the negative supply to the LEDs (shown at a bigger scale). The purple trace is the difference, i.e. the voltage the LEDs see. It is virtually constant and the drop across the regulator goes as low as 40mV.
The maximum voltage across the MOSFET is only about 600mV (the size of the dips in the 12V rail). That makes the dissipation about 300mW, which is easily dissipated without a heatsink. Don't set VR1 too low though as the dissipation will go up rapidly.
Here is a veroboard layout done in VeeCad: -
Subscribe to:
Posts (Atom)