Help me reverse engineer an LED light bulb

posted Nov 12th 2010 2:14pm by
filed under: HackIt

hack LED bulb

I went to the last monthly meeting of Sector 67, a hackerspace in Madison, WI. One of the things shown off was a color changing LED light bulb that Menards was clearing out for $1.99. Inside there’s two RGB LEDs controlled by an ATtiny13 and powered by an AC/DC buck converter. An ATtiny13 will run you around $1.25 by itself so this price is quite amazing. I grabbed a couple of these bulbs and set to work on them. Join me after the break to see what I’ve got so far.

These bulbs use a candelabra base so I grabbed an adapter and tried it out in a lamp. Here’s the result, you can see it stepping through color levels a few times a second:

We’ve seen this in a lot of mood light hacks, I want to get at the hardware and make it do my bidding. First thing’s first, time to crack it open. For some reason I thought that carefully drilling some holes around the base would help me figure out where best to use the Dremel cutting wheel. Unfortunately I immediately drilled through one of the inductor coils. Drat.

hack sylvania light bulb

Well, no stopping now. I’m not too worried as I also bought a solid red version of this bulb. I want to see what’s inside, whether it’s the same design with unpopulated components, or the full shebang with different hardware. I assume there’s no microcontroller inside so I’ll steal the inductor from that one later.

I cut off the diffuser and got to the circuit board. Here’s some images (click for hi-res) as well as a cursory list of hardware.

Top:

  • R2 – 1004
  • R3 – 1004
  • R4 – 3001
  • R5 – 1302
  • R10 – 1003
  • D4 – Looks like a zener… perhaps to set down votage for the tiny13
  • D5 – RGB LED
  • D6 – RGB LED
  • D7 – JF S1J
  • IC5 – ATtiny13
  • C1 – smd without label
  • C7- smd without label

Bottom:

  • R1 – inline with center conductor of light socket
  • P1 & P2 – Labels for incoming AC power?
  • L1 – 102J CEC
  • L2 – 102J CEC
  • C2 – 50V 22 uF electrolytic
  • C3 – 400V 4.7 uF electrolytic
  • C4 – 400V 4.7 uF electrolytic
  • C5 – 25V 100 uF electrolytic
  • C6 – smd without label
  • D3 – R106 TF
  • R6 – 1201
  • R7 – 1Bx
  • R8 – 270
  • R9 – 270
  • IC1 – NGS (transistor for driving LEDs?)
  • IC2 – NGS (transistor for driving LEDs?)
  • IC3 – NGS (transistor for driving LEDs?)
  • IC4 – LNK304GN AC/DC switching converter

I wanted to see if I could talk to the ATtiny13 so I soldered wires onto the pins and hooked it up to my AVR Dragon programmer. ISP was a no go so I soldered more wire to the remaining connection and gave high voltage programming a shot. That was also a failure. But since I already hosed that inductor I have no issue popping the microprocessor off of the board. Here it is soldered onto some perfboard and inserted in a breadboard:

hack LED

I tried ISP again and that was a no-go. But this time around High Voltage Serial Programming worked. I talked to the chip with AVRdude using this command:

avrdude -P usb -p t13 -c dragon_hvsp -v

That polls the chip and reads back the fuse settings. Currently the lfuse is 0x6A which is the factory default but the hfuse is 0xFA. After checking the datasheet I see that they’ve disabled the reset function (that’s why ISP doesn’t work) and enabled brownout detection. I dumped the firmware and the eeprom and that’s where I’m at. Now I need your help.

I haven’t done much reverse engineering before this so I’m not sure what to do next. I disassembled the firmware using ‘ndisasm’ but I have no idea what I can learn from it, or even how to read it. I’d love some help answering two questions:

1) Why couldn’t I talk to the chip when it was on the circuit board?

2) What can I learn from the disassembled code. Update: after running the code through an AVR disassembler it looks like this is just an ascending list of numbers. [Tiago] pointed out in the comments that this is the behavior when the lock bits have been set. It should be possible to reuse the chip by erasing it but I won’t be able to dump the firmware first. Now I’ll focus on figuring out how the board is routed.

Let me know in the comments.



101 Responses to Help me reverse engineer an LED light bulb

  • Angelo says:

    Be careful. Harmful / toxic substance are inside the bulb, as mercury, etc.

  • geg says:

    Angelo, are you sure you’re not thinking of CFLs? I wasn’t aware of LED presenting a mercury hazard

  • goldscott says:

    1. Was the programmer soldered directly to the pins? Maybe there’s a regulator of some sort dropping the HV signal. O’Scope it.

    2. Looks like a lot of “add” in the code and not much control logic. I suppose it’s just running a simple loop cycling through colors though. Maybe the adds are an obfuscated way to go about setting up all the I/O registers, etc. Not sure. Wish the disassembler would’ve filled in register names like some others do…

    That’s my quick first look.

  • alankilian says:

    It looks like you didn’t actually get the code read from the device.

    All you’ve got is an incrementing data pattern. See it count 00 01 02 03 04? That’s it.

    So I would try again to read the code from the chip and then disassemble it.

    And There’s no mercury in LED bulbs, so you’re safe.

  • Squirrel says:

    @Angelo
    Check your facts. You’re clearly mistaking LED bulbs for CFL bulbs (the coily ones)

  • Mike Szczys says:

    @Goldscott:

    1. Yes, soldered directly to the pins. Unfortunately I don’t have a scope.

    2. Anyone know of a better disassembler to use than ndisasm?

  • plaes says:

    This code looks x86 to me, not AVR assembler. Could you either put up the .bin file or disassemble it using avr disassembler?

  • Garrett says:

    The converter’s trying to draw too much current, more than your ISP can provide, which is why you couldn’t talk to it in circuit. We see the same problem in the adafruit Ice Tube Clock kit when you attempt to program the ATMega ISP with the tube plugged it. Cut the leads (Vin0 to the buck converter and you might be able to program it in circuit. But since you’ve pulled it it hardly matters at this point.

    Oh, and there’s not much toxic substances in an LED, Angelo. It’s not a CFL.

  • Dan says:

    The disassembled code doesn’t look correct. It’s just 0×00-0xFF twice, interpreted as assembly. I know some AVR devices can protect their code space from being read for security, is the Tiny13 one of those devices?

  • Nathan says:

    begone mercury scare monger.

    also: your disassembly isn’t of the firmware. note that the undisassembled code is just a couple of regular numeric sequences, e.g. 1, 2, 3, 4…

  • guy says:

    Code looks funny because ndisasm is for intel architecture and not avr, no?

  • Lars says:

    I would say you could not talk to the AVR in circuit because the pins are obviously connected to other components on the PCB. That introduces loads to the pins of the AVR and the programmer, so the signal gets altered, distorted, weakened..

    Sometimes it’s possible with a very slow programming speed.

  • Daid says:

    I don’t think you used the right disasmbler, or atleast it in a correct way. Can you post the raw flash/eeprom files?

    The dump is just the word values 0000 to 00FF, translated to x86 16 bit mode opcodes? Because that looks nothing like AVR ASM.

  • alankilian says:

    That’s just an incrementing patter. It doesn’t look like the code download worked.

  • Daid says:

    (avr-objdump from winavr can disasmble)

  • Mohonri says:

    alankilian is right–that ain’t code you have there. I’d be willing to take a look at the real code once/if we get it. For something as simple as a color-cycling bulb, it won’t be very complex.

  • slinky says:

    Be careful. Eating the LED’s can be harmful! :P

    Seriously though, nice teardown and good job getting the at the code!

  • Cybergibbons says:

    I’d have to question the value in reverse engineering the code – you’ve got a set of clearly defined inputs and outputs, and it’s easy to infer what is going on in the uP. It’s normally only really necessary to reverse engineer more complex system.

  • st2000 says:

    Perhaps later I’ll take a look at the code. But right off I’m thinking “danger, 110V!”. Then it strikes me. These things are $2 each! Buy two. Make one into the power supply then the other into the development / hacking platform.

    If I had to guess w/o looking I would say the software is probably an exercise in pulse width modulation. Such that you can slowly change the colors of the LEDs.

    You pictures are very good. I can see each LED has 6 legs. And there appears to be 3 LEDs (dark spots) in each LED case. If you can trace these back to the micro (probably through a transistor like device) that should help others backwards engineer the code.

    I can think of some great fun with these. I remember internet connected devices which changed color based on scraping the weather or stock market reports.

    What would help is a quick check and sketch of the LEDs leads, how they are powered and from which pin of the micro. That way we could look at the code with an eye of understanding. If the

  • Willyshop says:

    Yup, definitely unsafe. I hear they also contain roentgenium and Darmstadtium, which is probably why they don’t last very long. Oh, and the case is made from asbestos. Better look out for the velociraptors hiding in the box, as well!

  • Mike says:

    I agree about the ASM code dump, it does not read like real code, I don’t think it converted correctly. I see nothing that indicates a control loop of some sort. post the raw dump

  • John Laur says:

    You can’t talk to the chip while it was on the board because HV programming isn’t designed to work in-circuit. ISP doesn’t automatically work in circuit either unless the board is properly designed for it. They probably had the attinys pre-programmed before they assembled the boards as is usual in production at this scale.

    Can you tell if the reset pin is connected to anything on the board? They may have disabled reset as a rudimentary protection measure or more likely they may have needed to repurpose the pin for another purpose.

    The AC->DC converter on the lower part of the board outputs 12V. Undoubtedly the LEDs are driven at 12V by the transistors/FETs on the underside. There is some possibility that the ATtiny is both controlling the LEDs and playing a part in the power supply. Before having a look at the code it would be useful to know something about where the IO pins of the ATTiny are routed.

    It probably wouldn’t even be worth trying to wade though the disassembly if the mcu is simply controlling the LEDs. Theres plenty of code out there for that — it would be easier to simply write your own implementation. If it’s playing a part in the power supply though, things are going to be far more complicated.

  • Cotty says:

    I have 2 questions.
    1. Why do you try to disassemble ATTiny assemble code with x86 disassembler?
    2. Why do you try to disassemble 00 01 02 03 which does not look like processor instructions? Processor instructions are likely to be more “irregular”.

    I would find where they start, find proper disassembler, and try again.

  • Dave says:

    I don’t have an answer to your first question and an partial answer to the second one.

    You can learn a lot form the code in the microcontroller. It can teach you how the device works. Unfortunately, the disassembled code you posted is useless. You used nsisasm, which is a 80×86 disassembler and therefore incapable of understanding avr binary files. Try using an avr disassembler like vAVRdisasm. You’ll see that
    the produced code will make more sense.

    Once you understand how the code works, you can modify it to suit your needs. You can for example make it to display different color sequences or blinking patters. Those are just some ideas.

  • Tiago says:

    If the protectio bits are enable everything that you will read is the flash address and not the flash contents, as said, learn how to use avr-objdump, because its pretty obvious that your disassembly is from a x86 core, those have AX,BX,CX,DX,SI,and others registers, AVR’s have r0,r1,r2, up to r31 and then they have the X,Y and Z for the pointers.

  • bogdan says:

    If you disable the reset, you cannot use ISP. The device looks like it is protected against reading the code(which is how most micros are in commercial aplications in order to protect duplication). Still, it should be easy to reproduce. Also, get a new bulb and hook up a scope on each of the pins.
    Hv programming is not suited for in board and it might even damage other parts of the circuit.
    I wish i could find such cheap bulbs… now attiny13 costs more than $2 for one piece.

  • 5318008 says:

    @Angelo, +1 internets for successful troll.

  • Arpad says:

    You need to reverse engineer the schematic.
    Use generic component pinouts for LEDs & transistors.
    I wouldn’t waste any time on rev.engineering the firmware. 3ch PWM control is not a big deal.

    For debugging don’t use live Voltage, inject 12V after the PSU, it will be much safer after that (it might damage the PSU).

    After finished that, you can think about controlling the bulb. (NO direct connections!)
    Only wireless: IR,RF,sound
    Make it IR remote controllable, like the Philips bulbs.

    Place many in one room, average the colors of your monitor/screen, then make dynamic ambient light.

    That’s all you can do for $2.

  • Donov4n says:

    Dude, get a girl!

  • Chris says:

    Would you please make the binary (or hex) file available to us. Then one of us could feed it into IDA Pro or any other modern analysis tool ;)

  • Matrix says:

    Angelo, your thinking CFL, Led has no toxins, well the plastic / metal isn’t health to ingest, but it lead / mercury / gas free….

  • tanjent says:

    Switching buck regulator + some nmos FETs to PWM the LEDs + shunt regulator for the ATTiny. Not terribly efficient, but this is mood lighting and not illumination.

    The 270 ohm resistors seem a bit high if they’re limiting LED current, but we don’t know for sure what voltage the buck regulator is generating.

    Nice little light for $1.99, wish I had a few to hack on. :)

  • ButWait says:

    @Donov4n
    Which dude?
    They all could use one — or more!

  • tanjent says:

    R4/R5 are feedback resistor divider for buck regulator, which with the feedback voltage of 1.65v from the datasheet gives an output voltage of ~9v.

    R7/R8/R9 are the current limiting resistors, which the original post read incorrectly – looks like 18, 22, and 27 ohms. guesstimate 150 mA per LED die? that seems high still, but not ridiculous.

  • DarkAurora says:

    Only $1.99? And I got my IR controlled one for like $30. Feel like a sap now. Ah well. Looking forward to the development of this project, maybe then I can add IR to a bunch of these and have a whole bunch running off of one remote.

  • Filespace says:

    i rember back in the dishnet hackign days on some 301 irds having to cut a trace that was holdign the reset pin of the tsop low to be able to gain read/write access.. i would be intrested to see what the pins on the atiny are tied to.

  • mowcius says:

    Yeah I think the mercury thing was some spammer and it’s all over now but mercury scare?

    Mercury’s fun! Just play outside :p

    Nice work on this, shame I have not seen anything similar in the UK, would be a nice thing to hack up.

  • M4CGYV3R says:

    Awesome to see people hitting up Sector67. I’m gonna have to stop by late December when I’m back up there.

  • Mike Szczys says:

    Tiago mentioned that the lock bits might be just feeding the register addresses when read. I think he’s right because I tried disassembly with vAVRdisasm and I get sequential numbers. The debugWire is not enabled so it looks like there’s no way to dump the code.

    I’ll need to try and figure out how the board is wired up. I’ve done some continuity testing but no success if tracing from uC pins to transistors, or figuring out how the LEDs are connected. Bit of strangeness going on that I’ll have to look into more this weekend.

  • xorpunk says:

    Can read out every page of EEPROM and FLASH even with the bits and fuses set using a buffer/reset trick ^^

  • xorpunk says:

    BTW I think they officially support rewriting to both, but only after chip erase is called, and after reset. Read about watchdog and the buffer-before-erase method to get data out on the 1-wire pin.

  • Tiago says:

    If you want I can give you working code for the arduino IDE that uses an HSL colour wheel and then translates the Hue value to RGB and output that as pwm for an RGB led, but its very very easy to do, and there are many examples out there.
    Fell free to ask.

  • bitbot says:

    @xorpunk

    Could you provide some details on the buffer/reset trick? I took a look at the datasheet and didn’t see what you meant. I’m curious…

  • gmcurrie says:

    Hey Angelo, no worries – I glanced at original post and thought exactly the same as you till I saw the pix of the *plastic* bulb – yep, DUH :)

    Just looking at looking at CFL circuits for first time- interesting, but a bit Hairy-Scary / incomprehensible for me – (soon as it gets into Coils/Inductors am a bit lost…)

    Any interesting hacks with CFLs/’CFL bases’ (i.e. sans bulb) out there? I keep getting packs of them sent to me for free from my electricity supplier, but I don’t like the light they give out so they just sit in my cupboard.

    http://www.pavouk.org/hw/lamp/en_index.html#electrical_construction

  • jeditalian says:

    yeah you take a cfl base and hook it up to a tv’s flyback transformer and make a lightning machine. i don’t remember exactly what you hook where, google it. http://www.youtube.com/watch?v=hHsxnbCQCww&feature=related

  • jeditalian says:

    when i originally read the cfl+flyback thing, i thought it said you could make like really long ‘lightning bolts” like a few feet long.. i love it when a cfl burns out. burnt out incandescents are practically useless, but a dead cfl brings something to the table

  • aReddishGreen says:

    Looks like a fairly strait forward circuit to me. The LinkSwitch LNK304 universal off-line switch mode controller is a class of devices found a lot in the smaller wall adapters for cell phones and the like. That particular chip can only output about 170mA of total current due to the limitations of the internal switching FET. It probably just provides the board with regulated 5V, based on the requirements of the ATtiny and the fact that I don’t see another voltage regulator. Although it might be possible that D4 is a zener and is being used as a rudimentary regulator for the AVR.

    Throw in a few FETs as low side switches to PWM dim the RGB channels of LEDs and you have yourself a mood light!

  • Gdogg says:

    LOL@not seeing the no read pattern and THEN trying to use an x86 disassembler on it.

  • John13busa says:

    The Chip is
    Vendor Power Integrations (VA)
    Category Integrated Circuits (ICs)
    Packaging Cut Tape (CT)
    Package / Case 8-SMD Gull Wing, 7 Leads
    Power (Watts) 12mW
    Voltage – Input –
    Voltage – Output 700V
    Frequency Range 62 ~ 70kHz
    Operating Temperature -40°C ~ 150°C
    Output Isolation Non-Isolated
    Lead Free Status Lead Free
    RoHS Status RoHS Compliant
    Other Names LNK304GN TL
    LNK304GNTL
    596 1022 1 ND
    59610221ND
    596-1022-1

    ++ Opinion ++
    The LED color change is by altering the voltage in cycles and there are three LED Colors (RGB).

    The Transistors are being used to cycle the different voltages to the different colors at different times for the effect

  • steaky says:

    I am using 2 capacitors and a zener to act as a voltage divider getting mains AC to around 15vDC. Maybe this is the power source

  • bogdan says:

    @Mike Szczys
    To the beste of my knowledge, those leds contain 3 leds each with it’s own anode and cathode, so probably you have the reds in series, the greens in series and the blues in series.
    By the looks of it, D6 has all the pins on the left connected together and my guess is that this is the common anode and should be at 9V or how much the psu is giving. The should have used NMOS transistors as this is the easiest way to control a higher voltage than that powering the micro.
    Here: http://www.es.co.th/Schemetic/PDF/LNK304-306.PDF at page 4 on top is a typical schematic with the switcher, this should help get the schematic out of the board.

  • punt says:

    @Angelo Did you even read TFA? That is just lame..
    The worse is that you have the same name as me.

  • ToykoDrift says:

    those capacitors without lable are probably nothing special, probably just blocking capacitors and capacitors needed by the swiching converter
    if you have a look at the converters datasheet you see that it needs a coil and a diode, too, so that’s probably what they are good for
    but where is the rectifier?
    TD

  • bogdan says:

    Actually there isn’t a rectifier. The switcher only needs a half wave rectifier. Check the data sheet that i posted before for the schematic.

  • ToykoDrift says:

    oh right, what do you want to achieve by hacking that thing?
    you could simply erase the whole chip, i guess this would also erase the lock bits, then you could upload a new programming file to the avr, but what would that be good for? I mean, this is an AVR wired to RGB LEDs, what could you do with that apart from fading through the colors?
    TD

  • ToykoDrift says:

    bogdan: yeah sorry I didn’t see that
    but there are doides missing for that layout
    maybe there are some hidden underneath the big capacitors or something…
    but hey, there are D1 to D3 missing anyways, so, look for those OP
    PCB doesn’t look like it would have more than two layers, OP should make a schematics diagram
    TD

  • maverrick says:

    bogdan kinda beat me to it there
    http://www.es.co.th/Schemetic/PDF/LNK304-306.PDF

    first rule of reverse engineering if you can identify the IC’s involved forget the circuit for a moment and RTFM , for something this simple 9/10 times the manufacturer will use something very close to the example circuits , real EE’s dont waste time reinventing the wheel when the designs are put on a plate.

    from there its a simple task of logic as to whats happening with the rest of the circuit

    its a simple buck converter with a AVR tiny PWMing the led’s.
    Pointless reverse engineering the code as its a 3 min code job to recreate.

  • xorpunk says:

    @ToykoDrift: I’m also wondering what the big deal is. The instruction set for this chip is so small you can literally guess the code with little effort.

    This IS after all an LED sequencer circuit..

    confirmed methods with bits and fuse programmed:
    -program after chip clear and reset both EEPROM and FLASH
    -timing attack with watchdog timer with 1-wire hooked and waiting to get dumps

  • Mike Szczys says:

    @bogdan: Thanks for the tip on the LEDs. Looks like they pinout like this (bevel on package for orientation):

             ____
    Red+ __ /    |__ Red-
           /     |
    Grn- __|     |__ Blue-
           |     |
    Grn+ __|     |__ Blue+
           |_____|
  • Chris says:

    @gmcurrie: Yes, you can remove the circuit board from a CFL and use it to drive a regular linear fluorescent tube, but typically at reduced power. For example, you might only get 15W from a 23W CFL ballast when driving a T8. A few people have successfully used this trick for small planted aquarium lighting fixtures. Also note that CFL ballasts weren’t intended to have replaceable bulbs, and are built as cheaply as possible; so not all will handle a failing bulb gracefully. Some try so hard to drive a failing bulb that they’ll self destruct. In planted aquariums, where bulbs are usually replaced once a year and well before failure, that’s not a big deal; and if a ballast goes out with the bulb, just replace it with another free one. I use CFLs extensively around the house, and collect and examine the ones that burn out, and I’d estimate about 25% of the ballasts die along with the bulbs; the other 75% can be reused.

  • fartface says:

    REverse engineer a led bulb…

    Hack a day for N00bs….

    Honestly, did the OP even id the chips and then download the documents on it? This is 3rd grade Electronics level stuff…

  • st2000 says:

    Fine then! Stop the bickering and get on w/it!

    >>>A Challenge<<>>There now, off you go, remember no high voltages.<<

  • st2000 says:

    GOOD GRIEF! WHAT HAPPENED TO MY POST!!! LETS TRY THAT AGAIN!!!!

    Fine then! Stop the bickering and get on w/it!

    …A Challenge…

    I propose making these $2 lights do your bidding. Not just be random. Eh, that’s the hack! Use a common remote to turn them on/off & change color.

    So, here’s what I think ya-all should do:

    1) Be careful! For all development use a low voltage power source. Not the included switcher!

    2) Erase the uP. I agree, it’s not worth reverse engineering the software.

    3) Add an Inferred ASK receiver module. These are cheap and common and the output usually suitable for direct connection to the uP.

    4) Now then, the magic, the secret sauce: You need to develop PWM code to control the lights of course. But this go around you need to also decode the IrASK code sent out by your common remote control. I would recommend trying to decode the RC5 On and Off first (’cause that’s what I have :)). No no, well, yes, I do have one (well several RC5′s as a matter of fact). No, no, I recommend RC5 *purely* because there have been some very nice write ups here at hackaday.com:
    http://hackaday.com/2008/10/30/how-to-usb-remote-control-receiver/

    …There now, off you go, remember no high voltages…

  • Addidis says:

    I have to agree with some of the other comments. To reverse engineer code that pwms an led is a complete waste of time. The code can be written in C WAY easier, 5 mins ? I would scavange parts from these. Then make a light setup , that uses a wall wart. Its just not worth it to me to “condone” futzing with a board with AC current on it. Thats how potential hackers die trying to do the project.

    Not that a properly competent person shouldnt play with this, but I could see this going horribly wrong.

  • R. Barrabas says:

    An ATTiny13 has 6 I/O lines… are any spare?

    If you have two lines spare, you can hook them up as an X10 receiver and turn the unit into an X10 module.

    I’ve built ATTint26 X10 driver code that does both send and receive in 300 bytes, so just a receiver would be smaller.

  • feenk says:

    So I bought a set of five led ‘tea-lights’ from home depot it is a color changing led shaped like a tea-light…got them for 5 bucks in the Christmas section. I took it apart and it has the led and they left the leads attached and just soldered wires to them…rgb leds cost a buck or so at rs so this seems to be a good deal…I havent torn it apart enough to see what is controling it…

  • Eric says:

    I agree with the others that this is not rocket science – driving a few LEDs from a small avr is pretty simple stuff.

    This thing definitely has a transformerless power supply, and you need to be careful with that – there are dangerous voltages throughout.

  • unixbigot says:

    Here is some code I wrote for an ATTiny13 that uses software-pwm to drive an RGB-led “mood light”:

    http://blog.unixbigot.id.au/2009/11/driving-rgb-led-from-microcontroller.html

    The light itself uses approximately zero parts. For the mains->5v conversion, grab an old cellphone charger from a flea market.

  • tristan says:

    you can get a cheap UV light if you break the yellow colored filter off of a “white” led

  • George Johnson says:

    One thing I would question, is if the chip has security enabled (and I’m just guessing, I’m not an AT kinda person), is what would you read back from it?? Code? Gobbledygook?

    Since a lot of companies, when they build something like this, they enable security bits (if available) so people can’t…. do this.

    So, what would you expect to read back out of it?

    Just a thought.

    not a bad deal though, you get a usable chip (I hope) and a couple parts, LED’s etc…

    But from the video, I can’t see ANYbody wanting these things. Not unless I ran a whorehouse or something. UGLY!

  • Jeff says:

    If any one is going to use an oscilloscope on this circuit then make sure you are using an isolation transformer.

    Or better still…don’t use an oscilloscope avoid the risk, the slip of the probe, the sparks, the pain and above all the humiliation! :-) Danger!
    online powered circuitry can get the best of us, I know, I’ve fixed more SMPSs and ‘live’ cctry. than I’ve had hot dinners!

  • ewanuno says:

    that’s cool, i hope i can find some of these here in italy, 3 euros would be cheap enough to be a substitute for blinkm’s.

    it would be great to get a load of them working together under dmx control. individualy adressable via an arduino and a 1 wire buss.

    led pixels for maybe 4 euros each, that’s pretty good. maybe it would be possible to strip them to bare bones and power them from a centralised power supply.

    did you find a way to program it on the board?

    p.s. ignore the trolls

  • Gdogg says:

    looks like someone figured out a way to italicize all the comments after his. cough cough @st2000

  • st2000 says:

    Oh, is that what anon meant by Ooooh, italics!!

    I starting receiving comments by email and didn’t understand the references – dismissing them for some weird inside joke I was not privy to.

    It, what ever it was, was unintentional.

    Let’s see, some reverse engineering, some hacking…

    There, did that work?

  • st2000 says:

    Ok, one more try…

    <<>>

    Test test 1 2 3

  • cde says:

    Stupid st2000 broke the stupid blog with his stupid self closing italics tag. / now?

  • Concino says:

    Why bother disassembling a code that only think it does to change colors? I mean, how hard could that be to write that code from scratch? Granted it is a good hacking practice but, I disagree that you’d get great ideas from the code.

  • siklosi says:

    Why don’t you use code like this one (it’s GNU licensed):
    http://blog.kevinmehall.net/2007/rgb-led-rainbow-fader

    instead of decompiling… there is also source so you can modify it as you wish ;)

  • oh_herro says:

    http://www.hex-rays.com/idapro/idadownfreeware.htm That is the only disassembler anybody ever needs… I’m not sure which processors the free version supports… Unfortuneately the full versions are pretty pricey but give it a look. IDA provides full jump and data access cross references, type inference based on function signatues, etc… It will be more helpful for you than a dead listing if you don’t know the instruction set very well.

  • bogdan says:

    There isn’t much point in talking about disassemblers as it it is clear that the micro is protected against reading. Plus, i think that the purpose of this hacking is to make the lamp do something else, and that requires rewriting the software. And that random blinky thing it normally does is quite simple to do.

  • AussieTech says:

    [/i]

    “oh right, what do you want to achieve by hacking that thing?” @ToykoDrift

    You might learn something?

    Somehow or other it gets low voltage power for the IC and LED’s – find what and where and you can power it IN there from a bench supply for safer hacking.

    If you can disassemble the code then it is sure to teach you something or even provide a laugh.

    You could take a new uP, programme it and use this existing LED hardware as an outboard while you develop your own app.

    * Rebuilt
    a failed CFL with LED’s using HV caps from the CFL as capacitive droppers = night light.

  • will says:

    N00BISH like me!!!!!!!

  • st2000 says:

    @Filespace

    Yeah, I thought so too.

    Thanks for trying!

  • cde says:

    @ st2000 you broke it by adding a self closing italics tag. Italics tags arnt supposed to be self closing…

  • askjacob says:

    Oh my. All these folk going “this is trivial why bother reverse engineering it” really don’t get it.

    Either you are a hardware and code god, or you only like reading a complete tear down article that spoon feeds all the techno-goodness for high tech devices. Those of us who remember what starting out is like, sit back and watch in amazement. To learn, one should start somewhere sensible – such as a trivial device like this. Remember: the whole point of the exercise is NOT TO CREATE AN RGB MOODLIGHT.The point is to figure out how it ticks, from the ground up. A bonus – a lesson on how to pull code from an attiny, perhaps leading down the fuzzy path of how to extract the code from a “protect fuse” set chip. Huge amount of learning to be had here, even if this device never reveals it’s code….

  • Anon says:

    Why solder to the MCU’s pins when you have test points on the PCB? Just a thought.

  • Larry says:

    I had the original bulb like this at Sector67 opened up. I found that I could put a DC voltage into the base and get it to light up – but it only stays blue – won’t color change. Also I found a couple points in the board where I soldered some wires on and can put 6 volts DC in it and it lights up but also only lights up as blue and will not color change. Maybe it needs the AC for something.

  • I tried a bunch of close em tags to stop italics. No go…

  • <<><>>
    reversing the &LT and &GT series that started the italics?…

  • Interesting… some of the &LT and &GT where gobbled. Okay enough experimenting. I suspect the original strings that borked this topic into italics had even more &LT and &GT that were also gobbled. I was thinking that reversing the original may fix this mess, but it would need to replace the chars that were consumed in the borkage.

  • st2000 says:

    @Rob Wentworth
    Thanks Rob for trying. As the original bor-ka-ger I can clue you in on the gobbling. I had placed 3 less then signs in a row to “high light” some text. The next paragraph started with the letter “I” followed by a lot of text that all got gobbled. Then came the fateful 3 greater then signs. Actually the next post is almost identical except I surmised what had happened and replaced the greater and less then signs with periods. (But only later I realized the italics directive was propagating to subsequent postings :O!)

    Obviously what we are trying to get around is a filter to prevent entering HTML. What no one has been able to do yet is to pass the forward slash symbol through the filter.

    I suppose it’s time for my weekly try at this:
    1) Take that! <> test
    2) And that! <> test
    3) And that! <<>> test
    4) One more time! <<>> test

  • Caleb Kraft says:

    THERE! took me forever to find it and I saw Mike was in there looking too. It should be cleared up now.

  • cde says:

    Hmm italics + bold + underlined?

  • Leave a Reply

    XHTML: You can use these tags: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

    Hack a Day serves up fresh hacks each day, every day from around the web as well as hacking related news.

    Send us your hacks










         




    Hacks

    Resources