Show Posts
Pages: 1 ... 5 6 [7] 8 9
91  Using Arduino / Motors, Mechanics, and Power / Re: Can I run an arduino from 240v on: August 02, 2012, 12:59:46 am
Well you could take the obvious route and gut out a wall wart.  smiley-wink

Where is the fun in that?
92  Using Arduino / Project Guidance / Re: Sleep and Millis() - I need both? on: August 01, 2012, 06:09:41 pm
I have not seen any - the only mode that maintained the millis function was SLEEP_MODE_IDLE when I did some testing.

Have you tried searching? There are quite a few power management libraries around.

http://www.engblaze.com/low-power-libraries-for-arduino-control-sleep-with-single-function-calls/

But do they give me access to a functioning millis() function?

I can't see how a library does as the chip disabled the timers?

I am at work so can not test until tonight!
93  Using Arduino / Motors, Mechanics, and Power / Can I run an arduino from 240v on: August 01, 2012, 05:55:24 pm
I have a project where my arduino needs to be sitting in the power meter box for my house. This is on the outside of the house.

There is only the meter in this box - no power socket for me to use, and batteries will be a problem with how long they last.

A case of Power Everywhere and no power for me to use - a bit like floating in an ocean with no water to drink!

Is there any way I can get 5-9v inductivly from the mains power?

Chris
94  Using Arduino / Project Guidance / Re: Sleep and Millis() - I need both? on: August 01, 2012, 03:57:18 pm
There are power management libraries which can perform the sleep and maintain the 'millis()' value correctly, which simplifies your sketch.

I have not seen any - the only mode that maintained the millis function was SLEEP_MODE_IDLE when I did some testing.

But in this mode there is not much power savings since the processor wakes up every millisecond.

All other modes I tried the millis() had stopped.

chris
95  Using Arduino / Project Guidance / Re: Sleep and Millis() - I need both? on: August 01, 2012, 04:26:13 am

Why not have the receiver timestamp the data?  Why does the sender have to do it?


I guess this could work but if I lost a packet instead of a gap I would have corrupt data.

I will look into this option as well.

cheers

chris
96  Using Arduino / Project Guidance / Re: Sleep and Millis() - I need both? on: August 01, 2012, 04:24:55 am
Why not sleep, use RTC's square wave output as an interrupt to wake up more often than once a second? Check the time, if not ready to send yet go back to sleep, check again.
You have these choices with a DS1307 for example:
1 Hz, 1000mS
4 KHz, 0.250mS
8KHz, 0.125mS
32kHZ, 0.03125mS

4 KHz seems like plenty, keep track of where you are within the second using that.
Wake up increment time interval counter, see of power pulse occurred yet.
Waking up every 250uS, or 4000 clocks, I guess you'd stll be sleeping most of the time.



This sounds interesting - have you actually used the interrupt to count time?

It does not matter when I update the data - 60 seconds, 61 seconds etc.... But I need to know how long since the last update to get accurate data durations for the pulse count.

Are you saying with this interrupt I could increment a volatile variable and simulate my own millis function?

Chris
97  Using Arduino / Project Guidance / Sleep and Millis() - I need both? on: July 31, 2012, 11:48:28 pm
I am creating a project that needs to save power - both battery and my house power.

I am creating a simple circuit using an ATMega328 + a few components to count the pulses from a power meter.

The device must run on batteries and about once per minute send a small payload via 2.4Ghz

My data packet I send is

TimeNowMS
TimePrevMS
PulseNow
PulsePrev

So based on this I can work out the power consumption in my house at the current time.

I have the basics working but I now want the device to sleep between updates over WIFI to save power.

I need to have the pulses being counted using interrupts even when sleeping.

Without any sleep the board is using 19ma - I want to reduce that by a huge amount - remember this is not an arduino board just the bare essentials to get it running with arduino code.

All of the arduino sleep modes of any value corrupt the value returned by Millis() since the timer is not running when the device is sleeping.

Normally I count the pulses between updates and also the duration in ms since the last update in ms.

I thought about a RTC but 1 second accuracy is not good enough - I need more accuracy !

Is there a way I can use a crystal to get ms? maybe using some sort of external circuit? but still readable by Arduino and all the while not using much power?

ANy thoughts appreciated

chris

98  Using Arduino / Programming Questions / Re: Arduino and Sleep - power save on: July 31, 2012, 02:22:13 pm

Thanks Nick

That helped me a lot.

chris
99  Using Arduino / Programming Questions / Re: Arduino and Sleep - power save on: July 31, 2012, 03:37:56 am
Which version of the IDE are you using?

On that computer it is 1.01

Chris

100  Using Arduino / Programming Questions / Arduino and Sleep - power save on: July 31, 2012, 02:51:41 am
I am trying to follow the code at http://jeelabs.org/2009/05/16/power-consumption-more-savings/

I think I have it right - but I am getting some strange Serial output.



My code is

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

ISR(WDT_vect) {
}

void setup()
{
  Serial.begin(9600);
MCUSR &= ~(1<<WDRF);
cli();
WDTCSR |= (1 << WDCE) | (1 << WDE);
WDTCSR = 6;
WDTCSR |= bit(WDIE);
sei();

}

void loop()
{
  delay(3);
  set_sleep_mode(SLEEP_MODE_PWR_DOWN);
  sleep_mode();
  Serial.print ("\nBMP");
}



Any ideas of why I get corrupted data on the Serial Output?

I am using an Arduino Duemilanove

Chris
101  Using Arduino / Sensors / Re: ROPE Water Sensor on: July 30, 2012, 04:38:43 pm
I did find a site that creates and sells the cable.

I have asked for some pricing options.

http://www.cmrelectrical.com/water-detection-cable.htm

I think this works differently, in that it does not tell you where along the cable it is shorted but just that there is a detection.

Chris
102  Using Arduino / Networking, Protocols, and Devices / Re: RF24 - nrf24l01+ - scanner example on: July 29, 2012, 09:28:46 pm
Thanks John

Chris
103  Using Arduino / Networking, Protocols, and Devices / RF24 - nrf24l01+ - scanner example on: July 29, 2012, 06:39:44 pm
I am looking at the scanner example from the RF24 Library.

The example is here:

http://maniacbug.github.com/RF24/scanner_8pde-example.html

Can someone explain to me what I should be seeing?

From the code if it detects a carrier it increments a counter for that channel.

So is a carrier bad? ie there is some other wifi device on that channel?

Do I want to use a channel for my code which has a value of 0?

Chris
104  Using Arduino / Sensors / ROPE Water Sensor on: July 29, 2012, 01:55:03 pm
Hi

I have been getting interested in Rope Water Sensors which can detect when any part of the rope is wet and then using an Arduino to process that and generate an alert. Good for server rooms or anywhere you do not want water.

These things are made (or sold) by a lot of companies but they all include the electronics.

A quick  google will show you what I mean

http://www.google.com/search?q=Rope Water Sensor

I am interested in just the cable - anyone know who makes this cable and sells it online?

I am in New Zealand but it could be imported i assume?

Cheers

Chirs
105  Using Arduino / Networking, Protocols, and Devices / Re: NRF24L01 problems - Beginner - Not working on: July 26, 2012, 05:57:46 pm
OK

I decided to try to run a different sketch - in this case another example - I think it was pingpong?

This worked for me.

No idea why the "getting started" sketch did not but I will try to see over the weekend - work calls now!
Pages: 1 ... 5 6 [7] 8 9