Loading...
  Show Posts
Pages: 1 ... 97 98 [99] 100 101 ... 104
1471  Forum 2005-2010 (read only) / Development / Re: Increase battery life with Switching Regulators on: January 11, 2009, 03:48:42 pm
Hi

While I´m waiting to receive some switching regulators, I´ve been tinkering with sleep modes (Power Save Mode)

In my application I have a big delays (300 ms) and as Paul said, could be a big improvement....and looking the results, it´s clear!!

I´ve done a test that tonggle the diecimila led about 2 seconds. I´m using Timer2 (to wake up).
-Sleep Mode and turn off devices=> Led_on=12,98 mA & Led_off=9,91 mA
-No Sleep and turn off devices   => Led_on=28,9 mA & Led_off=25,9 mA
-No Sleep                               => Led_on=32,2 mA & Led_off=29,2 mA


SLEEP MODE TEST CODE

Code:
#include <avr/interrupt.h>
#include <avr/sleep.h>


volatile int cont;

void setup()
{
  pinMode(13,OUTPUT);
  
  TCCR2A=0;  
  TCCR2B=(0<<7)|(0<<6)|(0<<5)|(0<<4)|(0<<3)|(1<<2)|(1<<1)|(1<<0);
  // Bit 0.- Overflow
  TIMSK2=(0<<2)|(0<<1)|(1<<0);
  //Power Save Mode
  SMCR=(0<<3)|(1<<2)|(1<<1)|(0<<0);
    
}

ISR(TIMER2_OVF_vect)
{
  cont++;
}

void loop()
{

   sleep_enable();
   //Turn off ADC
   ADCSRA=0;
   // TWI | TIMER2 | TIMER0 | VOID | TIMER1 | SPI | USART | ADC
   PRR=(1<<7)|(0<<6)|(1<<5)|(1<<4)|(1<<3)|(1<<2)|(1<<1)|(1<<0);
   sei();
   while (cont<122)
   {
   //Go to Sleep
   sleep_mode();
   }
   //Disable Sleep
   sleep_disable();
   //Disable interrupts
   cli();
   cont=0;
   digitalWrite(13,!digitalRead(13));
  
  
}





NO SLEEP AND TURN OFF DEVICES

Code:
#include <avr/interrupt.h>
#include <avr/sleep.h>


volatile int cont;

void setup()
{
  pinMode(13,OUTPUT);
  
  TCCR2A=0;  
  TCCR2B=(0<<7)|(0<<6)|(0<<5)|(0<<4)|(0<<3)|(1<<2)|(1<<1)|(1<<0);
  // Bit 0.- Overflow
  TIMSK2=(0<<2)|(0<<1)|(1<<0);
  //Turn off ADC
  ADCSRA=0;
  // TWI | TIMER2 | TIMER0 | VOID | TIMER1 | SPI | USART | ADC
  PRR=(1<<7)|(0<<6)|(1<<5)|(1<<4)|(1<<3)|(1<<2)|(1<<1)|(1<<0);
  sei();
}

ISR(TIMER2_OVF_vect)
{
  cont++;
  if (cont<122)
  {
    cont=0;
    digitalWrite(13,!digitalRead(13));  
  }
    
}

void loop()
{

  
}




NO SLEEP

Code:
#include <avr/interrupt.h>
#include <avr/sleep.h>


volatile int cont;

void setup()
{
  pinMode(13,OUTPUT);
  
  TCCR2A=0;  
  TCCR2B=(0<<7)|(0<<6)|(0<<5)|(0<<4)|(0<<3)|(1<<2)|(1<<1)|(1<<0);
  // Bit 0.- Overflow
  TIMSK2=(0<<2)|(0<<1)|(1<<0);
  //Turn off ADC
  //ADCSRA=0;
  // TWI | TIMER2 | TIMER0 | VOID | TIMER1 | SPI | USART | ADC
  //PRR=(1<<7)|(0<<6)|(1<<5)|(1<<4)|(1<<3)|(1<<2)|(1<<1)|(1<<0);
  sei();
}

ISR(TIMER2_OVF_vect)
{
  cont++;
  if (cont==122)
  {
    cont=0;
    digitalWrite(13,!digitalRead(13));  
  }
    
}

void loop()
{

  
}




Regards, smiley



Igor R.
1472  Forum 2005-2010 (read only) / Development / Re: Increase battery life with Switching Regulators on: January 10, 2009, 01:51:28 pm
Thank-u to all!

I´m agree that PP3 is not the best battery,but I prefere a step down regulator because sometimes it will be power with PP3 but other times I´ll power with an external power source (car battery). And it helps me with the hardware design.

Now I´m achieving 15 continuos hours (Arduino + LCD) and without sleep mode or auto-swith power. Working with timers, adc,...
The application is like a multimeter + sensor tester. It´s not for a continous working application.

I think with a switching regulator with a shutdown pin and working a little into the software to put it in sleep modes and switching off after 1 or 2 minutes of no use, I´ll achieve a good compromise between power life time and development....

I´m going to test it (I need a stable Vout with low ripple).

I´ll keep you updated.... smiley-wink



Regards,



Igor R.
1473  Forum 2005-2010 (read only) / Development / Re: Increase battery life with Switching Regulators on: January 09, 2009, 04:25:43 pm
Maybe I´m not true but...

If my application need 50 mA with 5 volts, the output power is 0,25 watios.


With a switching regulator of 80% of performance, I need a Pinput=0,25/0.8=0,31 watios. For this:
With Vinput=9 volts, I input=35 mA
With Vinput=8 volts, I input=39 mA
With Vinput=7 volts, I input=45 mA
With Vinput=6 volts, I input=52 mA


This meas that while the battery is over 6 volts, I need less current that with a linear regulator. Because, with the linear regulator the output current is the same that input... isn´t it?

Is this ok??  



Igor R.
1474  Forum 2005-2010 (read only) / Development / Increase battery life with Switching Regulators on: January 09, 2009, 02:17:43 pm
Hi,

I´m thinking about test the diference about fix one swithing regulator in stead of the linear one of Dicecimila. I´m using PP3 battery and maybe is a good improvement.

Anyone have experience with this? Is possible achive big differences in battery´s life?

Other improvement is to have a shutdown pin.... Because I´m interesting in shutdown if the machine is not being used.

I´m looking LM2596...

Any advice?  smiley-wink


Thank-u



Regards,



Igor R.
1475  Forum 2005-2010 (read only) / Development / Re: Arduino Battery Life? on: December 23, 2008, 12:21:18 pm
Hi,

I´ve done a test with Diecimila + LCD Displaytech 162 B (2x16). The consumption is 32 mA.
I´ve used a PP3 Sony Stamina PLUS 6AMB-B1A (Alcaline)

In my application, I capture an analog signal from a sensor and show it, with a refresh time of 350 ms.

My results are:
Start.- 9,23 voltios
1h.- 8'41 v
2h.- 8'07 v
3h.- 7'82 v
4h.- 7'61 v
5h.- 7'46 v
6h.- 7'32 v
7h.- 7'22 v
8h.- 7'11 v
9h.- 7'03 v

(Continuos Working. I think in a non continuos application, this time increase)

Searching curves of this type of batteries, they look like http://docs-europe.electrocomponents.com/webdocs/01b2/0900766b801b2da8.pdf  (Duracell).
The service hours depends of the power of your application.


Kind Regards,


Igor R.
1476  Forum 2005-2010 (read only) / Interfacing / Re: Linksys + dd-wrt + arduino on: December 18, 2010, 06:56:47 pm
Hi,

Look at this method..... it´s nice. You can download ser2net
http://www.andrewhazelden.com/blog/2010/01/how-to-use-the-serial-ports-on-a-linksys-wrt54gs-with-dd-wrt-v24/
http://todbot.com/blog/2010/12/16/wifi-for-arduino-with-asus-wl-520gu/

And use a virtual serial port:
http://www.hw-group.com/products/hw_vsp/index_en.html


 smiley-wink
1477  Forum 2005-2010 (read only) / Interfacing / Re: Linksys + dd-wrt + arduino on: December 17, 2010, 04:40:51 am
I suppuse that you can activate to load telnet service again when the router starts..... I'm not a linux expert, but I can't believe that you can't activate it...
http://ram.squat.net/tech/openwrt/whiterussian_client_setup.html
(here you can see how the telnet service is disable)

If you don't have telnet, I imagine that you have ssh, which it's more safe. I've never checked if there are free ActiveX ssh clients.....


 smiley-wink
1478  Forum 2005-2010 (read only) / Interfacing / Re: Linksys + dd-wrt + arduino on: December 16, 2010, 03:49:08 am
Hi,


You can download an example excel from my blog http://real2electronics.blogspot.com/2009/10/linksys-arduino.html

 smiley-wink
1479  Forum 2005-2010 (read only) / Interfacing / Re: Linksys + dd-wrt + arduino on: December 15, 2010, 09:15:02 am
Maybe the serial ports is  /dev/tts/1 in your device??
1480  Forum 2005-2010 (read only) / Interfacing / Re: Linksys + dd-wrt + arduino on: December 13, 2010, 05:00:30 am
Hi Erac,

I didn't use a C program inside the router.

I did it much easier. I'm connecting to the router using telnet. When you are connected, i.e. WIFI, you can use typical UNIX commands, as:
echo "string_to_send" > /dev/cua/1
or
cat < /dev/cua/1

I did a "protocol" inside Arduino to respond to my serial commands, an easy example :
S0E or S1E where,
char S -> Start byte
char 0 or 1 -> is led OFF or led ON
char F -> End byte

You can do the same to ask for an analog signal or whatever....  smiley-wink
Also you are receiving the "answer".

Something to start, you could open 2 shell (two console connection against the router):
- First shell --> cat < /dev/cua/1
- Second shell -> you can send your "orders" using echo "string_to_send" > /dev/cua/1

http://2.bp.blogspot.com/_t8Ozc8jIT9I/Sttq6jcGFpI/AAAAAAAAAIA/9nmsqF-R-XI/s1600-h/Captura+Putty.JPG

I'm sorry, it's in spanish.
The feedback "ENCENDIDO" means SWITCH ON and "APAGADO" switch off.
You can find the code in http://real2electronics.blogspot.com/2009/10/linksys-arduino.html

Summarazing, I'm using the router as a telnet <=> serial port gateway. I'm connecting to the router using telnet ActiveX client. When I've connected (2 connections, one to receive and one to send), I'm "polling" serial commands to my Arduino or your Arduino could send all the time and you can get the data.

For expample=> http://real2electronics.blogspot.com/2009/12/linkduino-software-para-telemetria.html

I'm plotting using Zedgraph and the telnet  connection using Minimalistic ( the soft was done in C# (.NET) ):
• Minimalistic Telnet: http://www.codeproject.com/KB/IP/MinimalisticTelnet.aspx
• ZedGraph: http://zedgraph.org/wiki/index.php?title=Main_Page


I have other examples using a PHP server inside the router ( DD WRT + OPTWARE), but in my opinion this is the easiest method I've found. It depends if you want to use the router to process or only as a "shield"....

I hope this helps....




 smiley-grin


1481  Forum 2005-2010 (read only) / Interfacing / Re: Linksys + dd-wrt + arduino on: November 13, 2009, 06:20:01 pm
Hi again,

I´ve added a new example (Graph with data acquired from Arduino and sent via Wifi):






[media]http://www.youtube.com/watch?v=OhKh4_D8-Ac[/media]



Kind Regards,



Igor R
http://real2electronics.blogspot.com/
1482  Forum 2005-2010 (read only) / Interfacing / Re: Linksys + dd-wrt + arduino on: November 07, 2009, 05:11:56 am
Hi,

As I don´t want go into linux´s scripts in depth, but I want to have wifi access into my aduino board,I´ve done an Excel sheet with telnet connection.
I can control Arduino via serial port.
You can follow an easy example (typical switch led on/off): http://real2electronics.blogspot.com/2009/10/linksys-arduino.html
Now I can use the power of excel to graph, math channels, VBA,... in "real time".

It´s in spanish, but google translate works quite good....

Regards



Igor R.
1483  Forum 2005-2010 (read only) / Interfacing / Re: Linksys + dd-wrt + arduino on: October 17, 2009, 06:55:35 pm
And.... what about http://netus.acmesystems.it/doku.php?id=products:foxboardg20 ?

[edit]Maybe this could help you:
http://books.google.com/books?id=GBtJdvMeAJQC&printsec=frontcover&hl=es&source=gbs_v2_summary_r&cad=0#v=onepage&q=&f=false[/edit]

 smiley-wink
1484  Forum 2005-2010 (read only) / Interfacing / Re: Linksys + dd-wrt + arduino on: October 17, 2009, 03:43:16 am
Hi Reggie,

Now, I´m able to communicate using telnet arduino with Linksys router.
My router is Linksys WRT54GL v1.1 with DD-WRT.
I bought this routers to use as WDS repeaters and universal repeaters. But now, I´m tinkering with this.

I´ve to use two telnet´s connection:
- first to send data: echo whatyouwantintoserialport > /dev/cua/1
- second to receive data from serial to port to the shell: cat < /dev/cua/1

I´m been looking into internet and there´re many project which use linksys as web server, php, ....

http://www.jbprojects.net/projects/wifirobot/
http://ahorcandoeltiempo.blogspot.com/search/label/Arduino [Spanish]
http://www.mightyohm.com/blog/2009/05/building-a-wifi-radio-part-10-building-the-box/
http://www.lecad.uni-lj.si/~leon/other/wlan/wrt54ow/index.html

Now, it would be interesting to learn how to make your own scripts inside the router....

 smiley-wink





1485  Forum 2005-2010 (read only) / Interfacing / Re: Linksys + dd-wrt + arduino on: October 16, 2009, 02:10:16 pm
Hi again,

I´ve found the solution....http://www.herbert-dingfelder.de/WRT54GL_add_on/WRT54GL_add_on.html

I´ve to open two connection, one to send and other to receive with cat < /dev/cua/1


 smiley-wink
Pages: 1 ... 97 98 [99] 100 101 ... 104