Show Posts
Pages: 1 [2] 3
16  Using Arduino / LEDs and Multiplexing / Re: Small 8x8 matrix driver? on: October 12, 2012, 02:11:51 pm
@JoeN: I'm probably going to have them made in batches of about 50 to 100, still a bit early to know for sure.

@CrossRoads: Thanks! That seems perfectly logical. Im still pretty new when it comes to serial, but I was thinking it would be better to send a whole frame to the second atmega, and have it display it till a new frame comes in.
17  Using Arduino / LEDs and Multiplexing / Re: Small 8x8 matrix driver? on: October 12, 2012, 02:00:16 pm
@JoeN: As for the MAX6955, I feel like it would be more effort then its worth to make a whole new library, though i'm still definitely considering it, thanks!

Who needs a library when you can just bitbang the bits that the chip wants at it?  That is what I did when I wanted to figure out how the MAX7219 worked.  Read the datasheet and you will find that the bits you have to send at these chips are simpler than you would expect.

SAMPLE THE PART.  You can get two.  I know this for a fact.  If you don't end up using it, ...?
Ill for sure sample it, nothing to loose there. Though i'm more of a hardware guy, so it still seems like quite a bit of effort for something that costs over twice that of the atmega.
18  Using Arduino / LEDs and Multiplexing / Re: Small 8x8 matrix driver? on: October 12, 2012, 01:53:31 pm
Thats right, I forgot to mention that I will be having the pcbs made. So all of the parts will be fine pitch surface mount parts.
And yeah very true, do you have any recommendations on a specific atmega? Also, im thinking ill adapt the http://www.arduino.cc/playground/Main/DirectDriveLEDMatrix code, but do you have any ideas on how I would do the communication?

@JoeN: As for the MAX6955, I feel like it would be more effort then its worth to make a whole new library, though i'm still definitely considering it, thanks! Also the cost of the MAX6955, is quite a bit higher then that of an atmega...

@CrossRoads: I would do that, but the entire project is going to be about the size (though thicker) of a credit card. So I don't want to have holes milled into the pcb, since im essentially cutting into the "front panel" of the board.

19  Using Arduino / LEDs and Multiplexing / Re: Small 8x8 matrix driver? on: October 12, 2012, 01:35:11 pm

What are you going to fix it to? A PCB is thicker than that...

Is an external chip needed? You can do multiplexing with the Arduino, it just takes more programming effort.


Its actually going to soldered onto a 0.8mm PCB.

The chip package is mostly plastic. If you splay the legs out you can probably grind it down very thin by rubbing it on sandpaper. It won't be easy, you'll probably wreck a few while you're finding the limits...but it could work.

...or you could use the Arduino to do the multiplexing.



Thats actually just got me thinking, I may just use a second atmega in a qfn package as the driver, and use the first (main) arduino to send serial commands to the second...
20  Using Arduino / LEDs and Multiplexing / Re: Small 8x8 matrix driver? on: October 12, 2012, 01:28:52 pm
Also, an external chip would be ideal, since I would like to use as little as possible of the Arduino's pins...
21  Using Arduino / LEDs and Multiplexing / Re: Small 8x8 matrix driver? on: October 12, 2012, 01:19:45 pm

What are you going to fix it to? A PCB is thicker than that...

Is an external chip needed? You can do multiplexing with the Arduino, it just takes more programming effort.


Its actually going to soldered onto a 0.8mm PCB.
22  Using Arduino / LEDs and Multiplexing / Small 8x8 matrix driver? on: October 12, 2012, 12:30:39 pm
Hey guys,
Im working on a project thats supposed to be ultra slim (about 3mm total). I'm looking for an 8x8 LED driver (or really any way to drive 64 LEDs) but in a package thats about 1mm thin, really anything thinner then 1.6mm.
So far, I've looked at the MAX72xx series and a few others, but they are to big. I've also looked at the AS1116 LED drivers from AMS, but I have no idea how I would get it up and running with the Arduino.

Any suggestions would be of great help.

Cheers,
Nadav
23  Using Arduino / Programming Questions / Re: Split string into individual digits? on: February 11, 2012, 06:33:57 pm
Right that makes sense, except that I only want to round if the voltage has 4 digits. So if the voltage is 10 or more then round. If not, then just display that number to the seven segment.
24  Using Arduino / General Electronics / Re: I need help designing solder pads for an Eagle library part - TLC5947 on: February 11, 2012, 05:50:41 pm
The easiest method when doing a part in eagle, especially the footprint, is just to use an existing parts footprint. Then just copy it and change the pin assignments and you're done
25  Using Arduino / Programming Questions / Re: Split string into individual digits? on: February 11, 2012, 05:36:32 pm
Its still bits and pieces but here it is.
Code:
//We always have to include the library
#include "LedControl.h"
const int voltPin = 0;
float denominator;
int resistor1 = 6;
int resistor2 = 1.5;
LedControl lc=LedControl(7,6,5,1);

/* we always wait a bit between updates of the display */
unsigned long delaytime=250;

void setup() {
  denominator = (float)resistor2 / (resistor1 + resistor2);
  /*
   The MAX72XX is in power-saving mode on startup,
   we have to do a wakeup call
   */
  lc.shutdown(0,false);
  /* Set the brightness to a medium values */
  lc.setIntensity(0,8);
  /* and clear the display */
  lc.clearDisplay(0);
}

/*
  This method will scroll all the hexa-decimal
 numbers and letters on the display. You will need at least
 four 7-Segment digits. otherwise it won't really look that good.
 */
void scrollDigits() {
  float voltage;
  voltage = analogRead(voltPin);
  voltage = (voltage / 1024) * 5.0;
  voltage = voltage / denominator;
 
    lc.setDigit(0,3,i,false);
    lc.setDigit(0,2,i+1,false);
    lc.setDigit(0,1,i+2,false);
    lc.setDigit(0,0,i+3,false);
    delay(delaytime);
  }
  lc.clearDisplay(0);
  delay(delaytime);
}

void loop() {

  scrollDigits();
}
26  Using Arduino / Programming Questions / Split string into individual digits? on: February 11, 2012, 04:56:24 pm
Hello everyone,

I have a string that I read from analogRead and did a bit of math too. It looks something like this it can range from 1.95 to 10.25.
I need to write this to 3 seven segment displays. For that I chose a MAX7219 and the ledcontrol library. Now since im using only 3 of them, I get that I not only need to round the 10.25 to 10.3 or something like that.
My other problem now is to split that string and display it on the seven segments.

Thanks in advance,
Nadav
27  Using Arduino / Programming Questions / Re: RGB fader with up/down buttons on: December 06, 2011, 07:42:49 am
Code:
const int redPin   =   13; //Define red led
const int greenPin =   12;//Define green led
const int bluePin  =   11;//Define blue led

Pins 12 and 13 are not PWM pins on the Duemlinanove.

Do you have pull-ups or something on those pins? How is it wired?

Code:

  if (pgrmPin == HIGH){//Enter Program mode
    if (pgrmRUPin == HIGH && red >= 0 && red < 255){
      red++;

The loop function executes thousands of times a second. It is likely it is immediately going to either full on or full off. You need to check for a button press which is different from last time, eg.

Code:
if (pgrmRUPin == HIGH && oldpgrmRUPin == LOW)
  {
  if (red >= 0 && red < 255)
    red++;
  delay (10);  // debounce
  }

// detect switch changes
oldpgrmRUPin = pgrmRUPin;

(edit) Plus what John said. You need to read the pin, not just use the pin number.

Great ill try this tonight! I cant believe if forgot to read the pin! silly me smiley-grin
Also about pins 12 & 13 they are the pwm on the attiny2313..
28  Using Arduino / General Electronics / Re: Motor control through USB Joystick on: December 05, 2011, 08:10:03 pm
You could also get the joysticks position directly from its potentiometers. You may need a bit of clever Arduino work to get the x and y however..

Nadav
29  Using Arduino / General Electronics / Re: Soldering audio cables on: December 05, 2011, 08:07:04 pm
Ive had this problem so many times before! Just thinking out loud but what if you rubbed the end of the cable that your soldering to with some acetone (nail polish remover) it might help strip the enamel of the wire.
Never tried this though so let us know how it turns out!

Nadav.
30  Using Arduino / Programming Questions / RGB fader with up/down buttons on: December 05, 2011, 08:02:33 pm
Hi all,
Im writing some code (attached below) that is supposed to control an RGB led.
Whats supposed to happen is that you put the "device" into programming mode with a switch (pgrmPin) and then using 2 up/down buttons per led color select the color. so far nothing is happening.

The final version is meant to run on an attiny2313 that has a ported Arduino bootloader, thats why the pins are set the way they are. I have tried however to change the pin and run it on my Duemlinanove but still no success.
(yes the leds and buttons work)
if anyone can help it would be really appreciated.

Nadav.

Code:
const int redPin   =   13; //Define red led
const int greenPin =   12;//Define green led
const int bluePin  =   11;//Define blue led
const int pgrmPin  =   10;//Define program switch
const int pgrmRUPin =   7;//Define red up button
const int pgrmGUPin =   6;//Define green up button
const int pgrmBUPin =   5;//Define blue up button
const int pgrmRDPin =   4;//Define red down button
const int pgrmGDPin =   3;//Define green down button
const int pgrmBDPin =   2;//Define blue down button
int red = 0;
int blue = 0;
int green = 0;

void setup() {
  pinMode(redPin, OUTPUT);     //PWM PIN 13 (PB4)
  pinMode(greenPin, OUTPUT);     //PWM PIN 12 (PB3)
  pinMode(bluePin, OUTPUT);     //PWM PIN 11 (PB2)
  pinMode(pgrmPin, INPUT);     //Digital PIN 10 (PB1)
  pinMode(pgrmRUPin, INPUT);     //Digital PIN 7 (PD5)
  pinMode(pgrmGUPin, INPUT);     //Digital PIN 6 (PD4)
  pinMode(pgrmBUPin, INPUT);     //Digital PIN 5 (PD3)
  pinMode(pgrmRDPin, INPUT);     //Digital PIN 4 (PD2)
  pinMode(pgrmGDPin, INPUT);     //Digital PIN 3 (PA0)
  pinMode(pgrmBDPin, INPUT);     //Digital PIN 2 (PA1)
}

void loop() {
  if (pgrmPin == HIGH){//Enter Program mode
    if (pgrmRUPin == HIGH && red >= 0 && red < 255){
      red++;
    }
    if (pgrmRDPin == HIGH && red > 0 && red <= 255){
      red--;
    }

    if (pgrmGUPin == HIGH && green >= 0 && green < 255){
      green++;
    }
    if (pgrmGDPin == HIGH && green > 0 && green <= 255){
      green--;
    }
    if (pgrmBUPin == HIGH && blue >= 0 && blue < 255){
      blue++;
    }
    if (pgrmBDPin == HIGH && blue > 0 && blue <= 255){
      blue--;
    }
    analogWrite(redPin, red);
    analogWrite(greenPin, green);
    analogWrite(bluePin, blue);
}
 analogWrite(redPin, red);
 analogWrite(greenPin, green);
 analogWrite(bluePin, blue);
}

Pages: 1 [2] 3