Pages: 1 ... 5 6 [7] 8 9 ... 20   Go Down
Author Topic: ShiftPWM support topic. Latest update: Schematics, high power LED's, LED strips  (Read 78584 times)
0 Members and 1 Guest are viewing this topic.
Eindhoven
Offline Offline
Jr. Member
**
Karma: 1
Posts: 87
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Very cool!
Video please smiley

I will add ShiftMatrix to my page soon if it is working well. Can I add your code as an example?
Logged

Australia
Offline Offline
Jr. Member
**
Karma: 2
Posts: 65
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You are welcome to use the code Elco. I don't know if it would help anyone really. Its just taking the serial data and dumping it.
The Processing code to downscale is still something I am trying to get right. It is very sloppy code at the moment. But as soon as I get it up to scratch I will be posting it. But if people want to see it warts and all, I will post it smiley-razz
And here is the DEMO:
This is the Bad Apple video scaled to 16x16 monochrome at 15fps/32 brightness levels 50Hz.
The flickering is a camera artifact and is not present looking at the display.

« Last Edit: September 20, 2011, 08:27:54 am by milamber » Logged

Eindhoven
Offline Offline
Jr. Member
**
Karma: 1
Posts: 87
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Nice!

When you are ready to upload the code, send me an e-mail. I'll add you to the project on google code, so you can add your stuff yourself and add/correct stuff later.
Logged

Australia
Offline Offline
Jr. Member
**
Karma: 2
Posts: 65
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have been trialling a few different combination's of Matrix dimensions. Through this and conversations with Elco, I can now say that ShiftMatrix will allow you to control 1024 LED's in a Matrix setup.

I had two setups which Elco sent me.
1) 32x32
Code:
unsigned char maxBrightness = 15;
unsigned char pwmFrequency = 50;
int numColumnRegisters = 4;
int numRows=32;

Results:
Load of interrupt: 0.5095695972
Clock cycles per interrupt: 318.48
Interrupt frequency: 25600.00 Hz
PWM frequency: 1600.00 Hz
Divided over 32 rows, to have a total refresh rate of 50.00 Hz
Timer1 in use for highest precision.
Include servo.h to use timer2.
OCR1A: 624
Prescaler: 1
This worked but on my test setup this made the LED's much duller. This is due to the LED's only being on for 1/32nd of the time.

2) 16*64
Code:
unsigned char maxBrightness = 31;
unsigned char pwmFrequency = 50;
int numColumnRegisters = 8;
int numRows=16;

Results;
Load of interrupt: 0.7825686931
Clock cycles per interrupt: 489.11
Interrupt frequency: 25600.00 Hz
PWM frequency: 800.00 Hz
Divided over 16 rows, to have a total refresh rate of 50.00 Hz
Timer1 in use for highest precision.
Include servo.h to use timer2.
OCR1A: 624
Prescaler: 1
This produced a much nicer output. Didn't seem dull in any way. The load is higher but you are getting twice as many levels as before. From Elco:
Quote from: elcojacobs
Due to the interrupt overhead, it is better to have more columns. All columns are driven in one interrupt, each interrupt one row is driven. This allows you to have 32 brightness levels. It also has the benefit that the maximum on time of your LED's is 1/16 instead of 1/32.
So there you have it people, 1024 LED's can be controlled in a Matrix with just one Arduino and some ShiftRegister's. All of that and with PWM to boot. VERY COOL ELCO!
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 51
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm in the process of constructing a large RGB matrix and will probably try to implement this code once im done.
I see the code for the matrix control isn't posted on the google code page. Will it be soon or does somebody have an updated version I can work with?

Also, is the limitation of the code 1024 LEDs/3 =340 RGB leds? I'm shooting for upwards of 500.
Logged

Eindhoven
Offline Offline
Jr. Member
**
Karma: 1
Posts: 87
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm in the process of constructing a large RGB matrix and will probably try to implement this code once im done.
I see the code for the matrix control isn't posted on the google code page. Will it be soon or does somebody have an updated version I can work with?

Also, is the limitation of the code 1024 LEDs/3 =340 RGB leds? I'm shooting for upwards of 500.

Above 1024 outputs it stopped working on an atmega328. I suspect it runs out of memory. It has only 2K flash and 1024 values take up 1K. An arduino mega might be able to cope with more LED's, but I have not tested it.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 23
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Could you add a link for  the most recent ShiftMatrixPWM Library/.pde, please?  has there been substantial progress recently?


edit: order
« Last Edit: October 14, 2011, 01:22:54 pm by mxc1090 » Logged

Eindhoven
Offline Offline
Jr. Member
**
Karma: 1
Posts: 87
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The latest version posted here is still the most recent version, but it seems to work fine.
I just have not updated the comments and documentation. I have been too busy building my new project, a fermentation fridge with data logging and a web interface.

Just use the code posted here and post again if you encounter problems.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 23
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How appropriate...keep me up to date on the fermentation fridge.  I am in the process (still gathering supplies) of building an arduino-controlled corny kegerator. Re-purposed chest freezer, temperature controlled with the arduino and LCD readout for temps and beer names (and possibly amount left in keg).   Brewing our pale ale this weekend along with a pumpkin ale.  Anyway, off-topic, I will post back when I get a chance to try the matrix fully.   Thanks!
Logged

India
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hello,

I've made the circuit as shown in the ShiftOut Tutorial on the arduino website .i've used six 595 registers and common Anode Led's & i'm running the example that came with the code but it doesn't work as shown in the video ,Please help . . . .i'm attaching a video clip too ,kindly note that the last few led's don't light up properly

* Video0030.3gp (116.18 KB - downloaded 22 times.)
« Last Edit: November 01, 2011, 01:46:39 am by Abhay » Logged

India
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello ,

I've tried all possible things that i'm aware of to make this thing work but its not happening ,the LED's Flicker too fast and the whole thing freezes ,Kindly help  !!!

Logged

Australia
Offline Offline
Jr. Member
**
Karma: 2
Posts: 65
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello ,

I've tried all possible things that i'm aware of to make this thing work but its not happening ,the LED's Flicker too fast and the whole thing freezes ,Kindly help  !!!
Hello Abhay,
How exactly have you setup your circuit?
Did you setup as it says on the site:
Quote
Which hardware is used with ShiftPWM?

Basically just an Arduino and a chain of Shift registers. The circuit is exactly the same as in the ShiftOut tutorial on arduino.cc, but leave out the latch pin capacitor. You can choose the latch pin yourself, but the data and clock pins should be connected to the SPI pins MOSI and SCK.
What is not shown in that tutorial example is a decoupling capacitor, the capacitor that is shown in the tutorial is an error and should not be included on the latch pin! A decoupling capacitor is usually a .1uF ceramic type capacitor that is kept close to the IC and is across its Vcc and Gnd. This helps stop electrical noise from interfering with the IC. Using Shiftregisters like this is creating noise as you are switching power very fast. The effect gets worse the further from the source(Arduino) the signal gets. This could be what is effecting your output.

Grumpy_Mike is seen on a lot on the boards/threads here making sure that people use decoupling capacitors. Only reason I know of them is because of him (Big thanks Mike!). He even went so far as to make a tutorial of his own about them:
http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

I hope this helps with your issues.(Did I get it right Mike?)
Logged

India
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I removed the latch pin Capacitor,but it's still no good,the LED's keep flickering too fast and the last few LED's don't glow as brightly as the first few ,I'm using the same example that comes with the library ,still don't know what to do,plz help !!!
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 23
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Did you connect the Shift Register clock pin to 12 or 13 on the Arduino?
Logged

India
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Bingo !!!! That's it yes i had connected to pin 12 ,the moment i connected it to pin 13,everything worked perfectly

Thank you for your help smiley
Logged

Pages: 1 ... 5 6 [7] 8 9 ... 20   Go Up
Jump to: