Running a 3.7 V Display just to turn on and off

I would like to run a little photoframe that runs fine on 3.7V and even turns on on my pin 10 on the Arduino Lilypad, http://arduino.cc/en/Main/ArduinoBoardLilyPad but it turns off after a second saying "Low Power". I know that Arduino can give out more than 3.3V. How do I make it do that? I have already tried to hook it up to 4x1.2V AA batteries, so 4.8 V should go in.

There’s more to driving a device than voltage, you have to consider current as well.

An Arduino pin can provide 5v (or 3v3 or whatever) but only at 20mA (safe) or 40mA (max).

I’m guessing your display needs more than that and you may be damaging your Arduino.

If you want to control the power to this display use a transistor or a relay.


Rob

Could you show me how?
What do I have to buy?
I tried to find the specs for the display but
not even the Lipo battery that was built in and
that I took out, says anything.
http://www.amazon.co.uk/DIGITAL-PICTURE-PHOTO-FRAME-RING/dp/B000ZUA1QI/ref=sr_1_2?ie=UTF8&qid=1338301134&sr=8-2

napok: I would like to run a little photoframe that runs fine on 3.7V and even turns on on my pin 10 on the Arduino Lilypad, http://arduino.cc/en/Main/ArduinoBoardLilyPad but it turns off after a second saying "Low Power". I know that Arduino can give out more than 3.3V. How do I make it do that? I have already tried to hook it up to 4x1.2V AA batteries, so 4.8 V should go in.

I'm just beginning myself. I'v seen responses that for high current devices, you want to power them separately, rather than having the Arduino power it (you want to connect the grounds between the two power supplies). Some Arduino's run at 5V (uno, mega, etc.), some at 3.3V (presumably lilypad), so you might want to switch to a higher voltage processor if you want to use a common power rail.

A simpler approach than hacking up an existing photo frame, might be to use a display that is meant for micro-controllers like the Arduino. I see adafruit.com, sparcfun.com, seeedstudio.com have several such displays (1.8", 2.8", 0.96", etc.). Newhaven display has a lot more options in terms of sizes, etc.

Thanks. I will try both ways.

The "right" answer is to drive a small transistor from the Arduino through a 1000 ohm resistor and use the transistor to switch the display.

The "possible/wrong" way is to connect 2 or 4 Arduino output pins together for more current capability. Make SURE you set them all to the same value BEFORE you set them to Outputs..

connect 2 or 4 Arduino output pins together for more current capability.

I was going to suggest that also and I think it would be OK as the display is apparently almost working with one pin. But you would have to use direct port manipulation to ensure that all pins changed at the same time, and I thought at this point that was a bridge to far for napok.

Alternatively you could use series resistors to stop self-destructing if the pins spend time at different levels either because of a programming error or just because digitalWrite()s are used.

set them all to the same value BEFORE you set them to Outputs..

Yes good idea, that will work and is safe. Just use pinMode() instead of digitalWrite() to control the power.


Rob

Just use pinMode() instead of digitalWrite() to control the power.

That's the right way.. thanks, Rob, for pointing that out. Set the outputs to 1 (or 0 if sinking) in Setup and then only change pinMode. If the PinMode bits change a few microseconds apart, that should not be a problem. You are switching very well-matched FETS, which parallel well anyway.

The average pin current should be kept at 20 mA or below, and the per-port total maximum should also be respected. See: http://arduino-info.wikispaces.com/ArduinoPinCurrent

Thanks guys. I will try it out today.

Ok. I give up.
How exactly do I use PinMode to regulate the power for 2 pins that I connect?
I tried to look for a clear tutorial, but I’m too noob for this still…

Right now, I got only an Led (ButtonLed) to work properly on the pin
that should have powered the display after the touch of a button
from the other Xbee participant.

Here`s my (working) code for the project (receiver part).

/*
  By Alexandra da Fonseca-Klein, Digital Jewellery project,
  www.adfk.co.uk; 2012
  2 Arduino Lilypad Simple Boards are connected via Xbee Series 2 radios.
  The Simple Board lacks Rx/Tx, therefore the use of SoftwareSerial.
  If the 2 wearers are within reach (30 feet approx) one LED
  comes on, if a button is pressed, on the other one a little
  LCD photoframe display comes on and displays the portrait of the sender.
  In this version, an LED comes on as surrogate for the display.
 */
#include <SoftwareSerial.h>

const int RXPin = 10;              // setting the pin to RX
const int TXPin = 11;              // setting the pin to TX
const int ButtonLed = 5;     // the number of the PushLed pin
const int ledPin =  13;      // the number of the LED pin
SoftwareSerial xbee (RXPin, TXPin);// defining the new serial name

void setup()  
{
  pinMode(ledPin, OUTPUT);
  pinMode(ButtonLed, OUTPUT);
  xbee.begin(9600);// set the data rate for the SoftwareSerial port
}

void loop() // run over and over
{
  if 
  (xbee.available())
  {
  digitalWrite(ledPin, HIGH);// set the LED on
  delay(500);               // wait for half a second
}
  else
  {
  digitalWrite(ledPin, LOW);// set the LED on
}
  if 
  (xbee.read() == 'L')
  {
  digitalWrite(ButtonLed, HIGH);// set the LED on
  digitalWrite(ledPin, HIGH);// set the LED on
  delay(1000);               // wait for a second
}
  else
  {
  digitalWrite(ButtonLed, LOW);// turn the LED off
}
}
  digitalWrite(ledPin, HIGH);// set the LED on
  digitalWrite(ledPin, LOW);// set the LED on
  digitalWrite(ButtonLed, HIGH);// set the LED on
  digitalWrite(ledPin, HIGH);// set the LED on

How about getting the comments right so we have a better idea of what's going on.

Where is the bit that's supposed to power the photo frame?

To use a pin as we suggested set it's level (with digitalWrite (pin, HIGH) or LOW) in setup() then use pinMode(pin, OUTPUT) to apply power and pinMode(pin, INPUT) to tri-state the pin and therefore remove power.

Do this for all the pins being used to power the display.


Rob