Show Posts
Pages: [1] 2
1  Using Arduino / Installation & Troubleshooting / Re: Missing digital signature for driver on Windows 8 on: July 03, 2012, 12:21:14 pm
Thanks for this!
2  Using Arduino / Networking, Protocols, and Devices / Re: Communication between a number of Arduino's? on: November 12, 2011, 05:35:27 am
Thanks for all the help everyone. I'm tossing up between serial and shiftout. Shifting bits would be easier and cheaper as I don't need more Arduino's, but I think serial is the way to go. In the future, if the signs ever get upgraded (LED Matrix anyone?), it would be nice to be able to send more than on/off signals. Plus, I won't have to run more cables that way smiley-grin

(edit)

Forgot to ask, are 485 driver chips a necessity? I imagine I only need one per serial "string", correct?
3  Using Arduino / Networking, Protocols, and Devices / Communication between a number of Arduino's? on: November 08, 2011, 08:16:39 pm
Hi everyone,

I've undertaken a project that requires me to light up 5 or more LED's on a sign, with 5 signs.

Quick diagram to help explain:

Sign ------- Sign -------- Sign -------------------- Controller --------------------------------------Sign ------- Sign

|-----3m-----|-----3m----|------------7m-------------|--------------------10m--------------------|----3m-----|

Basically, each "sign" entails 3 led strips. There is also 2 LED's, and a buzzer. Each sign will only have one LED strip on at a time. The banks of lights are split physically by a divider, so I'm addressing these as 'left bank' and 'right bank' of lights.

My problem is, there are TOO MANY communication options. What I had in mind was either a barebones Arduino (RBBB or a Diavolino or similar) at each sign, and then an Uno at the "controller". I've got 6 core alarm cable running in a chain from the leftmost sign to the rightmost sign, however 4 of those cables I'd like to use for power. I can run more cable if need be.

I'm not looking for super-high data speeds either, just ideally if someone flicks a switch on the controller, the lights are updated within the second.

My question is, what is the best way to control all these?
-SPI communication? The master outputs a long serial string for each bank. Each sign then extracts the information it requires and then sends serial to the next ardiuno.

-I2C? I'm not sure on the hardware limits (i.e. bus length) of this protocol, but I've got 2 data lines plus a ground line already wired. It can't be too hard to bit bang commands out.

-ShiftOut/ShiftIn? I've contemplated just shifting out a long string of data every second or so, and having each device extract it's info and pass it onto the next device. If this is the case, do I even need Arduino's?

-OneWire? Someone mentioned this might be a possibility, but it isn't easy to implement.

(edit)
-RS485? I've also heard good things about this protocol, such as it's reliability.
(/edit)

Can any kings (and queens!) of Arduino shed some light and wisdom of the optimal communications protocol I should be using? As long as it's fairly reliable (the occasional flicker is acceptable, it's not exactly mission-critical), I'm not too fussed.

Thanks in advance!
4  Using Arduino / LEDs and Multiplexing / Re: MAX7219 Scrolling text help! on: August 13, 2011, 12:38:54 am
Hello greenmeanies!

I ended up fixing this (sort of)... I think it was something to do with me using the setRow function. I rewrote the code, and instead of shifting rows left and right, it shifted them column by column. It worked (satisfactorily).

As for the decimal problem, I don't think that was it, as I was able to run the test script (the one that flashed the pixel a few times, lights it steady then moves on to the next one) successfully, and all the LED's were in order then.

It was probably just my shoddy coding :3 I'm still very new to C++, My roots are in the much more beginner BASIC of the PicAxe. This was my first time using matrices, and bitshift operands of any sort. It was a good learning experience, at the very least.

Thanks anyway for taking the time to have a look though!
5  Using Arduino / LEDs and Multiplexing / Re: Arduino UNO and Rainbowduino on: June 24, 2011, 10:05:25 am
Sounds like you might have the matrix plugged into the Rainbow upside down... try rotating it?
6  Using Arduino / LEDs and Multiplexing / Re: MAX7219 Scrolling text help! on: June 21, 2011, 07:20:27 am
Ok, made some quick videos.



That's the setup as of current, running the code above.




That's with the delay() changed to 75, to slow down the display.

I'm really stumped on this one....
7  Using Arduino / LEDs and Multiplexing / Re: MAX7219 Scrolling text help! on: June 21, 2011, 07:04:59 am
Ok, playing with it a bit more, I've got this:

Code:
#include <LedControl.h>

LedControl lc=LedControl(12,11,10,2);
int devices=lc.getDeviceCount();

byte face[8]={
  B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111}; 
//B00100100,B00100100,B00100100,B00100100,B00000000,B11111111,B10000001,B01111110};  //happy :D face
byte matp[8]={
  B00100100,B00100100,B00100100,B00100100,B00000000,B11111111,B10000001,B01111110};  //matrix preload test
byte mat1[8]={
  B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000};  //matrix 1
byte mat2[8]={
  B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000};  //matrix 2
byte blnk[8]={
  B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000};  //blank matrix

void setup () {
  //we have already set the number of devices when we created the LedControl
  //we have to init all devices in a loop
  for(int address=0;address<devices;address++) {
    /*The MAX72XX is in power-saving mode on startup*/
    lc.shutdown(address,false);
    /* Set the brightness to max */
    lc.setIntensity(address,15);
    /* and clear the display */
    lc.clearDisplay(address);
  }
  for (int k=0; k<9; k++){
    mat1[k] = face[k];
    lc.setRow(0,k,mat1[k]);
    for(int address=0;address<devices;address++) {
      /*clear display's*/
      lc.clearDisplay(address);
    }
  }
}

void loop () {

  for(int m=8;m>-1;--m){         //scroll face onto screen one
    for (int j=0; j<9; j++) {
      mat1[j] = face[j] >> m;
      for (int l=0; l<9; l++){
        lc.setRow(0,l,mat1[l]);
      }
      //delay(10);
    }
    delay(20);
  }
  /*
  for(int m=8;m>-1;--m){         //scroll face onto screen two
   for (int j=0; j<9; ++j) {
   mat2[j] = matp[j] >> m;
   for (int l=0; l<9; l++){
   lc.setRow(1,l,mat2[l]);
   }
   //delay(10);
   }
   delay(50);
   }*/
  for(int m=8;m>-1;--m){          //scroll face off screen one
    for (int j=0; j<9; j++) {
      mat1[j] = mat1[j] << 1;
      mat2[j] = face[j] >> m;
      for (int l=0; l<9; l++){
        lc.setRow(0,l,mat1[l]);
        lc.setRow(1,l,mat2[l]);
      }
      //delay(10);
    }
    delay(20);
  }
  for(int m=8;m>-1;--m){          //scroll face off screen one
    for (int j=0; j<9; j++) {
      mat2[j] = mat2[j] << 1;
      for (int l=0; l<9; l++){
        lc.setRow(1,l,mat2[l]);
      }
      //delay(10);
    }
    delay(20);
  }
  for (int k=0; k<9; k++){
    mat1[k] = face[k];
    lc.setRow(0,k,mat1[k]);
  }
  for(int address=0;address<devices;address++) {
    lc.clearDisplay(address);
  }

}

I changed the face into a 8x8 square temporarily, sped up the scroll speed, and cleaned up the code a bit.

Description of what's happening:

8x8 square slides in smoothly from the right (dev0 is right display, dev1 is left in my config). When it reaches end of 1st display, whole matrix is red, all pixels lit (good).
However, when it goes to transition onto the second screen, the scroll speed slows down noticeably. The top-rightmost pixel of display 1 (left display) (row 0, column 7, flickers in time with each display refresh. All the top row lights are one digit ahead. It's also like the whole speed of the chips are slowed down because data is being pushed to two chips at once. The square becomes like a parallelogram, leaning towards the left.
Then, once the square is fully on the left screen, it speeds back up again, however with still the top row 1 light ahead.

I'll try make a video and upload to youtube.

Am I running into some sort of overhead? I'm rocking a Diavolino (duemilanove clone, but FTDI plug instead of USB socket), at 16MHz, with an ATMEGA328p.

I suppose what I'd ideally like is to be able to have 4 or more display's, with a font coded in, and just be able to send out serial data and it scrolls across (bit of a pipe dream at the moment as I can't get one happy-face to scroll across!)

Any input is greatly appreciated!

I'm stumped, this is driving me crazy!
8  Using Arduino / LEDs and Multiplexing / MAX7219 Scrolling text help! on: June 21, 2011, 06:51:01 am
Hi all,

After recently re-igniting my passion for electronics, I decided to pull out my stock of LED Matrix's and MAX7219's and see if I could get them to work. I had tried many things in the past, and never got a single digit to light up smiley-sad However, first go, I got the LEDControl Test scripts running! I used this gentleman's code http://www.instructables.com/id/How-To-Make-Two-Daft-Punk-Outfits-with-Helmets/ and that too worked a charm!

However, my target is to have a larger display, something like 24x16 pixels (3x2 layout of 8x8 matrix's).

To test out, I tried to get a smiley-grin scrolling across two displays side by side. After many hours of playing, it's working (sort of.....)

I took a different approach to the Daft Punk suit code. I defined my happy face in an array of 8 depth, with each array element holding the binary value for that row.

For example, my 'happy face' is:

Code:
byte face[8]={B00100100,B00100100,B00100100,B00100100,B00000000,B11111111,B10000001,B01111110};

To (ideally) display this on a matrix:

0 0 # 0 0 # 0 0
0 0 # 0 0 # 0 0
0 0 # 0 0 # 0 0
0 0 # 0 0 # 0 0
0 0 0 0 0 0 0 0
# # # # # # # #
# 0 0 0 0 0 0 #
0 # # # # # # 0

I can get the face displaying static, sliding in from the left, etc, even sliding out.

I modified the code to try and get it sliding across two display's, but it's not working.

Here's what I've got so far:

Quote
#include <LedControl.h>

LedControl lc=LedControl(12,11,10,2);
int devices=lc.getDeviceCount();

byte face[8]={
  B00100100,B00100100,B00100100,B00100100,B00000000,B11111111,B10000001,B01111110};  //happy smiley-grin face
byte matp[8]={
  B00100100,B00100100,B00100100,B00100100,B00000000,B11111111,B10000001,B01111110};  //matrix preload test
byte mat1[8]={
  B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000};  //matrix 1
byte mat2[8]={
  B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000};  //matrix 2
byte blnk[8]={
  B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000};  //blank matrix

void setup () {
  //we have already set the number of devices when we created the LedControl
  //we have to init all devices in a loop
  for(int address=0;address<devices;address++) {
    /*The MAX72XX is in power-saving mode on startup*/
    lc.shutdown(address,false);
    /* Set the brightness to max */
    lc.setIntensity(address,15);
    /* and clear the display */
    lc.clearDisplay(address);
  }
  for (int k=0; k<9; k++){
    mat1[k] = face[k];
    lc.setRow(0,k,mat1[k]);
    for(int address=0;address<devices;address++) {
      /*The MAX72XX is in power-saving mode on startup*/
      lc.clearDisplay(address);
    }
  }
}

void loop () {

  for(int m=8;m>-1;--m){         //scroll face onto screen one
    for (int j=0; j<9; j++) {
      mat1[j] = face[j] >> m;
      for (int l=0; l<9; l++){
        lc.setRow(0,l,mat1[l]);
      }
      //delay(10);
    }
    delay(40);
  }
  /*
  for(int m=8;m>-1;--m){         //scroll face onto screen two
   for (int j=0; j<9; ++j) {
   mat2[j] = matp[j] >> m;
   for (int l=0; l<9; l++){
   lc.setRow(1,l,mat2[l]);
   }
   //delay(10);
   }
   delay(50);
   }*/
  for(int m=8;m>-1;--m){          //scroll face off screen one
    for (int j=0; j<9; j++) {
      mat1[j] = mat1[j] << 1;
      mat2[j] = face[j] >> m;
      for (int l=0; l<9; l++){
        lc.setRow(0,l,mat1[l]);
        lc.setRow(1,l,mat2[l]);
      }
      //delay(10);
    }
    delay(40);
  }
  for (int k=0; k<9; k++){
    mat1[k] = face[k];
    lc.setRow(0,k,mat1[k]);
  }
    for(int address=0;address<devices;address++) {
      lc.clearDisplay(address);
    }

}



The problem I'm having is that it works great until it gets to scrolling onto the second display. The scrolling speed appears to slow down, and the top row of digits are moved across to the left by 1 too many, instead of being (B00100100, for example, they show as B01001000. Rest of the second display is fine.

Any ideas at all? I know it's probably hard to help with, as not many people have 2xMAX7219's and 8x8 matrix's conveniently in front of them, but if any C++ Guru's (I know there's some here!) could take a look at my code, that'd be much appreciated!
9  Using Arduino / General Electronics / Re: Led resistor calculator help on: June 21, 2011, 04:35:25 am
Depending on how "high powered" your LED's are depends on what current they run on. Are they 1W, 3W, 5W, etc?

I'll assume they are 1W, just for example.

From past experience, these LED's operate at 3.7V @ 350mA.

That means that they will have to be in parallel if you want them running off 6v.

Try playing with an online calculator like this...
(http://led.linear1.org/led.wiz)

(BTW, some other values for power LED's:
3W : 3.7v @ 700mA
5W : 3.7v @ 1000-1200mA)

Enjoy!


Regards,
Fudge.
10  Topics / Science and Measurement / Re: Accuracy of Arduino delay() command on: February 26, 2011, 05:16:50 am
Oops... my bad. Proofreading failure.

By pulse command, I meant delay. Basically, my code turns on, delays for however many milliseconds, then turns off. How accurate is the delay command?
11  Topics / Science and Measurement / Accuracy of Arduino delay() command on: February 26, 2011, 03:37:00 am
Hello all. Not sure if this is in the correct place, sorry if it's not...

I have been searching for a few hours on this, but cannot seem to find a reasonable answer to this.

Basically, I am doing a assignment and am using short(ish) pulses, from 1ms to 100ms. I have two questions:

  • Is there any way to get shorter pulses, such as 0.5 or even 0.2ms pulses?
and
  • how accurate is the pulse command?

The first one is not crucial, I can live with 1ms pulses.

However, as this is a formal lab report, I need to state my error margins. To what extent is the delay command accurate? I would imagine something like 0.01ms, however I really have no clue on what it might be.

Any help would be greatly appreciated.

Thanks in advance,
Fudge.
12  Forum 2005-2010 (read only) / Interfacing / Re: Arduino driving 8 8x8 LED Matrix displays? on: August 16, 2010, 07:19:48 am
Sorry, sort of skipped your reply there DeSilvia,

So, basically, you are saying that the chip's do not know their topology, as in where and how they are laid out, just that they get the right data? If so, then my previous post may just work...

I will keep you posted.
13  Forum 2005-2010 (read only) / Interfacing / Re: Arduino driving 8 8x8 LED Matrix displays? on: August 16, 2010, 07:17:01 am
Hmm, very interesting...

I had an idea earlier, instead of trying to make it one big string, i will have 2 "banks" of 4 7219's. And instead of, say having the letter A being made for a single digit, I will make it in two parts, A(top) and A(bot), for example. Then, i will scroll the top and bottom half across at the same time.

Can anyone see any issues with that? Or am I overseeing something?

Thanks!

14  Forum 2005-2010 (read only) / Interfacing / Re: Arduino driving 8 8x8 LED Matrix displays? on: August 15, 2010, 09:11:58 am
Woops, sorry, forgot to add link.

http://www.instructables.com/id/How-To-Make-Two-Daft-Punk-Outfits-with-Helmets/

Fudge.
15  Forum 2005-2010 (read only) / Interfacing / Arduino driving 8 8x8 LED Matrix displays? on: August 15, 2010, 09:10:20 am
Hello all,

I am attempting to make a semi-replica Daft Punk suit for my Grade 11 fancy-dress social/formal thing.

I have a mate involved, and after a bit of a brainstorm, we decided on Daft Punk, with lots of EL wire, and some sort of LED Matrix display's. We then found this AMAZING instructable on a similar project (extreme Kudo's to the two of them).

I admire what he has done with the matrix on the helmet, however, me living up to my reputation, I am going overboard.

I purchased 12 8x8 Red Common Cathode 3mm LED Matrix display's, along with 20 MAX7219 chip's. EL Wire is to be ordered tomorrow (all 40M of it... :S).

BUT... I was wondering... he has a single matrix display, and after my (very brief) searching, I have only seen people that have extended them lengthwise, I.E daisychained (16x8, 24x8, etc).

I was wondering if it was possible to extend both directions, so that, ideally, I can have a 16x32 display, driven off a duemilanove.

I just fear that if I attempt to scroll text, it is going to scroll on the top line, then go from the top right to bottom left, then off the bottom right.

I have been reading up on the LedControl.h library page, but I just cannot seem to find anything that will confirm or deny this! Can any of you Arduino god's out there be kind enough to shed some light on this topic?

Thanks in advance.
Fudge.
Pages: [1] 2