PDA

View Full Version : Mini-Pixel Project



P. Short
04-06-2008, 08:32 PM
Over the past few months I've been working on and off (mostly off) on a project for dimming small RGB LEDs. It's a surface-mount design based on using a PIC10F20x for dimming 5mm or 10mm tri-color LEDs. The idea originally came from the Triklets controllers used in the Cubatron display that has appeared at various of the Burning Man events. This design should come in at between $1.00 and $1.50 per pixel (plus the cost of the LED).

My design uses a two-wire interface, with data sent to the PICs at 38400 baud rate. The LEDs are dimmed using a PWM scheme at a 150 Hz update rate. One difficulty that is apparent is that these particular PICS do not have an EEPROM memory, so each pixel needs a unique program (not a big problem IMO, but others may disagree).

At this point I don't have any particular plans to do any coop with this design. This is partly because of the complexity (lots of SMT parts), and partly because I'm aware of another design in the works by other people that will be simpler to assemble.

The biggest issue for these types of design will be the software, I think. While Vixen can be used to control these types of color devices, it is a bit clunky for this type of use. IMO there needs to be work on the software to do the kinds of neat things that people will want to do.

--

Phil

NogginBoink
04-13-2008, 07:48 PM
If you move up to the PIC12F508, you could probably use the same software on every chip by just having each PIC strip off the first LED's worth of data and passing the rest of the data on. (I haven't looked at this in detail; I just noticed you'd need at least one more I/O pin to do that and the 12F appears to meet the need at first glance.)

The cost is about $0.07 more in 100 unit quantities from Digi-Key. That might be an acceptable price increase.

P. Short
04-13-2008, 09:02 PM
The die has been cast...

One goal for this project was to do everything with just two wires (power plus data), and it would be hard to fit a daisy-chain communications method into this scheme.

--

Phil

mrpackethead
04-13-2008, 09:28 PM
Phil, this design is elegant in its simplicity.. The two wire interface has some very clear advantages over the "other design in teh works", which is a six wire bus.. On the flipside it also has some disadvantages as well.. reletively low current available for the led, dictated by the current capacity of the IO of the pic..

Realistically however theres probably only a need for 24 code versions anyway, as a string longer than that is going to run into voltage drop issues anyway..

Im working on the "DMX-router", and i see no reason why we could'nt add this as interface type on it.

Anyway, do you have BOM and/or a schmatic.. it woudl be well worth the effort to make a comparison between the overall price for both designs. a considerable cost component in the other design is in teh wiring between pixels. a single pair would be considerably cheaper.

scorpia
04-13-2008, 11:14 PM
I must say i would be interested to find more about this as well.

i think the idea of going to a 12f series has some merit as you could grab one with internal eprom and use an extra i/o as a program or even a address switch of some sort.

any chance you could post the code phil. it allways interests me to check this sort of stuff out.

thanks

Peter

P. Short
04-13-2008, 11:45 PM
Here's the most recent schematic. The biggest question in my mind is signal integrity, how well the waveforms look when driving a bunch of these things over a good stretch of wire.

At the moment I don't really want to publish the code, maybe later. It's basically nothing very original, just a whole bunch of 26-instruction blocks with a lot of tedious instruction counting. With a 4 MHz clock one serial bit at 38400 baud takes 26 instructions (approximately). During each block approximately 10 instructions are devoted to PWM activity, and the remaining instructions handle one receive serial bit. There are three sets of blocks, one handling the case where the leading edge of the start bit of a character occurs in the first third of the block, one where the leading edge is in the second third of the block, and the third where the leading edge occurs in the last third of the block.

--

Phil

scorpia
04-14-2008, 04:03 AM
I understand about the code phil.

also as an idea i think some of the better 12f series have 3 x hardware pwm. would make the pwm code a non issue

so most of the time could be dedicated to reading the signal.

Peter

mrpackethead
04-14-2008, 06:45 AM
so, go and build one scopia! Go man go!

scorpia
04-14-2008, 09:01 AM
strange you may say that.

I just received my pics for jec's pixels and to build some of these.
http://picprojects.org.uk/projects/rgb/index.htm
very similar idea.

so im gonna build that first and see how it goes.
still waiting on my smd parts so jec's 1/2 pixels have to wait a little

Peter

NogginBoink
04-14-2008, 10:40 AM
I understand about the code phil.

also as an idea i think some of the better 12f series have 3 x hardware pwm. would make the pwm code a non issue

so most of the time could be dedicated to reading the signal.

Peter

But with timer interrupts, you won't be able to count instructions to ensure you properly grab the incoming data from the serial datastream. :(

I think you'd either need 4 timers (three PWM and one for the datastream), or you'd need to instruction-count.

P. Short
04-14-2008, 10:58 AM
Right now I'm looking primarily at price and size. The part that I'm looking at now (10F202 in the SOT23 package) is in the $0.50 price range in 100's quantity, and the reason for using a two-wire interface is to keep wiring and connector costs down (the obvious drawback is the amount of head-end logic). The only 12F/12HV parts that I'm aware with a PWM module have only one module, cost more, and have larger packages.

This project is really an effort to make the thing as minimalist as possible. The comparable project, in my opinion, is the one using a three-channel PWM chip from Allegro in the DFN or QFN package, which will cost out (I think) slightly better than this one. This is basically an attempt to see how far I can take this approach, and perhaps to set a price target for some of the other projects. In any case, I really do appreciate any interest and comments on this.

--

Phil

NogginBoink
04-14-2008, 02:32 PM
I was looking at the Allegro part last year as well (A6280). At $0.91 each in qty 100, I think your PIC project is a lot more viable.

(I'm noticing a theme in many of my posts... am I on target, or am I just a cheapskate? :))

scorpia
04-14-2008, 06:06 PM
But with timer interrupts, you won't be able to count instructions to ensure you properly grab the incoming data from the serial datastream. :(

I think you'd either need 4 timers (three PWM and one for the datastream), or you'd need to instruction-count.


looks like i was wrong anyway. i can only find a chip with 1 PWM . i cant find any with 3 at all. and as for having 4 timers well yes you have to go to the bigger chips to get that.

ah well.

Also phil. can you program the 10f chips using icsp while in your board? not having played with those chips i would be interested in how its connected. its not like there are many spare pins to play with . i think i might have to hook up the 10f chip i have and see how it works.

so many projects. so little time,
If only i knew how to program as well as you guys seem to i would speed things up greatly.

Keep up the good work phil & others.

Peter

P. Short
04-14-2008, 06:19 PM
Yes, I just forgot to put the ICSP connector on the schematic.

--

Phil

NogginBoink
04-15-2008, 10:31 AM
so many projects. so little time,

Aint that the truth! It's only April and I'm wondering how many projects I can complete before the deadline!

kmc123
04-15-2008, 01:41 PM
I'm right there with ya! Holy cow I'm swamped with TONS of projects, all 1/2 done :)

P. Short
05-05-2008, 07:15 PM
Here's a picture of the assembled Pixel, missing only one connector. The LED installed on the board in the picture is a 5mm RGB LED, but it will also take a 10mm LED. Right now I'm thinking of bending the LED over to the right, and putting the whole thing in a plastic tube (perhaps a test tube), and chaining 24 of them together.

I also have an H-Bridge board for driving the string. It's a 1.25" x 1.5" SMT board with discrete transistors, and includes a small PIC. I used discrete transistors instead of an H-Bridge chip (such as the L298 or SN754410) because of the lower voltage drop that I can get using discrete transistors. Right now I'm thinking of re-designing this board to include the FTDI USB-serial chip to make connection simpler.

--

Phil

Wayne J
05-05-2008, 08:45 PM
That is some itty bitty blinky flashy! :eek:

scorpia
05-06-2008, 07:33 PM
Phil,

very nice little board. Looks neat once you see it in the flesh so to speak.

Did you make the board yourself or get them made?

Also when you get a chance i would love to see the controller for it as well.

Peter

P. Short
05-06-2008, 08:16 PM
The board is fine-pitch, two-sided, well beyond what I can make myself.

--

Phil

Macrosill
05-06-2008, 10:23 PM
Looks like a WJ product to me. I recognize the tin plating.

P. Short
05-07-2008, 01:24 PM
Here is a picture of the 'controller'. It's basically just a conventional discrete H-Bridge circuit with a small PIC on it. The transistors and traces are good for about 2A, which is enough to handle about 24 pixels.

This design is a discrete implementation instead of using a L298 or SN754410 chip because the saturation voltages of those chips is too high. In some cases the saturation voltage is as high as 4.9V, which means that there is only 7V from a 12V supply left over for the pixels. This discrete design has a saturation voltage of 1V or so because it uses low-saturation voltage transistors in a non-Darlington configuration.

The next version of this board (if there is one) will use a .2" pitch output terminal block and will also have an input power receptacle for use with a 2.1mm/5.5mm wall wart jack. It will also have catch diodes added on the back side of the board so that it can drive motors, and possibly a USB input connector.

mrpackethead
05-07-2008, 03:51 PM
Hi Phil, what drives teh 'driver'... I was just wonderng what sort of interface you've attached that to?



PS. The allegro based pixel design is coming along.. Its got its challenges as well. Did you get an idea on the cost of your pixel? THe killer for the allegro is the wire interconnect.. the two wire design might make it a screaming success, and possibly cheaper.

Attached is the driver/controller for the pixel chains.. this should provide enough power to drive 60 pixels. dmx controlled. code is a complete new implementaiton, written in C entirely, running on a low cost pic24.. ( a few cents more than an 18F series ).

P. Short
05-07-2008, 04:38 PM
The cost of a pixel board (excluding enclosure) should be around $1.60 each in quantities of 100 ($.37 for the PCB, $.46 for the PIC, $.32 for the LED, $.29 for the regulator, plus some diodes, a transistor and some resistors). I suspect that this is similar to the board that you're working on.

As for what drives the 'driver' board, just a TTL-level serial output.

P. Short
05-08-2008, 02:28 PM
How much does the cable cost that you are planning on using with the Allegro-based pixel?

P. Short
05-16-2008, 01:26 PM
The pixel board seems to be working quite well now.

However, I'm not happy with the dimming curve. All of the action seems to be at the low end of the range, perhaps due to the eyeball response curve (logarithmic, I think). As an experiment I tried another curve (1/(256-n)), which had the opposite problem (all of the action is at the high end). I'm thinking of switching to a faster but pin-compatible PIC, such as the PIC10F222, and try to stitch together a curve that will appear more linear than either of the curves that I've tried to far.