Tag Archives: link of the day

Arduino Mini, using Micro Amounts of Current…

Last night, the weather was pretty rainy. I woke up a couple of times during the night (once, when my little cat friend Bailey decided to check my breathing and started head butting me around 4 AM) and heard a lot of rain falling on the roof. When I woke up, it was fairly wet outside. I made myself a cup of tea and settled into check messages and email…

And the power went out.

Sigh. I could have used my phone and the cell service, but instead, I just spent a few minutes thinking.

Like about my battery backed up temperature/pressure sensor I had running in the garage, which is battery backed up. And since it sends its data to the MQTT server at io.adafruit.com, it should wo…

Oh, except of course my network is down.

It got me thinking that perhaps logging data to a local SD card isn’t actually the worst idea. Maybe once a day or so, it could wake up and send all the backlogged data to the server, but continue to log data locally.

And while I could use a microcontroller like the ESP8266, those things take a lot of current. Maybe it was time to look into something else that could be efficiently powered down and then only power up the remote peripherals (like a radio) when needed. And instead of using any kind of fancy charging circuit, maybe I could make something that is just powered from either Alkaline batteries with a run time of maybe a year.

As it happens, last night I found a couple of Arduino Minis and a USB/serial connector, so it seemed to me that using one of those would be pretty reasonable. But I was pondering a couple of issues: just what is the standby current of an Arduino Mini when in deep sleep mode? How much current does the ubiquitous power LED consume?

So, during a break I dug around and found information about power consumption by the Arduino Mini.

The breakdown seems to be that if I use a 3.3V 8Mhz Arduino Mini which is unmodified, I could expect about a 4.74mA current running flat out, and about 0.9mA while sleeping. Most of the sleep current is actually the Power LED, which draws about 0.84mA. It isn’t had to get rid of that (just cut a trace and/or destroy the LED with some snips) and then you are down to just 0.054mA during sleep. Very nice.

You can further reduce the sleep current by getting rid of the voltage regular, which may or may not be feasible depending on the use case. I was curious about what voltage I could use as input if I got rid of the regulator, and it appears that the ATmega328P is good from about 2.7V to 5.5V, which is a very broad range. You can simply feed that into the VCC. Sleep current is down to around 4.5?A in power down mode. Really, really good.

But it might be worthwhile use a better regulator. The Microchip MCP1700 has a quiescent current down in the 1.6uA range, which might be worth looking into. There is a lot of information about the efficiency of these regulators on the page linked above. I’ll have to look into it some more.

I should note that some of my thinking about this today was probably nudged by the following video @JeremySCook


I thought there were a couple of cute ideas in here. He used the Arduino Nano instead of the Micro but the form factors are pretty similar. I liked his way of soldering down DIP switches to provide some inputs, and using some shrink wrap to make a nice tight little package. He also pointed out these cute little battery holders with built in power switches that I hadn’t seen before. But I was a bit concerned about the use of the Nano. The USB interface chip draws about 15mA, and the Nano is nominally a 5V chip, so I thought that supplying just 6v to such a system would result in very short life, as the CR2032 batteries are pretty low capacity already, and 6v is not really enough headroom above what the voltage regular needs to provide 6v. Still, definitely some good ideas.

I also think it’s probably a good idea to read some of the “low power” tagged items on JeeLabs, as well as some information like this on the Arduino forums.

Anyway, more to think about.

3D Printed Gadgets for Woodworking…

I’ve been slowly working toward getting a reasonably equipped garage for woodworking, and have been watching a metric ton of Youtube content made by woodworkers. Today, I ran across this nice list of things that you can 3D print to help out with various tasks, the most immediately useful being some knobs I can print for 1/4×20″ bolts. Shared with all of you, and archived for myself.

https://www.instructables.com/id/3D-Printed-Gadgets-for-Woodworking/

Brent’s Sharpening Pages…

My experimenting with plane sharpening has (like so many other things) caused me to research stuff on the Internet. I’ve been working on grinding the back on my older plane using sandpaper cemented down to a flat piece of glass. It’s still not quite there after about a solid 30 minutes of work, and it’s pretty clear to me that the grit is breaking down and not cutting as fast as when it was new. So, toward that end I started to consider the possibility of investing in some sort of grinding stone. But, I don’t know anything about them, so I started reading. That’s when I ran across this page, with tons of information and designs for jigs that can be used to help make sharpening quick and repeatable. I haven’t absorbed it (or even read it all), but I’m stashing this link for future reading.

Brent’s Sharpening Pages

Temperature sensing on an Arduino w/o additional hardware…

Last night I began dusting off my solar project a bit. It still seems like we are at the bottom of the atmospheric river, so I don’t think it will be going outside any time in the near future, but I wanted to make some software changes.

It uses a pair of temperature sensors and records it to an MQTT server. It revealed that my garage seldom gets below 55 degrees or so (not too surprising, since the weather here seldom gets that cold, but we did have a couple of snaps down around freezing). Over the last 24 hours it’s recorded the following:

From my garage…

This data comes from a Microchip MCP9808 board, and the temperature reported by an MPL3115A2 barometric pressure sensor. I haven’t bothered doing a calibration to see which one is more accurate, but you can see that they seem to report the same values up to an offset. Both are more accurate than I really need.

Several years ago I didn’t have such sensors in my junk box, and tried just measuring the forward voltage drop across a very cheap 1N4148 diode. That “worked” after a fashion. It wasn’t especially sensitive, since each bit of the value returned by analogRead() turned out to be about 2 degrees C. The post generated some comments however, and pointed out that I could use either the internal 1.1V reference or the actual internal temperature sensor to get more accurate values. It was fun, but soon after I got real temperature sensors which promised still better accuracy, and I didn’t revisit the issue.

But today I found an interesting and different approach on the Cave Perl Project Blog. The ATmega328p used on the Arduino uses an internal RC oscillator to run the watch dog timer. It runs at around 110Khz, but isn’t especially accurate. It is… you guessed it… highly temperature dependent.  So, you can time the amount of time it takes the WDT to overflow, and with some math determine what the temperature might be. And it turns out that the results are likely sufficiently more accurate, perhaps down to around 0.1 degrees C, which is better than a lot of inexpensive sensors. There are some details which are interesting to read and think about, but I might have to try experimenting with this.

In any case, the website is actually pretty cool for other projects as well. It was founded to develop “a submersible data logger system for long term environmental monitoring projects” and has lots of other good data and ideas. I’ll probably be killing a few hours reading it tonight. I think you all could do worse than do the same. 🙂

Have a good one.

Recommended Reading: AA7EE’s Boris Beacon…

I’ve been interested in low power beacon transmitters for a long time.  If you’ve followed my blog, you’ve probably read about my experiments with WSPR and QRSS operation.  Most of those took place on 30m using my FT817 transmitter, sometimes with software that I wrote myself.  But I’ve long thought that I should homebrew a transmitter, and the idea of making it solar powered has always been in the back of my mind.

These operations have all been on ham frequencies, but even if you are unlicensed in the United States, you can get experiment with low power beacon operation under what is known as “Part 15“.   These rules are part of the Code of Federal Regulations, Title 47, and specify certain bands and limitations as suitable for unlicensed devices.   Rather than reading the boring regulations, you can go to Long Wave Club of America website and read up on experimentation under Part 15.  You’ll generally find operation divided into “LowFER” (operation below 200khz, usually in the 2200m and 1750m bands), “MedFER” (operation in the AM broadcast band, usually between 1600khz and 1800khz) and “HiFER” (mostly centered around 13.55Mhz).  

I was initially most interested in the LowFER bands, but I’ve never really gotten off the ground with the project, but recently have become more interested in operation in the HiFER bands.  It presents some significant limitations.  The most desirable band is limited between 13.553 and 13.567 Mhz.  The total power output is specified in terms of a field strength at 30m distance from the antenna, but is on the order of one milliwatt into a half wave dipole at the frequency.   You also are supposed to maintain frequency stablity to about +/- 0.01% over a temperature range of -20 to 50 degrees C. 

This isn’t a lot of power, so it can be challenging to get an effective signal out, but it also makes for some interesting opportunities for home brew construction.  Most beacons of this sort are small crystal controlled transmitters, and they can be powered by reasonably small solar cells, and controlled by inexpensive, low power, eight bit microcontrollers that are readily available. 

Dave Richards (AA7EE) wrote up an awesome description of his Boris Hifer beacon, named after his cat.  It’s a very straightforward design: a Collpitt’s crystal oscillator, a small two stage low pass filter, and an ATtiny85 microcontroller driven by a LP2950 5V regulator that is powered directly from his solar panel.  (He also points at this $20 kit from Chris Smolinksi at blackcatsystems that would be dead simple to put together).   As it happens, I have almost all the parts in my junk drawer, and could easily put such a beacon together.  I even have a stash of the 13.56 crystals somewhere.

Dave’s construction is gorgeous, and he mounted it fairly low at the top of a fence.  I have a similar fence at the back of my property.   I would be tempted to use a more sophisticated solar setup perhaps utilizing a small battery.  Propagation on this frequency is probably better during the daylight hours, but the solar panel likely generates an excess of power each day, and being able to survive small dips in cloud cover and the like would be good.  But then his experience is that even on cloudy days his beacon wakes up, so perhaps I’m overthinking it.  He also has a good description of using the BOD (brown out detection) in the ATtiny85 to ensure proper startup in varying voltage conditions.  His write-up is really great, and will no doubt save me from a lot of hair pulling.  

Well worth reading.  You might also read his page about making a temperature beacon which was inspired by K7TMG and also this short experiment I did back in 2012 (apologies for the jittery phone video):