Show Posts
Pages: [1] 2 3
1  Using Arduino / Programming Questions / Re: shifty VU and satellite module: duemilanove yes, mega 2560 no?? on: January 05, 2013, 06:04:24 pm
And here we go with the answer from macetech, which I was too stupid to find on the site:
http://docs.macetech.com/doku.php/non-hardware_spi_example

This is some examplecode to use the shield with the mega and software SPI (also code for the due kind of arduino boards, which is helpfull for shields,which are to use with hardware SPI (ethershield and alike)

Hope this will help some other folks out there, so my post wasn't useless altogether....
2  Using Arduino / Programming Questions / Re: shifty VU and satellite module: duemilanove yes, mega 2560 no?? on: January 05, 2013, 05:27:42 pm
What is the "shifty" ?
A shield:
http://macetech.com/store/index.php?main_page=index&cPath=4
do drive some of these:
http://macetech.com/store/index.php?main_page=index&cPath=1

3  Using Arduino / Programming Questions / Re: shifty VU and satellite module: duemilanove yes, mega 2560 no?? on: January 05, 2013, 05:22:42 pm
Edit: AWOL beat me to it.
Yeah and myself (edited the above post).
 Ah lesson 5:
Don't post after 10hrs soldering and trying, it's nonsence most time anyway...
4  Using Arduino / Programming Questions / Re: shifty VU and satellite module: duemilanove yes, mega 2560 no?? on: January 05, 2013, 05:20:43 pm
Lessons to myself:
1. don't copy to much from examples
2. if you do, spend some time to understand them
3. read a lot more docu BEFORE asking
4. give free beer to those how anser anyway... (which is to happen, when we meet sometime :-) )

Thanks for pointing me to my mistakes.

5  Using Arduino / Programming Questions / Re: shifty VU and satellite module: duemilanove yes, mega 2560 no?? on: January 05, 2013, 05:05:48 pm
From the official arduino docu:
Quote
The Mega2560 is designed to be compatible with most shields designed for the Uno, Diecimila or Duemilanove. Digital pins 0 to 13 (and the adjacent AREF and GND pins), analog inputs 0 to 5, the power header, and ICSP header are all in equivalent locations. Further the main UART (serial port) is located on the same pins (0 and 1), as are external interrupts 0 and 1 (pins 2 and 3 respectively). SPI is available through the ICSP header on both the Mega2560 and Duemilanove / Diecimila. Please note that I2C is not located on the same pins on the Mega (20 and 21) as the Duemilanove / Diecimila (analog inputs 4 and 5).
But, duemilanove:
Quote
SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication using the SPI library.
mega 2560:
Quote
SPI: 50 (MISO), 51 (MOSI), 52 (SCK), 53 (SS). These pins support SPI communication using the SPI library. The SPI pins are also broken out on the ICSP header, which is physically compatible with the Uno, Duemilanove and Diecimila.
OK, I was distracted by the above statement, but I'm not shure how to know, if the shifty really uses SPI...
6  Using Arduino / Programming Questions / Re: shifty VU and satellite module: duemilanove yes, mega 2560 no?? on: January 05, 2013, 04:54:25 pm
Could be I2C pins being different between the boards, or something else like that. Unless you post your code or provide way more details it will not be easy trying to help you with your problem.

Lefty


They are, but to my knowledge not in use anyway....
7  Using Arduino / Programming Questions / Re: shifty VU and satellite module: duemilanove yes, mega 2560 no?? on: January 05, 2013, 04:46:20 pm
Of course I can (just wasn't at the computer with the IDE).
But I don't really know how the sketch has something to do with that.
EDIT:
correction to myself. Just thought that those who answer are in knowledge, that the shifty "just" works with 3PWM outputs.
EDIT2: dammit wrong again... the sketch I used was a partial copy of the example from macetech, which uses SPI (as I understand it now)
 Which is where I was wrong (again), sorry about that (just soldered the light mixing hardware for 10hrs)
/EDIT
 All pins from the duemilanove are in existance at the mega 2560. Some of the digital PINs with more functions (aka PWM) but non with less or other, at least the pins relevant for the standard shields... (ok wrong, see EDIT above)
Code:
#define clockpin 13 // CI
#define enablepin 10 // EI
#define latchpin 9 // LI
#define datapin 11 // DI

#define NumLEDs 8

int LEDChannels[NumLEDs][3] = {0};
int SB_CommandMode;
int SB_RedCommand;
int SB_GreenCommand;
int SB_BlueCommand;

void setup() {

   pinMode(datapin, OUTPUT);
   pinMode(latchpin, OUTPUT);
   pinMode(enablepin, OUTPUT);
   pinMode(clockpin, OUTPUT);
   SPCR = (1<<SPE)|(1<<MSTR)|(0<<SPR1)|(0<<SPR0);
   digitalWrite(latchpin, LOW);
   digitalWrite(enablepin, LOW);


}

void SB_SendPacket() {

    if (SB_CommandMode == B01) {
     SB_RedCommand = 120;
     SB_GreenCommand = 100;
     SB_BlueCommand = 100;
    }

    SPDR = SB_CommandMode << 6 | SB_BlueCommand>>4;
    while(!(SPSR & (1<<SPIF)));
    SPDR = SB_BlueCommand<<4 | SB_RedCommand>>6;
    while(!(SPSR & (1<<SPIF)));
    SPDR = SB_RedCommand << 2 | SB_GreenCommand>>8;
    while(!(SPSR & (1<<SPIF)));
    SPDR = SB_GreenCommand;
    while(!(SPSR & (1<<SPIF)));

}

void WriteLEDArray() {

    SB_CommandMode = B00; // Write to PWM control registers
    for (int h = 0;h<NumLEDs;h++) {
          SB_RedCommand = LEDChannels[h][0];
          SB_GreenCommand = LEDChannels[h][1];
          SB_BlueCommand = LEDChannels[h][2];
          SB_SendPacket();
    }

    delayMicroseconds(15);
    digitalWrite(latchpin,HIGH); // latch data into registers
    delayMicroseconds(15);
    digitalWrite(latchpin,LOW);

    SB_CommandMode = B01; // Write to current control registers
    for (int z = 0; z < NumLEDs; z++) SB_SendPacket();
    delayMicroseconds(15);
    digitalWrite(latchpin,HIGH); // latch data into registers
    delayMicroseconds(15);
    digitalWrite(latchpin,LOW);

}

void loop() {

   LEDChannels[0][0] = 1023; //LED 1 SW
   LEDChannels[0][1] = 1023;
   LEDChannels[0][2] = 1023;

   WriteLEDArray();
   delay(1000);

   LEDChannels[2][0] = 1023; //LED3 NNO links
   LEDChannels[2][1] = 1023;
   LEDChannels[2][2] = 1023;

   WriteLEDArray();
   delay(1000);

   LEDChannels[3][0] = 1023; //LED4 SO links
   LEDChannels[3][1] = 1023;
   LEDChannels[3][2] = 1023;

   WriteLEDArray();
   delay(1000);

   LEDChannels[4][0] = 1023; //LED5 SO rechts
   LEDChannels[4][1] = 1023;
   LEDChannels[4][2] = 1023;

   WriteLEDArray();
   delay(1000);

   LEDChannels[5][0] = 1023; //LED6 NW unten
   LEDChannels[5][1] = 1023;
   LEDChannels[5][2] = 1023;

   WriteLEDArray();
   delay(1000);

   LEDChannels[6][0] = 1023; //LED7 NW mitte
   LEDChannels[6][1] = 1023;
   LEDChannels[6][2] = 1023;

   WriteLEDArray();
   delay(1000);

   LEDChannels[7][0] = 1023; //LED8 NW oben
   LEDChannels[7][1] = 1023;
   LEDChannels[7][2] = 1023;

   WriteLEDArray();
   delay(100000000);
}
8  Using Arduino / Programming Questions / shifty VU and satellite module: duemilanove yes, mega 2560 no?? on: January 05, 2013, 03:41:33 pm
Helle,
I'm using macetechs shifty VU, Octobar and satellite module for room lightning. Did the first runs with the duemilanove and now (to expand inputs) I'd like to use the mega 2560 with the same setup.
I have a little sketch, which just turns on one stellite module after the other. It works with the duemilanove. When I now just exchange the duemilanove with the mega 2560 and use the same sketch, nothing lights up.
Anyone haning the same problem and perhaps solution?
9  Development / Other Hardware Development / Re: energy efficend UPS based on arduino? on: December 31, 2012, 04:37:54 pm
Oh, I just didn't read carefully enought:
PicoUPS!=PicoPSU

Maybe because I allready knew the PicoPSUs for some time and tought I just forgrt them. But logically someone had take that "shortcut" for a better UPS allready. I will look deeper in that next year, which is only less than 1.5 hours for me ;-)
10  Development / Other Hardware Development / Re: energy efficend UPS based on arduino? on: December 31, 2012, 02:39:42 pm
I would focus on the end power needed. In the case of a server, you're typically looking at 12VDC for the HDD's and 5VDC for the board. PicoUPS .....that plug directly into existing motherboards.
THAT'S really one thing I compleetly missed to think about. Thanks a lot! Just one question: aren't there +12V and -12V for some boards (aka a diffrence of 24V)?
But I like the idea a lot. Use a good PSU as primary converter (which has the additional capability to smoothen the Inputpower) and work with PicoPSU the rest of the way. Only concern to me is the speed of switching to the batteries in case of powerloss. Using some big capacitors for the switching delay, perhaps?
11  Development / Other Hardware Development / Re: energy efficend UPS based on arduino? on: December 31, 2012, 02:34:54 pm
13W for 750W is only 1.73%.
Not exactly.
First 750VA !=750W (about 680W IIRC)
Second: True if full load.
Another perspective to look at it: 12W input, zero W output (Battery filly charged, no devices on output side, switched OFF!), that would That's not definable (infinitive).

The diffrence then the switched off, compared to switched on (100% Battery, no devices) is 1.5 W which ist incedibly goog for holding the chagre
12  Development / Other Hardware Development / Re: energy efficend UPS based on arduino? on: December 28, 2012, 01:30:11 pm
Just to make that clear I'm talking about UPS used for servers. I just opened mine and found several tramsformers (one very huge maybe same as in welding machines?) and relays.
And I just touht about it in analogy to PSU. Where now we have PSU which clearly consume below 1W, there where the old ones (with tramsformers) which consume much more just by pluggin them in.

So I thought using that technology in UPS should make them using much less power in "passtrough power mode" than actually do now So the idea was to perhaps do a open hardware project baesed on arduino to get better UPS ...
Note: I'm not a expert in that in any way, but willing to help where I can (e.g my wife works in a PCB producing company).

Just thought an arduino with usb suport could handle all the status messages as fine as the APC with apcupsd ...
Having a pice of hardware, where you can plug in an arduino with the right code and having a full blown, open hard- and software, energy efficient UPS would just be to nice to have. :-)
13  Development / Other Hardware Development / energy efficend UPS based on arduino? on: December 28, 2012, 07:12:00 am
I just got an apcups for cheap. smartUPS 750.
As I often do with electrical equipment I did some measuring about the power consumption. For that I just plugged it in without any consumer attached. It then runned through the night to have the batteries charged to 100%. I then expected to have the UPS consuming only a very small amount of power, because it only have to supply a minimal amount to hold the charge at 100%. I was a bit suprised to found it to drag 13,5W. Switching it of changed that to 12W.
Maybe I'm just an electrical noob, but for me that's not acceptable.
So my question is: Shouldn't it be possible do build a UPS, that consumes a lot less, when in "normal" operational mode?
I know UPS have an additional use, which is to give a stable 230V/50Hz output, even when the input side is unstable.
The main idea is to get it as efficient as possible when it's operating in "power attached" mode, because the running time in battery mode is nearly irrelevant. (e.g. having 1 power off event a year, which shuts down the servers in 30 min is about 0.006% of the operating time)
14  Using Arduino / Project Guidance / Re: using Keypad library for a full QWERTY keyboard on: February 20, 2012, 04:03:44 pm

Quote
So, some newbie questions (for verification):
-the ino file is option8s keyboard layout, which I have to modify (rows/cols amount, my layout)

Yes, that is true.  Just make sure you keep your pin numbers in the right order.
sure, but I fist have to do the hardware for that. (will be a real pain, I think. 20 small wires from one small pad to the teensy and about 12 pads to connect each other. maybe i use enameled copper wire to spare some space
Quote from: mstanley
His file may already #include the keypad.h library.  If not, then yes, you will have to include it.

P.S.  Do you know how to add libraries to your Arduino software?
My mistake. I ment where to place the library, but I think I just have to find the directory where all the libraries are and put the keypad.h there, so that the include command works...

I hope I'll get some photos uploaded at the weekend. Thanks for your support so far.
15  Using Arduino / Project Guidance / Re: using Keypad library for a full QWERTY keyboard on: February 19, 2012, 09:35:16 am
Yes I got a "keypad 2.0 multi-keys" zip-file
and a "IIc Keyboard.ino"
So, some newbie questions (for verification):
-the ino file is option8s keyboard layout, which I have to modify (rows/cols amount, my layout)
- there are a lot of examples included (mainly for the numkeypad, if I understood it correctly) and a keypad.h and a keypad.cpp file.

So "all" I need is to modify the layout part of option8s ino file and include the keypad.h library?
Pages: [1] 2 3