Parallax Forums
  HomeLog InRegisterCommunity CalendarSearch the ForumHelp
   
Parallax Forums > Public Forums > SX Microcontrollers, SX/B Compiler and SX-Key Tool > Ambient RGB LED Lamp  Forum Quick Jump
 
New Topic Post Reply Printable Version
27 posts in this thread.
Viewing Page :
 1  2 
[ << Previous Thread | Next Thread >> ] | Show Newest Post First ]

darco
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Oct 2007
Total Posts : 85
 
   Posted 10/16/2007 12:13 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
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:



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)



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

Here is the schematic:



Any thoughts?
Back to Top
 

T&E Engineer
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Sep 2005
Total Posts : 1400
 
   Posted 10/16/2007 9:20 AM (GMT -7)    Quote This PostAlert An Admin About This Post.

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.

Back to Top
 

darco
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Oct 2007
Total Posts : 85
 
   Posted 10/16/2007 10:06 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
Attached.
Image Attachment :
Image Preview
getpic-1.png
  205KB (image/png)
This image has been viewed 213 time(s).
Image Attachment :
Image Preview
getpic.png
  134KB (image/png)
This image has been viewed 221 time(s).
Image Attachment :
Image Preview
getpic-2.png
  178KB (image/png)
This image has been viewed 214 time(s).
Back to Top
 

T&E Engineer
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Sep 2005
Total Posts : 1400
 
   Posted 10/16/2007 10:12 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
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.
Back to Top
 

Guenther Daubach
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 1333
 
   Posted 10/16/2007 10:19 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
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ünther

Back to Top
 

Bean
Forum Moderator



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 6367
 
   Posted 10/16/2007 10:33 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
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.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 

Back to Top
 

PJMonty
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 1024
 
   Posted 10/16/2007 10:56 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
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
Back to Top
 

Phil Pilgrim (PhiPi)
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Feb 2006
Total Posts : 7744
 
   Posted 10/16/2007 11:27 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
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
Back to Top
 

T&E Engineer
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Sep 2005
Total Posts : 1400
 
   Posted 10/16/2007 11:40 AM (GMT -7)    Quote This PostAlert An Admin About This Post.

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?

Back to Top
 

Phil Pilgrim (PhiPi)
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Feb 2006
Total Posts : 7744
 
   Posted 10/16/2007 12:30 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
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
Image Attachment :
Image Preview
sx_schematic.gif
  10KB (image/gif)
This image has been viewed 262 time(s).
Back to Top
 

darco
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Oct 2007
Total Posts : 85
 
   Posted 11/2/2007 10:26 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
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)
Image Attachment :
Image Preview
ColorLamp.png
  190KB (image/png)
This image has been viewed 227 time(s).
Back to Top
 

pwillard
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jun 2007
Total Posts : 317
 
   Posted 11/2/2007 6:33 PM (GMT -7)    Quote This PostAlert An Admin About This Post.

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


Image Attachment :
Image Preview
clock.JPG
  13KB (image/pjpeg)
This image has been viewed 197 time(s).
Back to Top
 

RickB
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 2004
Total Posts : 211
 
   Posted 11/2/2007 8:54 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
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
Back to Top
 

darco
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Oct 2007
Total Posts : 85
 
   Posted 11/2/2007 10:35 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
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. :)

Post Edited (darco) : 11/3/2007 5:44:59 AM GMT

Back to Top
 

pwillard
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jun 2007
Total Posts : 317
 
   Posted 11/4/2007 11:19 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
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.

Back to Top
 

Capdiamont
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Feb 2007
Total Posts : 161
 
   Posted 11/4/2007 10:30 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
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?
Back to Top
 

pwillard
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jun 2007
Total Posts : 317
 
   Posted 11/5/2007 8:37 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
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.

Back to Top
 

Capdiamont
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Feb 2007
Total Posts : 161
 
   Posted 11/5/2007 10:19 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
Why choose one or another?
Back to Top
 

Bean
Forum Moderator



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 6367
 
   Posted 11/6/2007 5:19 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
Capdiamont said...
Why choose one or another?
The three pin resonator already contains the required capacitors.
 
Bean


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 

Back to Top
 

darco
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Oct 2007
Total Posts : 85
 
   Posted 11/6/2007 12:14 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
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.
Image Attachment :
Image Preview
ColorLamp.png
  501KB (image/png)
This image has been viewed 210 time(s).
Back to Top
 

Bean
Forum Moderator



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 6367
 
   Posted 11/6/2007 12:17 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
The resonator is more than acurate enough for serial communications.
They are in the order or 0.1%, where the internal is 8%

Bean.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 

Back to Top
 

Capdiamont
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Feb 2007
Total Posts : 161
 
   Posted 11/7/2007 8:37 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
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?
Back to Top
 

pwillard
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jun 2007
Total Posts : 317
 
   Posted 11/7/2007 8:47 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
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.

Back to Top
 

DigitalDj
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Feb 2005
Total Posts : 207
 
   Posted 11/8/2007 9:02 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
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
 


 
 

Back to Top
 

darco
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Oct 2007
Total Posts : 85
 
   Posted 11/9/2007 12:02 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
I thought you guys might want to see some pictures of the prototype boards and the lamp itself:












A few more pictures are on my blog post.
Back to Top
 
[ << Previous Thread | Next Thread >> ]
New Topic Post Reply Printable Version
27 posts in this thread.
Viewing Page :
 1  2 
 
Forum Information
Currently it is Thursday, July 29, 2010 5:16 PM (GMT -7)
There are a total of 462,439 posts in 62,066 threads.
In the last 3 days there were 90 new threads and 802 reply posts. View Active Threads
Who's Online
This forum has 20143 registered members. Please welcome our newest member, ME01.
55 Guest(s), 9 Registered Member(s) are currently online.  Details
John Abshier, Rayman, kf4ixm, BradC, Sapieha, Gene Bonin, laser-vector, localroger, Nick McClick