Shop OBEX P1 Docs P2 Docs Learn Events
100+ pwm waves controled from a computer? — Parallax Forums

100+ pwm waves controled from a computer?

timatrontimatron Posts: 16
edited 2008-06-19 20:30 in Propeller 1
I have a need to get 100+ pwm waves that are individually defined from a computer, anyone got any suggestions?

I am an artist and have a need to control 100+ analog panel meters, i've done this before in another project by pushing a pwm wave thorugh a transistor and pushing a load through the panel meter. http://www.timschwartz.org/paris-physical For my new project I will need to have a computer communicate with an array of microcontrolers to control a lot of these meters, like some where around 120.

I've been looking at propeller, because of the many cores, i thought it would be good to get a lot of pwm waves. But now im trying to figure out how to have a bunch of them communicate and still be able to control a lot of pwm outputs. Does anyone have any brilliant ideas? I'm looking for the easiest solution, the more code thats already out there the better. So i guess the question is what communication should i use, and how many pwms will i have to give away with that type of communication. Also, are there better solutions than propeller?

Oh and if anyone is in the souther cal area and interested in working freelance, i would love to be able to offload some of this work.

Thanks for all of your help in advance.

Cheers,
Tim

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-06-17 06:13
    It would take five Propellers to handle your 120 meters directly, each driving 24 lines. (Four would be too few, since each would have to drive 30 lines, leaving only two for I/O and EEPROM — not enough.) It would be easy enough to parallel them to one serial data input line from an external computer, letting each one respond to a different address. The Propellers could handle this job with ease. My pwm_x8 object may be of some help.

    For even greater visual impact than panel meters, you could also drive miniature RC servos, to which you could attach a nearly limitless variety of colorful indicator pointers.

    -Phil

    Post Edited (Phil Pilgrim (PhiPi)) : 6/17/2008 6:21:28 AM GMT
  • hippyhippy Posts: 1,981
    edited 2008-06-17 15:43
    What spec does the PWM need to be ? It might be possible to bang out 100 channels of PWM into RC's using bit-addressable latches at an acceptable rate.

    Does it even need to be PWM ? Analogue output theatre lighting desks I coded for had a DAC and then multiple switched sample and holds with an op-amp buffer follwoing, updates every 20ms. Should be easy to control to 100+ channels that way.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-06-17 16:12
    Hippy,

    Oddly enough, I considered both of those options before responding. If the objective is to use just one Propeller, I'll bet either one would work fine. But I'm assuming this is a one-off design, so hardware and programming simplicity seemed paramount, and I had to consider the relative merits of five identical Prop boards without much on them versus one board with latches or S/H amplifiers. I checked DigiKey for the S/H units and found 8:1 muliplexed devices in the $15.00 range. I'm sure there's something cheaper available, but at that point I started to wonder if the more obvious approach wasn't the best. The nice thing about panel meters is that with a fast enough PWM their inductive and mechanical inertia should obviate the necessity for even an RC filter.

    -Phil
  • hippyhippy Posts: 1,981
    edited 2008-06-17 17:02
    So a suitable panel meter can be worked just by putting PWM through it ... there's something I've learned.

    In which case, the simple 24 output lines to 24 meters makes a lot of sense, and it did say "easiest solution". A handful of ProtoBoards is probably insignificant to the cost of the rest of the hardware.
  • Beau SchwabeBeau Schwabe Posts: 6,560
    edited 2008-06-17 17:11
    Almost sounds like a job for "Charlie plexing" the meters... put a diode on each meter (since power only needs to flow in one direction anyway)... use 20 I/O's in a 10x10 matrix to get your desired 100. If 100 is too many, you could break it down into two 10x5's (30 IO's) and assign one cog to each group.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-06-17 17:47
    Beau,

    That's certainly an interesting thought. If each meter were, say, 200mV fullscale, the duty cycle at 3.3V - 0.6V = 2.7V would only have to be 7.4% to peg the meter — well within the 10% maximum required by the multiplexing. I'd want to make darn sure the program was operational and bug-free before subjecting 100 sensitive meters to 2.7V, though! smile.gif

    -Phil
  • Beau SchwabeBeau Schwabe Posts: 6,560
    edited 2008-06-17 21:26
    Phil Pilgrim (PhiPi),

    "I'd want to make darn sure the program was operational and bug-free before subjecting 100 sensitive meters to 2.7V" -- True!!

    Even worse (<-matter of perspective), there are 50mV full-scale meters as well.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • BTXBTX Posts: 674
    edited 2008-06-18 01:20
    Hi Tim.
    Tim said...

    I have a need to get 100+ pwm waves that are individually defined from a computer, anyone got any suggestions?

    Yes !! use an FPGA. it's easy, ie look at this: www.fpga4fun.com/RCServos.html you need to add a serial interface to this code.
    In case of propellers, I would use the same Phil option.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Regards.

    Alberto.
  • Nat'nNat'n Posts: 4
    edited 2008-06-19 19:38
    I wonder if something like the TI TLC59116 would work. It's designed for LEDs but perhaps you could set the output current to something near the max range of your meters and use the chip to PWM down from there.

    I just ordered samples from TI and am planning on using them to drive a 4x4xRGB matrix where I need individual RGB controls for each element. They sent me 10 for free. If it works you could control 160 meters with only 2 pins for I2C for free. The chip has it's own internal osc so you wont even need much in the way of support components. You can set up to 14 unique addresses for the chip so you should be able to put all of them on the same bus.

    http://focus.ti.com/docs/prod/folders/print/tlc59116.html

    Post Edited (Nat'n) : 6/19/2008 7:43:56 PM GMT
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-06-19 19:56
    Nat'n,

    That's quite the find! It looks like setting Rext to a high enough value will be adequate to keep the drive current within almost any meter's specs.

    -Phil
  • BTXBTX Posts: 674
    edited 2008-06-19 19:57
    Hi Nat'n
    Did you know the TLC5940 ??
    Here on the forum there are some drivers fo it. I made a LED screen with those chips.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Regards.

    Alberto.
  • Nat'nNat'n Posts: 4
    edited 2008-06-19 20:30
    I did, and I ordered some as well to try, but I already have I2C in the design so I can basically just plug em in.

    There is a little bit more involved with the hardware interface on the TLC5940, but, on the other hand, if I use them I can avoid using SSOP breakouts when I am prototyping. They are higher resolution too, but at this point, I can't imagine why I would need 4096 steps in an RGB application like this (illuminated buttons). 68+ billion colors is a few orders of magnitude more than I think I can discern.

    The fact that drivers already exist is a good thing though. Perhaps I will build it both ways just for fun. Besides, I can tell people it's got 68 billion colors!
Sign In or Register to comment.