Yet another reincarnation of a PT4115 based LED lamp. This time I chose to add a micro-controller to the mix. No, not an ATtiny13 but an ATtiny45, as it contains a much desired feature for this job: high frequency PWM using an on-board PLL clock multiplier. An ATtiny25 would’ve been plenty, but the 45 was cheaper. Go figure.
After switching all my lamps to LED light bulbs, I was annoyed by the fact that most of these bulbs predominantly emit light into the forward hemisphere. Only very little light makes it into the opposite direction. To some degree this is ameliorated by the lamp’s screen acting as a diffuser, but it’s still far from ideal. To achieve a decent light level for reading, you have to use a very strong light source. However, most of that light goes into the room instead of downwards onto your book, creating a less than comfy atmosphere. I had to fix this.
Taking the lamp apart and back together again
The bottom part of the lamp simply unscrews. The heavy foot comes off from the center pipe, the center pipe unscrews from the swivel joint. It is here where one new opening should be created. As you can see, there is plenty of room to insert a protective piece of wood or plastic while working the metal. The mains wiring must be protected from getting damaged.
If for whatever reason the mains wiring should get damaged, the lamp is not safe to operate anymore. The wiring must be repaired or replaced by a qualified person.
The next step is to remove the spring. It is a very strong one, a real bastard. Use a piece of strong string as shown in the images to pop it off. Place the string on top of the spring, close to where the hook grabs the little horizontal cross-brace. Take a firm hold of the string and lamp and pull. If it doesn’t move, pull harder. Eventually it will move and you can pull it free.
Then unscrew the two tensioning nuts. This will free the rod that needs to be modified. Don’t loose the thin metal washers! The remaining part of the lamp’s upper body (2nd rod + swivel joint) holds the mains wiring.
Once you’re done with the metal work (see later steps), re-assemble the lamp in reverse order. Make sure the mains wires are not pinched. Getting the spring back on will again require a piece of strong string. Use it to pull the spring’s hook back over the cross-brace.
Preparing the lamp – some metalwork
The mains wire runs right through the center pipe of the lamp and then through one of the rods connecting the swivel-joint to the top. The additional 24V DC wiring goes a similar route.
Before making any irreversible changes to the hardware, do a test-fit of the circuit board and mark suitable locations for the holes / slots for the additional wires. The board comes with 4 slots that can accommodate 10mm wide Velcro tape. This stuff sticks to itself and is usually used to clean up wires and cables, e.g. the mess behind computers.
It is best to disassemble the lamp laying flat on the floor – all cables unplugged. Remove the screen before you start with disassembly. The springs must be removed as well, as they’re quite strong and can hurt you. The remaining lamp can be disassembled by loosening the two tensioning screws – one is near the swivel-joint, one at the top of the lamp. If for some reason you cannot remove the mains wiring from the center pipe, be extremely careful in the following steps, or ask for help. Damaging the insulation of the mains wiring is a severe safety issue.
Three new openings must be made. One in the central pipe, slightly below the swivel-joint, the next one in the rod that does NOT contain the mains wiring, slightly above the joint, and lastly one opening close to the point where the LED lamp is mounted.
Care must be taken to deburr these openings. Otherwise the wires’ insulation will deteriorate and fail after some time. Use wire with a thick insulation. A solid-core wire works nicely for pulling the cable through the openings.
Power supply considerations
This lamp runs best with 24V DC (200mA), so it only needs about 5W or thereabouts. You will easily find small switch-mode power-supplies that can handle that. An old laptop or external LCD monitor power-supply might do the job. If you absolutely have to, you can alter the supply voltage in a range from about 20V up to 27V DC. Overall efficiency might suffer though.
Standby consumption of power-supplies can vary a lot, so it is worth to check these things with a power monitor (kill-a-watt or similar). Some consume next to nothing on standby, others take more than 1W.
Pretty straight forward stuff. It’s a buck-regulator based LED lamp with a slapped on ATtiny microcontroller + voltage regulator. The micro’s sole job is to read the 2 finger-sensor-contacts and alter the PWM accordingly. If the lamp is off, the micro goes to sleep.
The PT4115 is available cheaply on ebay, that’s why I choose to use it. The datasheet is quite usable and gives tips on inductor selection and so forth. The Nichia LEDs are high-efficency (above 100lm/W).
For design files etc. have a look at the ‘Projects’ page on this blog.
Bill of materials:
PT4115 LED driver (SOT89-5)
MCP1804 low-drop 5V voltage regulator (SOT23-5)
ATtiny25/45/85 (SO8 wide)
6x Nichia LED NT2x757DT (warm-white or white)
100µH inductor (Fastron 1616FPS-101M-01)
2x 1.0Ω current sense resistor (0805)
2x 4.7MΩ biasing resistors – use several MΩ – exact value not critical (0805)
1x 1kΩ resistor (0603)
1x 10kΩ resistor (0603)
1x Zener diode 5.1V (BZX84C, SOT23)
2x Schottky diode SS14L (Sub-SMA)
3x 100nF 50V (0805)
1x 22nF (0805)
1x 1µF 50V (0805)
1x 4.7µF 16V (0805)
The 1kΩ resistor and 5.1V Zener diode are not strictly necessary, but I’ve found more often than desired that it is wise the use over-voltage protection for the DIM input of the PT4115. The 10k pull-down resistor is used to prevent the lamp from emitting a bright flash when power is applied. It takes a couple of ms until the micro-controller is up and running, taking control of everything [see note (1)].
Inner workings of the finger-sensor contact:
The two contacts connect to one ADC input of the micro, which is biased to about 2.5V using the two 4.7MΩ resistors as a high-impedance voltage divider. If a contact is “shorted” by the tip of a finger, the voltage goes either higher or lower, which is interpreted as a button-press. The RC time-constant (2) should be smaller than 100ms, so the thing responds in a timely manner.
How not to burn down the house & every-day usage
These Nichia LEDs are quite nice, decent light color, high efficientcy, but they are little furnaces. It is very critical that this lamp is only mounted in well ventilated areas and kept far away from easily combustible material.
Once the lamp is turned on, it slowly fades up to 50% brightness. This is done to not irritate your eyes too much. Looking straight at the lamp is not recommended, unless it is set to quite a low level.
To increase brightness, touch the upper button, to decrease touch the lower button. To put the lamp into sleep mode, simple touch and hold the lower button until it goes off. The standby consumption is just 400µA for the lamp itself.
If the lamp is kept in the upright position, it’s quite a good wall-washer.