+ Reply to Thread
Results 1 to 8 of 8

Thread: Remote Controlled, dimmable LED Lamp - now with source

  1. #1

    Default Remote Controlled, dimmable LED Lamp - now with source

    My most recent project: A remote controlled living room lamp.

    This was done using a Propeller chip to control a TLC5940 LED driver, and is one of my first "fully complete" projects.

    The circuit was designed in DipTrace. The PCB was cut with my CNC machine using isolation routing paths output from DipTrace. As coded, it can be controlled using the volume and channel buttons on any Sony TV remote.

    The LED driver is written in PASM using BrillDea's SPIN driver as a starting point. The driver is unique in that it's the first I've seen in PASM, and it properly handshakes between the cog running the PWM clock and the cog doing data transmission. This avoids the single frame flicker that happens if you latch in new data during the PWM cycle. I haven't timed it, but the GS cog should run roughly 1500fps & 80MHz (4096 ticks, 3 instructions each), and the data update cog about 10x faster (~10 instructions per bit, 192 bits).

    The Sony Remote code is Jon McPhalen's SIRCS object.


    For physical construction, the shade is made of a 4' x 2' sheet of thin HDPE, the ends are garbage cans from Target, the central column is 1" PVC from Home Depot, and the "caps" are custom routed 1/2" UHMW plastic.

    The LEDs are 16 foot-long sections of a 16 foot 12v LED strip, purchased from Amazon. The LEDs are spiral-wrapped around the PVC column at even intervals, and all the channel wires are run through the tube.

    Each LED strip is run at 120ma, which is the maximum rated sink current for the TLC lighting chip. The power supply is a common 2A @ 12v / 5v switching supply, usually used for external hard drives. I currently don't do anything clever like disable cogs or lower the clock rate when the lamp is "off", though I plan to. Current use is 1920ma at full power (calculated, not measured), with a small amount of additional power for the brain.

    It's a little brighter than a 100 watt light bulb, but only uses 24 watts at full brightness.

    I have included full source, as well as the schematic and board layout for DipTrace, as well as a simple GIF of the schematic. The code is heavily commented and should be pretty easy to follow. Comments welcome on the code and schematic - particularly the latter, as this is one of my first "real" projects.

    Pictures:
    http://www.facebook.com/album.php?ai...2&l=4320ebfe4f

    Video:
    http://www.youtube.com/watch?v=J8H9-FBXlFY
    Attached Thumbnails Attached Thumbnails Click image for larger version

Name:	12-FromTop.jpg‎
Views:	980
Size:	109.9 KB
ID:	79690   Click image for larger version

Name:	11-LampOverview.jpg‎
Views:	875
Size:	99.2 KB
ID:	79691   Click image for larger version

Name:	RoomLampSchematic.jpg‎
Views:	691
Size:	85.1 KB
ID:	79765   Click image for larger version

Name:	CircuitPic.jpg‎
Views:	653
Size:	113.2 KB
ID:	79768   Click image for larger version

Name:	EndCapDetail2.jpg‎
Views:	601
Size:	100.7 KB
ID:	79767  

    Attached Files Attached Files
    Last edited by JasonDorie; 04-01-2011 at 06:16 AM. Reason: Added source & schematics

  2. #2

    Default Re: Remote Controlled, dimmable LED Lamp

    Nice project, well done! Any chance you will be posting code?

  3. #3

    Default Re: Remote Controlled, dimmable LED Lamp

    I'm probably going to (haven't quite decided yet), but there's really not that much in the code that isn't already in the obex.

    The TLC5940 driver is there (although I wrote mine in PASM, it didn't need to be - it was just a good exercise), as is the SIRCS (Sony Remote Code) handler. The rest of it was just the glue that made the lights change in interesting ways. The physical construction of it took me several days, but the coding only took about an hour or two.

  4. #4

    Default Re: Remote Controlled, dimmable LED Lamp

    I think the ASM version of the TLC5940 driver is of greatest interest to at least me.

  5. #5
    PJ Allen's Avatar
    Location
    Outer Darkness! Charon-Quaoar-Sedna Circuit
    Posts
    5,016
    Blog Entries
    1

    Default Re: Remote Controlled, dimmable LED Lamp

    How does it stand up so well? Weighted base?

    Do you have an auto/show-off mode?

    Are you using a switching supply or a linear?

    (As seen on Hack-a-day, too!)
    Last edited by PJ Allen; 03-31-2011 at 11:55 PM. Reason: re-phrase

  6. #6

    Default Re: Remote Controlled, dimmable LED Lamp

    @PJ - The power supply is a switching 2A 12V/5V, commonly used to power external USB hard drives. The lower of the two trash cans is weighed down, and the lower "end cap" for the lighting tube has an indent cut in the lower edge that's a snug fit. I've added a pic to show a little more detail on the end cap and the fit with the base.

    There isn't a "show off" mode, but it'd be pretty trivial to add a demo mode. I actually want to add a "sparkle" mode that keeps the overall brightness value chosen, but twinkles the lights a little, almost like a string of Christmas lights. There are lots of possibilities.

    I also wrote all the code to be heavily configurable with consts, so if I decide I want to add more channels, increase/reduce the staggering between channels, add new fade modes, change the overall speed of brightness adjustment, etc, it's almost all done with just a few consts in the main file. I've amended the original post to include the board, schematic, a close up of the finished board, and all source.
    Last edited by JasonDorie; 04-01-2011 at 06:02 AM.

  7. #7

    Default Re: Remote Controlled, dimmable LED Lamp

    Very nice Jason!
    Infernal Machine

  8. #8
    sam_sam_sam's Avatar
    Location
    Propeller Proto Board........> Sunny Jacksonville FL
    Posts
    2,150
    Blog Entries
    2

    Default Re: Remote Controlled, dimmable LED Lamp

    Very COOL Project

    I really like the remote control part of the project
    Very nicely done
    Sam
    _________________________>
    Now wanting to learn Spin Thanks for any idea that you may have and all of your time finding them

+ Reply to Thread

Similar Threads

  1. [in progress] Boe Bot remote controlled with XBee
    By HackWar in forum Projects
    Replies: 3
    Last Post: 02-04-2011, 09:48 AM
  2. Ir remote controlled Scribbler2
    By ratronic in forum Robotics
    Replies: 0
    Last Post: 12-10-2010, 05:37 AM
  3. Replies: 11
    Last Post: 09-30-2007, 01:11 AM
  4. IR remote controlled 30 minute delay circuit
    By Gary Renaud in forum BASIC Stamp
    Replies: 3
    Last Post: 02-12-2007, 10:38 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts