Weather Sensor and Power Consumption

Remember the film “Apollo 13,” where NASA is hastily trying to discern which electronic components can be sacrificed in order to route power to the essential parts of the lunar module? Well, this project has felt a bit like that from the beginning. Once the decision had been made to try to operate a small microprocessor and audio amplifier using solar-charged batteries, we knew that we needed to conserve power as much as possible. One never knows how much sun will be available to charge a battery, and therefore, one plans on having a certain amount of backup power in reserve.

So, the first step towards determining power needs is to measure the amount of power drawn by the various components in a circuit. We know that the PLMCA10’s use, at most, .3 amps at 12V=4 watts. The measurement was needed to determine the power needs of the Raspberry Pi when it was both playing back audio as well as reading data from a weather sensor.

To take a step back, we’ve had ongoing discussions about how best to gather weather data and map in onto sounds. One way is to have a single device gather data and send it to the other devices (recall that our plan is to build 10-12 audio stations, each with its own set of speakers, microprocessor, battery and solar panel). In a way, this seems the most efficient–one device does a bit more work (perhaps using a manufactured USB weather station) and then, via wifi or bluetooth, send that data to the other devices. But then we need to add wireless capabilities to our Raspberry Pi’s, which means buying another expensive part, and then devising a wireless system, perhaps using a router, to broadcast the signal. Lots of places in the chain for things to go wrong. The other option is to give each device its own weather station.

We bought this particular temperature/humidy sensor from a company called Adafruit:

AM2302 (wired DHT22)  temperature-humidity sensor
At $15, it is far less expensive than similar USB devices, the cheapest of which I could find is about $100. It has 4 wires–power, ground, data, and something else which I haven’t been able to identify. Using this extremely user-friendly wiring guide (I’m joking here),
am2302wiring.gif
you can surmise that three wires are connected to three places on the Pi. Here’s another picture I found helpful:


In the previous post, I mentioned that the R-Pi has pins, called GPIO’s (general purpose in/outs). I don’t know if it’s proper to compare these to ports, but that’s how I think of them. So, I know that the weather sensor needs to connect to 3.3 volts power, to ground, and to a data pin. You can see the power and ground pins above, and then several GPIO’s. Using a bit of code copied from the Adafruit website, Steve Smith and I were able to get the sensor to send readings to the R-Pi and display them in a table. This sensor measures both temperature and humidity.

It was also quite easy to get the R-Pi to play back audio, using a Linux version of the VLC audio application for Linux.

The next day, Bruce Larson was able to measure the amperage drawn by the R-Pi as it simultaneously read data from the sensor and continuously played back audio. As with the audio amplifiers, the R-Pi peaks around .5 amps (at 5 volts=2.5 watts).

We now have the information we need to start building the power supply–we need a system that will power an amp that draws 4 watts (at 12V) and a computer/sensor that draws 2.5 watts (at 5V). Now is when I lean even more heavily on my consultants to find the right battery, power regulator and eventually, solar panel.

Leave a Reply

Your email address will not be published. Required fields are marked *