Shop OBEX P1 Docs P2 Docs Learn Events
Ambient RGB LED Lamp — Parallax Forums

Ambient RGB LED Lamp

darcodarco Posts: 86
edited 2007-11-13 07:15 in General Discussion
I started messing around with microcontrollers a few months ago, and after much tinkering I've finally finished my first PCB. I've already sent it off to get fabbed, but I was hoping to get some feedback here that I can perhaps apply to my future boards.

This board will be a part of an Ambient RGB LED Lamp, and uses an SX28-DIP. The LED's will be mounted on the outer corners, pointing slightly toward the center. Each corner can be a different color, with the intention of being able to control the color of different sides of the lamp independently. Here is a mockup:

pic-986-medium.png

I had to use two darlington arrays because the LED's would be pulling too much current when all lit. I added two extra connectors (EX1 & EX2) for the unused circuits on the darlington arrays to facilitate future tinkering.

With the pic below, I've superimposed the bottom copper layer, so that you can follow the traces. (Note that the caps and one connector are missing from the image below. Ignore that part)

pic-987-medium.png

As you can see, the bottom layer is mostly ground plane.

Here is the schematic:

pic-988-medium.png

Any thoughts?

Comments

  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2007-10-16 16:20
    Can you attach the pics? All I see is the boxed frame·with the red x in the middle. I did also right click over the pic and selected Show Pic and still see nothing.

    Ahh. I also tried clicking on them as they appear to be links. However, at work it is restricted me from viewing them as your site is not a "business related site" - Websense.
  • darcodarco Posts: 86
    edited 2007-10-16 17:06
    Attached.
    704 x 704 - 205K
    716 x 716 - 134K
    1119 x 892 - 178K
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2007-10-16 17:12
    Very nice job on the schematic and pcb! I see the connection for the PROP PLUG. You must be using a Propellor for the main control.
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2007-10-16 17:19
    Darco,

    a really nice design, here some remarks:

    - When possible, the OSC1 and OSC2 traces should be as short as possible to avoid generation of EMI. In your design, you have located the SX-Key header on the opposite side of the SX package. It would be a better idea to place it on the other side, close to the crystal, and the OSC1/OSC2 pins.

    - To avoid EMI, it is important to place a filter cap (e.b. 100 nF multi-layer ceramic) as close as possible to and between the Vdd and Vss pins of the SX28.

    - Maybe, it is an idea to place a third pad connected to Vss between the two pads for the xtal - this would allow you to alternatively install a ceramic resonator.

    - In general, input pins should not remain floating, so you may add an extra pull-up resistor for the RTCC input (10kOhm would be fine).

    - You may consider placing a diode (any 1N400?) in series with the input supply (anode to the connector, cathode to the regulator) to protect the board against wrong supply polarity.

    - Depending on the type of regulator you plan to use, two additional 100 nF caps between the IN and GND pins, and between the OUT and GND pins may be required to avoid unwanted oscillation.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
  • BeanBean Posts: 8,129
    edited 2007-10-16 17:33
    Hmm,
    It works fine for me. But then I'm the IT manager so "I" get to decide what is a business site and what is not.

    My only suggestion is that you should have some caps on either side of the xtal to ground. And I would put a 0.1uF cap on Vcc and Vss as close to the SX chip as possible.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My goal is to live forever...Or die trying.
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.hittconsulting.com
    ·
  • PJMontyPJMonty Posts: 983
    edited 2007-10-16 17:56
    Darco,

    First, the board has a really nice looking layout.

    Three thoughts:

    1 - Don't be surprised if the power connector holes are really big compared to the leads going into them. IT appears that the plug footprint follows the manufacturer's datasheet specs. The first time I used a coaxial power plug, I followed the datasheet for the suggested hole size and found them to be way to big. I have since made them smaller so I don't have to fill the gap with a ton of solder.

    2 - You might consider changing the LED silkscreen outline. I use one that has a flat side near one lead so it's easy to get the orientation right when stuffing the board.

    3 - Consider putting some text near the SX and Prop headers that indicate which way to install the SX and Prop keys. It's easy to put them in backwards and damage the keys. I always put the text "SX-Key Front" or "Sx-Key Back" on one side of the 4 pin headers so I know how to plug it in weeks, months, or even years from now without looking at the schematic.

    Thanks,
    PeterM
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-10-16 18:27
    Nice, neat layout! In addition to the above comments, I would also recommend using an LM2940 for the regulator, which has all kinds of built-in protections, including reverse battery protection. It requires a low-ESR filter cap, though, close to the output pin. If you can find room near there to add a 22uF tantalum, that would be great. Also, your schematic shows a 1000uF cap on Vdd. Double check the footprint of the cap you've got on your layout. It looks a bit small to accommodate a 1000uF electrolytic. Finally, if you intend to use your SX-Key port for debugging, use a socket for the crystal, so you can remove it. (I usually design in a 5-pin SX-Key header with a removeable jumper on the top two pins that connects the crystal/resonator to the SX when the SX-Key is not plugged in.)

    -Phil
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2007-10-16 18:40
    Phil,
    Phil said...
    (I usually design in a 5-pin SX-Key header with a removeable jumper on the top two pins that connects the crystal/resonator to the SX when the SX-Key is not plugged in.)
    That's a very neat idea about the removable jumper! Is that 4 or 5 pins? Any schematics or drawings you can post?
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-10-16 19:30
    The attached schematic shows the scheme I use. (This one acutally uses a 6-pin header. The bottom pin can be jumperd or not to ground to switch Vdd between 3.3V and 5V. But for a single Vdd system, that pin can be removed, leaving five.) The top two pins get jumpered when the SX-Key is removed, for normal operation.

    -Phil
    502 x 334 - 10K
  • darcodarco Posts: 86
    edited 2007-11-02 17:26
    I got the fabbed board back, populated it, and... it works! ...for the most part.

    It seems I'm running into some stability issues when I run off of the external crystal. Not a huge deal at the moment, because the internal oscillator is plenty fast for making pretty colors. Curiously, the external crystal DOES work when I have the SX-Blitz attached! Hopefully this won't be a problem on the updated layout.

    I've taken the advice I've read in this post and also my experience with the board I got back and come up with the following improved design. About the only advice I haven't taken is the advice about which side of the chip to put the SX Key port on, because it seemed to lead to a rather inconvenient layout.

    I plan on fabbing a few of these for presents for christmas. I'll be sending off the design early next week. (If anyone else wants a board as well, let me know and I'll add it to the batch. $15 is what it costs per board)
    713 x 713 - 190K
  • pwillardpwillard Posts: 321
    edited 2007-11-03 01:33
    I don't see the oscillator·capacitors in the design. The oscillator consists of the inverter inside the chip, the external crystal· and the external capacitance .· The extrernal·capacitance adjusts the phase shift of the network to allow oscillation.· No caps, unruly oscillator.· You should try using between 22pf to 39pf from each pin of the crystal to GND to get reliable clock.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

    There's nothing like a new idea and a warm soldering iron.

    Post Edited (pwillard) : 11/3/2007 1:39:53 AM GMT
    531 x 456 - 13K
  • RickBRickB Posts: 395
    edited 2007-11-03 03:54
    Regarding hole sizes. As someone who spend his days repairing 2 way radios I can tell you that, parts that are accessible to the outside world are the most common thing to break. Volume controls, switches, and jacks. Provide LOTS of clearance around the leads and pins of those and other multi-leaded parts. If possible, use parts that have protrusions that interlock with the board so that external force is not applied to the solder connections. When you or someone else has to repair that board you will be glad you did. It is very frustrating when some bonehead lays out a board with a thou or 2 of clearance around around the pins of a part and also forgets to include thermal relief for the ground and power plane connections. If you have the room, allow for it. The added cost of the solder is irrelevent. Anyone that does repairs on a daily basis knows what I am talking about.

    Rick
  • darcodarco Posts: 86
    edited 2007-11-03 05:35
    pwillard: Thanks for the explanation, I'm still learning all this stuff so it helps considerably to actually understand why these things are necessary. I figured that was why my oscillator was misbehaving on the current boards. If you look closely at the updated board, you'll notice that I have added two caps hooked up to the oscillator.

    rick: I'll take another look at the board and see if I can provide some more clearance around the various parts, but things are pretty tight as they are---I'm not sure I'll be able to make much of a difference. Oops, I got a bit confused. You were referring to the power plug footprint. I'm leaving the footprint alone, big holes are good for those connectors. [noparse]:)[/noparse]

    Post Edited (darco) : 11/3/2007 5:44:59 AM GMT
  • pwillardpwillard Posts: 321
    edited 2007-11-04 18:19
    FYI: The reason that the capacitors are not exactly "defined" or included "internal" to the chip are due to the fact that the value of the capacitance is defined by the specific crystal used, therefore... it's left up to the designer to get it exactly right.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

    There's nothing like a new idea and a warm soldering iron.
  • CapdiamontCapdiamont Posts: 218
    edited 2007-11-05 05:30
    If I may, and this is more opinion, than maybe fact, but I thought the external oscillator is mainly for timing accuracy, not the speed of the chip. IE if you needed high speed communications, or a RTC, or anywhere timing is critical. So then we have to figure out, if it is needed. If not we could save a bit on parts, and the bit of power needed to power those parts?

    How is the design being controlled? Is the control of colors a critical timing issue?
  • pwillardpwillard Posts: 321
    edited 2007-11-06 03:37
    More than likely... a 3 pin resonator might have been a better choice than a crystal... but that's just my own opinion.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

    There's nothing like a new idea and a warm soldering iron.
  • CapdiamontCapdiamont Posts: 218
    edited 2007-11-06 05:19
    Why choose one or another?
  • BeanBean Posts: 8,129
    edited 2007-11-06 12:19
    Capdiamont said...
    Why choose one or another?
    The three pin resonator already contains the required capacitors.

    Bean

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.hittconsulting.com
    ·
  • darcodarco Posts: 86
    edited 2007-11-06 19:14
    Well, I mentioned that the previous board design I had was close to final, but I ended up making a bunch of changes last night so that I could add a button, which will be the soft on/off/mode switch for the lamp.

    I also moved the SX Key header to the other side of the chip, as was suggested.

    Regarding the crystal: I want to be able to control the lamp via the prop-plug port, so I figured that I needed the extra precision of a crystal in order to get the timing right. Without computer control, the internal oscillator is plenty fast enough to smoothly run the lamp.

    Just in case, I added the extra bits to the board to allow for a crystal or resonator.

    The SX chip will be socketed.
    713 x 713 - 501K
  • BeanBean Posts: 8,129
    edited 2007-11-06 19:17
    The resonator is more than acurate enough for serial communications.
    They are in the order or 0.1%, where the internal is 8%

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.hittconsulting.com
    ·
  • CapdiamontCapdiamont Posts: 218
    edited 2007-11-08 03:37
    darco: Please understand, I'm not trying to criticize your project at all, just trying to learn. In fact I love it.

    Bean, so internal is not accurate enough for serial communications? The crystal is more accurate? What about power consumption? What about cost?
  • pwillardpwillard Posts: 321
    edited 2007-11-08 03:47
    The resonator is "accurate enough" and cheaper than a crystal and usually considered a good trade off between cost and accuracy.

    Basic rough costs in order of accuracy:

    resonator = $0.50
    crystal = $1.00-$2.00··· (you still need to buy capacitors to go with it)
    oscillator = $2.00-$5.00 (will interfere with sx programmer most likely)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

    There's nothing like a new idea and a warm soldering iron.
  • DigitalDjDigitalDj Posts: 207
    edited 2007-11-09 04:02
    Darco,

    Do you have any code for the board? Tell me your plans on the board and what you will be using it for. Plans to use it alone or controlling from the serial port?

    Thanks,
    kevin


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

  • darcodarco Posts: 86
    edited 2007-11-09 19:02
    I thought you guys might want to see some pictures of the prototype boards and the lamp itself:


    pic-997-medium.jpeg

    pic-993-medium.jpeg

    pic-1009-medium.jpeg

    pic-1002-medium.jpeg

    pic-999-medium.jpeg

    A few more pictures are on my blog post.
  • deSilvadeSilva Posts: 2,967
    edited 2007-11-10 00:14
    This looks phantastic! I shall try to do it with a Propeller Chip alone. It has >20mA per pin, and 300 mA altogether, so it should be possible to light 12 superbright LEDs without any additional hardware. Main issue will be the forward voltage of blue and white LEDs, as the Propeller is a 3.3V device, but 3V6 is permitted...

    Post Edited (deSilva) : 11/10/2007 7:06:13 AM GMT
  • darcodarco Posts: 86
    edited 2007-11-13 07:15
    For the curious, a video of the lamp in action can be found on this blog post.
Sign In or Register to comment.