Show Posts
Pages: [1]
1  Forum 2005-2010 (read only) / Forum / Re: Cannot edit posts in forum? on: October 04, 2010, 03:08:37 pm
It worked for me for an older post that had no "Modify" link. I guess it depends on the specific subforum. What a pain.
2  Forum 2005-2010 (read only) / Forum / Re: Cannot edit posts in forum? on: October 04, 2010, 12:10:30 pm
Yes, this is a big problem, especially for editing code. I don't see the harm in allowing people to edit their posts, regardless of how old they are. At worst you can make a mandatory "last edited at XXXX" message appear.

Edit - I found a way to modify older posts even if there is no button. Simply submit this URL:

Code:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?board=dev;action=modify;message=XX;thread=YYYYYYYYYY

where XX is the number of your message in the thread (with the first post being number 0 of course), and YYYYYYYYYY is the thread number. As long as you own the post, you can modify it.
3  Forum 2005-2010 (read only) / Development / Re: Software PWM using daisy chained 74HC595s / SPI on: October 05, 2010, 02:48:10 pm
Right, with the TCL5940 you still need power handling. It's only good for hardware PWM. The simplest true constant-current circuits (without an IC) that I've found are these:

- http://www.instructables.com/id/Power-LED-s---simplest-light-with-constant-current/
- http://www.instructables.com/id/Circuits-for-using-High-Power-LED-s/

But like I said there are many suitable ICs for the task that are not that expensive. Linear drivers are less efficient but reduce the board space and necessary components. You just have to pay more attention to heat and voltage requirements. Switching drivers have a larger BOM but are much more efficient and flexible.

The STP04CM05 is a linear regulator and you actually don't need one per LED. You need 3 per 4 LEDs. smiley Since they have 4 channels a piece. The only hardware I've had to use in addition was a simple PI (L/C) filter and a heavy-duty 25A protection diode which also lowers my 5V supply down to 3.55V. That has a large heatsink.

Also try Mouser for the driver ICs like STP04CM05, I've found they are significantly cheaper there.
4  Forum 2005-2010 (read only) / Development / Re: Software PWM using daisy chained 74HC595s / SPI on: October 05, 2010, 11:21:54 am
Tomppu, the thread you linked to actually contains the explanation and the solution to the flickering problem you encountered. Start at this post to see what I mean. The solution is to output the BAM waveform followed by a mirror image of it.

I don't have time to modify the code right now, but I might later this week. If you can get a working version using MIBAM (mirror image bit-angle modulation) I would be glad to test it!

Edit: There is a dedicated MIBAM thread here. After reading through, on the Atmega328 at 16MHz, I think it is possible to drive 64 channels at 120Hz with 11-bit resolution (2048 levels). At 10-bits you could drive 128 channels, etc. Then again that is based on assembly performance so I'm not sure what the difference would be using the Arduino IDE. But it's encouraging!
5  Forum 2005-2010 (read only) / Development / Re: Software PWM using daisy chained 74HC595s / SPI on: October 05, 2010, 10:48:28 am
Honestly, I think it's easier and nearly as cheap to drive power LEDs with dedicated ICs. There are many out there on the market, like the STP04CM05 I mentioned earlier. I got those for $2.20 a pop from Mouser. There are also single-channel drivers with PWM input that you can run from the TI PWM chips like the TLC5940, which you can combine for hardware PWM control (3000+ levels). I like the STP04CM05 with software PWM because it minimizes the PCB size and BOM.

If you are using the TLC5940, you don't want to drive LEDs directly with it, but instead control a constant-current IC or a transistor (you may find a hex inverter IC useful in that case since 'on' is LOW on the TLC).

I'm actually using the DealExtreme LEDs in our projects. They have good consistency and you can't beat the price. The are very sensitive to overcurrent situations though.

As far as beam concentration, I recommend a reflector over a lens for most uses. As you have found, the collimating lenses essentially project a huge image of the LED pads onto your target surface. Personally, I like the SO27XA reflector but I'm not sure about it's availability outside of the States. A diffusing material can help as well; frosted window film is cheap and works quite nicely.
6  Forum 2005-2010 (read only) / Development / Re: Software PWM using daisy chained 74HC595s / SPI on: October 04, 2010, 12:00:32 pm
Tomppu, this is great. The speed limitations were the biggest difficulty with the previous version of the code.

I was controlling 30 channels, with their values being updated over serial at about 50hz. So I would still be calling precalcBamBytes() around 1500 times per second. Is it possible to only call precalcBamBytes() once after updating all 30 channels with setChannel()? That would reduce it to about 50 calls per second.

Also, what is the difference between the iUpdateBam 1, 2, and 3 functions? It seems that version 3 is the superior version. Is there any reason to leave the other two in the code, possibly just to provide an example?

Finally, is it possible to increase the PWM resolution above 256 levels? Possibly 1024 levels, or higher? This would make something like brightness calibration with a logarithmic curve (gamma correction) possible.

I will give your code a try, if I don't see any bugs then it will go into production. If you know of or notice any bugs please let us know in this thread, I would also be willing to help finalize the code and make this into a library like ShiftOut so that more people can take advantage of it. That is, after I wrap my head around bit angle manipulation...
7  Forum 2005-2010 (read only) / Development / Re: Software PWM using daisy chained 74HC595s / SPI on: September 28, 2010, 10:25:54 am

So we completed our project in time for its debut at Hopscotch Music Festival, which was Raleigh's first major music festival. We provided the stage lighting for Motor Skills, whose performance was well-received.

I don't have any HD video yet, but here's some taken from an iPhone:
Edit - better video in HD:

The system is as described above; a Processing sketch handles MIDI input and generates the pattern data, which is communicated over serial to the Arduino. Using the SoftPWM code we control a custom PCB with 12 of the STP04CM05 ICs and all the other requisite circuit components. These are connected to the light bars via CAT5 cables through a 12-port patch panel. Finally the light bars consist of a high-power 3W RGB LED, some optics, and other various parts for optimum beam spreading and heat management.

This software PWM implementation worked excellently for the job, so thanks again. I probably wouldn't have attempted soft PWM if you hadn't posted this. Using your code on an Arduino with an Atmega328, we were able to get 128 brightness levels per channel before seeing noticeable flicker, which works well except for the lowest brightness levels. I think a resolution of at least 8x higher is necessary for better dimming, logarithmic brightness, and good color mixing at low brightness. I doubt that could ever be squeezed out of the Atmega328, however.

Perhaps you could formalize your code into a library for better accessibility to people getting started? It seems fairly optimized already what with all the bitwise operations.
8  Forum 2005-2010 (read only) / Development / Re: Software PWM using daisy chained 74HC595s / SPI on: August 05, 2010, 09:06:26 pm
Definitely, a partner and I are working on using an Arduino to control a series of these ICs which are driving 12 high power 3W RGB LEDs mounted in polycarbonate tubes, and a series of RGB strobes in addition. We should have MIDI sync with Ableton Live and full manual control as well. We're trying to get it finished for a music festival in Raleigh next month, I'll be sure to post some videos when it's completed.
9  Forum 2005-2010 (read only) / Development / Re: Software PWM using daisy chained 74HC595s / SPI on: August 05, 2010, 02:40:15 am
Thanks for the suggestion, halving the SR_COUNT worked perfectly. So far I haven't had to make any other adjustments to the code for it to work with the STP04CM05.
10  Forum 2005-2010 (read only) / Development / Re: Software PWM using daisy chained 74HC595s / SPI on: July 20, 2010, 03:58:45 am
Excellent, thanks for sharing this. I'm going to be getting some STP04CM05 4-bit shift-register/high current LED drivers in the mail soon, and will try to adapt this code for that application. They also feature cascading so I'm guessing the only trick will be changing any 8-bit references in the code to 4-bits instead.

If this works I will be saving a lot of $ on hardware and a lot of head-banging on circuit design! Before I found the STP04CM05 the only cost-effective solution was a slew of TI PWM multiplexers, hex converters, transistors, and current regulators.

I will definitely buy you a beer in that case.  8-)
11  Forum 2005-2010 (read only) / Exhibition / Re: Hue-controllable RGB LED lamp on: July 20, 2010, 03:56:19 am
Thanks to all the contributors in this thread for helping me get a quick prototype RGB control circuit up and running. When it's late at night and you're working on hardware the last thing you want to do is reinvent the wheel in code!
Pages: [1]