Make Arduino with Wifi run on batteries for a week?

I am integrating 6 capacitive touch sensors into the surface of a table.
Similar to this: Overview | Metal Inlay Capacitive Touch Buttons | Adafruit Learning System

These sensors are connected to an Arduino Uno which has a Wifi shield.

Whenever a touch sensor is touched, a message is posted to a central server over tcp.

The arduino + touch sensor + wifi shield will be mounted under the table and MUST run on a battery.
The battery needs to last at least a week(!)

From what I have heard, the Wifi is pretty power hungry.

So, the question is then.

  1. Is there some way I can buy a big enough battery pack (or connect multiple together) so the arduino will last for a week?
    There are no real restrictions on the size and weight of the battery pack.

  2. Is there some trick to make the arduino consume less power?
    Like turn the wifi off if there has been no activity for 15 minutes and then turn it on by pressing a button?

  3. Or maybe a combination of 1 and 2?

Thanks,
Tobias

Is there some way I can buy a big enough battery pack (or connect multiple together) so the arduino will last for a week?
There are no real restrictions on the size and weight of the battery pack.

If there really are no restrictions on size and weight of the battery pack then just put several car batteries in parallel.

Alright, you got me. :slight_smile:
That would be too big.

But is it possible to connect other smaller (rechargable) batteries in parallel in order to get more battery power?

Like a bunch of these?

Or a few of these?

Batteries in parallel are critical. I'd try to use one pack for the wifi, and another one for the remaining parts. I'd also turn on wifi only when required, i.e. when a button is pressed.

Surely the first thing to establish is the current consumption of the system.

As to possible batteries

8 x AA battery holder with 5.5mm/2.1mm Plug and On/Off Switch : ID 875 : Adafruit Industries, Unique & fun DIY electronics and kits
Lithium Ion Battery Pack - 3.7V 6600mAh : ID 353 : Adafruit Industries, Unique & fun DIY electronics and kits

As Crocodile Dundee would have said "They are not batteries. This is a battery
Venom battery

I'd consider 18650 batteries, if going the LiPo route. The chinese ones have an actual capacity of 1/3rd to 1/4th their rated capacity, but they're STILL cheaper per Ah than the LiPo's.

In any event, this is going to be tough, since neither the Uno nor the shield were designed with much thought given to power efficiency. For example, just the power light on the Uno board single-handedly wastes ~1250mAh in a week... and the Uno has that 16u2 for serial interfacing even though you won't be using that while under the table....

In any event, this is going to be tough, since neither the Uno nor the shield were designed with much thought given to power efficiency. For example, just the power light on the Uno board single-handedly wastes ~1250mAh in a week... and the Uno has that 16u2 for serial interfacing even though you won't be using that while under the table....

Some of the best engineers the world has ever seen donate their time on the forum to help starters learn. Why hasn't this been addressed yet?

Why hasn't this been addressed yet?

Because the Uno is a general purpose Arduino designed to be used easily, connected to the PC via USB and to have LEDs to indicate its status. If you don't like it use another Arduino such as a Pro Mini that requires an FTDI cable in order to program it but don't expect it to be easy for beginners.

In this thread we have an example of a problem that, had the requirement been thought out, wouldy easier to meet with a different Arduino (or barebones solution) and a different wireless solution. As it is the OP has a Uno and a WiFi shield so has a problem.

This seems to be a case of being asked how to get somewhere and answering "I wouldn't start from here" which is probably not what the questioner wants to hear.

Thomas499:
Some of the best engineers the world has ever seen donate their time on the forum to help starters learn. Why hasn't this been addressed yet?

The Uno does exactly what it's supposed to - it's versatile and easy to use starting point for people learning to use Arduino. The Arduino designers did a number of boneheaded things in the course of designing the Arduino boards, but this is one thing I can't fault them on - they could not have optimized the board for power consumption without compromising ease of use and versatility.

Making it power efficient means ripping out everything that isn't absolutely essential - so no on-board USB <->serial converter chip, no power LED, different power supply circuitry, and possibly running it at 8mhz internal resonator instead of external crystal, etc - and all those things are things that are really useful and important for easy of use and/or for common, non-battery operated use cases.

And that's why the "bare-bones" arduino is something that lots of us make.

The Pro Mini is better than uno, but it still has a power led and some of them have regulators that burn power even when powered from Vcc.
I'm not familiar with the WiFi shield - most WiFi devices have a way to enter power save mode, though.
You'll also need to use aggressive power management in your sketch to keep the power use on the chip itself down. Running a week off battery with wifi off a sane sized battery requires considerable attention to power use; without any power management, I'd expect that to pull like a third of an amp, so you'd need 40 amp hours (car battery, or like 20-24 of the red "6000mAh" (actually ~2000) Yu Long 18650's from ebay)

In this thread we have an example of a problem that, had the requirement been thought out, wouldy easier to meet with a different Arduino (or barebones solution) and a different wireless solution. As it is the OP has a Uno and a WiFi shield so has a problem.

O.P. You are looking for a solution, you are going to spend a lot of hours figuring out how to wire up

then just put several car batteries in parallel.

not to mention car batteries cost around $100 a pop, would you prefer to spend that kind of time, and money, or would you be open to purchasing a $12 pro mini arduino board?

This seems to be a case of being asked how to get somewhere and answering "I wouldn't start from here" which is probably not what the questioner wants to hear.

I prefer to be given options that I am not aware of as an alternative.

And that's why the "bare-bones" arduino is something that lots of us make.

Would any of these people like to make a little money? I need a custom board made

I wasn't referring to the Uno in particular as there are other options available already that addresses this, though I can not seem to find a bar bones Mega for sale.
Lots of people are interested in using Wi-Fi. Lets go ahead and make a solution that addresses Wi-Fi and power consumption, it shouldn't be that hard. How much does it cost to get a custom board made, and where can you get it made?

DrAzzy:
...and possibly running it at 8mhz internal resonator instead of external crystal, etc

I don't think internal vs. external is significant. It's the clock rate that matters. Also the voltage. There's a big drop in current between 5V and 3.3V, something like 50%. An 8MHz/3.3V "Uno" with a switching supply, external USB and no power LED would cut the base current consumption by 80-90%.

UKHeliBob:
Surely the first thing to establish is the current consumption of the system.

As to possible batteries
As Crocodile Dundee would have said "They are not batteries. This is a battery
Venom battery

before talking batteries, the basic steps should be done to get the system to operate.

how far you need to transmit and through what will determine power needed.

for the sensor part, the whole thing could sleep until a sensor is pressed.

back to the wifi. what do you need too send once a button is pressed ?

can you have just 'table 6 button-2'
and then send that blip 62
but the receiver takes 62 and turns it into what you need too send ?

my motion sensors on my alarm send signals day in and day out for months on one battery.
and the unit is half the size of a pack of smokes.

each unit has a serial number, all you need to do is send out a signal showing your serial number for the table and then what pins or combination of pins are pressed.

also, you might want to offer a delay of 10-20 seconds so that people do not just 'play the piano'

I was away from the internet this weekend, but thanks for all the answers!

To give more context into what the project will be about:

  • There will be four tables in a room.
  • Each table has 6 integrated touch points.
  • There is a central server connected to the same LAN as the tables.
  • The end users of the tables are school children ages 7 to 16.
  • They are there between 8 in the morning to 5 in the afternoon.
  • The staff who will support the system will probably only have enough time to change the batteries once a week.
  • The first "application" is for the children to "activate" the table by pressing all touch points and something happens somewhere else.

With that in mind, I have segmented the project into different parts.

  1. The tables only transmit events when a touch point has been touched.
    The "arduino package" mounted to the table can be detached and replaced without any soldering needed.

  2. The server handles all logic based on the events the tables send it. The server is a Raspberry PI located in the same room as the tables.
    I have architected the code so it doesn't rely on HOW the tables communicate with it.
    I have the assumption that each touch point can somehow be uniquely identified.
    Currently I use TCP as the means of communicating these evens, mostly because that is what I am familiar with.

So, since the connected tables and arduinos are where I have the least experience, I wanted to make them "dumb transmitters" and put all the logic on the server.

From a power saving standpoint, I think this is a realistic scenario of what can be done:

  • Sleep between 5PM and 7:30AM
  • If no activity has been noticed (no touch sensor has been pressed), sleep until one is pressed.
    --> queue up which sensors that have been touched and send them all when connected to the network.

I am totally open to making changes to what components I can use, since I have yet to purchase them.
The Uno and the wifi shield were the starting point, since they seem simple enough.

I am also open into changing what type of transmission I use for the events.

What components do you use for the motion detection there, dave-in-nj?

I am also open into changing what type of transmission I use for the events.

Have you considered using RF24 radios to transmit the data ? I have no data but as the devices are much simpler than WiFi it may reduce the current consumption considerably and they may be more amenable to being turned off and back on again only when required.

I would not use WiFi, rather pushbutton RF key fobs as the basis for the table switches, about $7 each here (cheaper on ebay). The batteries would last months or possibly even years.

One approach would be to use a separate receiver for each keyfob. There are address lines on the circuit board that make each transmitter and receiver have a unique ID.

Or you could use one simple receiver and an Arduino with software to decode the ID and the switch number for all units.

These modules are based on the PT2262 encoder/decoder chips.

I think you will find this a good read: Overview | Low Power WiFi Datalogger | Adafruit Learning System.

Even when using this specific setup without any power modifications, they only use 140 ma.
For 10 hours of usage per day (07:30 - 17:30) that would add up to 1400ma per day.
Given a school week is 5 days? a week, that would be 7000ma per week of usage.

Practically I would combine that with a pololu power switch.
The staff can turn the tables on at the start of the day and the arduino can shut itself down after 10 hours of usage, saving you the issue of timed power up and discussion with the staff, why they haven't switched off the tables.
According to their specs they use 0.01uA while off. given you have 14 off hours per school day, that sums up to 0.01uA145 = 0.6uA, so not something you need to take into account :wink:
See Pololu Pushbutton Power Switch SV (old version) for more info.

So even without any power saving in place, you could under normal circumstance suffice with a 10aH battery pack per table, which seems feasible and with some power tweaking even less.
Of course, this is all theoretical, the proof is in the pudding :wink:

Let me ask you something,

How fast does the signal have to get to the raspberry pi from the time the button is pushed? Would a 30 second to 90 second delay be unacceptable? If this button is to tell the teacher a child has a question, the 90 second delay would not be ideal. If it is for a survey project, or a bathroom announcement, then it would probably be ok.

Most modern highschools now have the desk with the electrical sockets built in either underneath the table, or my personal favorite ones utilize a push button black square up top so that when pushed down it pops up two electrical sockets. Very useful for laptops while doing group projects. - I know you mentioned you want it to run off batteries, but honestly batteries are expensive to replace every week, and the principles are the ones that sign off on that kind of stuff. If you tell them you want them to replace 20 9volt batteries every week, for a system that makes raising hands obsolete, they might approve of it for a small study, but certainly aren't going to make it a school wide system.

What are you powering the raspberry pi with by the way? It's my understanding the pi uses much more power than arudino.

UKHeliBob:
Have you considered using RF24 radios to transmit the data ?

I have looked at them briefly. If you are talking about these:

Can they pass on some form of data to the receiver?

In that case I could add one transmitter to each table which sends the unique codes to a central receiver.
This receiving board can be plugged into the wall socket and take care of the TCP communication with the server.

@jremington: Great to hear that there are ways of uniquely identifying the rf transmitters.
Unfortunately I can't use the key fobs, since I have requirements on robustness, since we are talking about a flock of kids allowed in a room with the sole purpose of experimenting. :slight_smile:

@gateway: Thanks for the calculations! It is always nice to know that it works in theory. :slight_smile:

The tables are made specifically for this project as part of the interior of a specific room.
The teachers are supposed to be able to move them around and combine them to suite heir needs on how to divide the kids into groups.

Thomas499:
What are you powering the raspberry pi with by the way? It's my understanding the pi uses much more power than arudino.

The PI will be placed in a central "control box" where the state of the tables are controlled (the software part of the project).
This box has a socket available to anything that is inside it.