birds like wires

Search

Showing 'energy' tagged articles.

Saving Power with your ATmega

Image by 小宗宗 on Flickr

As many projects using an MCU end up running from batteries, it’s nice to have those batteries last as long as possible. There are a numerous different ways of doing this, depending upon your circuit, but there are two that I’ve been reading up on recently: reducing the clock speed of the ATmega, and sending it to sleep. These techniques might even be essential if you’re planning a solar-powered project.

On an Ardunio board, chip timing comes from a 16MHz oscillator; it probably looks like a little rounded rectangular can just north of the ATmega. This makes sure you get good execution and serial programming speeds, but if your project is simple or doesn’t require that speed, it makes sense to reduce the rate at which the chip is running. Fewer cycles per second should mean fewer milliamps required in use.

In my earlier article I wrote about running an ATmega168 at 8MHz using its internal oscillator to reduce parts. But what about dropping down to 1MHz?

Reducing Clock Speeds

Microcontrollers like the ATmega have a set of ‘fuses’ which control various operational parameters of the chip. These persistent values are usually set when you flash a bootloader and they determine the behaviour of your MCU, including whether to use the internal 8MHz oscillator and whether to divide that value by 8 for timing. Set a fuse bit appropriately and your ATmega will be running at 1MHz.

Keep reading...

Security, Energy and Home Automation

'Setting up alertme' by bjdawes on Flickr

Everybody loves a bit of home automation, don’t they? Traditionally, geeks such as myself would be toying around with X10 modules, which provide a mature platform for automating pretty much anything in your home. But if X10 isn’t your thing, there may be an alternative.

Here’s my admission. I never figured X10 out. If I’d bought a few modules and started playing I’d probably have got a lot further, but I always held back because of the price of the modules and the fact that I already use powerline communication for ethernet, and didn’t really like the idea of putting more interference into my mains supply.

Keep reading...

Mac OS X Energy Scripting

'Now You're Playing With Power.' by Dan_H on Flickr

We’ve got a variety of Macs running OS X versions 10.4, 10.5 and 10.6. They’re all managed from an Xserve with MCX preferences through Workgroup Manager, but for some reason I’ve just never managed to get them all to settle nicely with their power management settings.

While it’s lovely to have the control of these things through Workgroup Manager, I finally got miffed with it not working, particularly with the Tiger clients. It’s also not good to have rooms of machines burning away power and their components pointlessly.

‘Terminal’

So I did what I usually do. Write a script. There’s an excellent blog called Managing OS X which had already covered this issue, so using GregN’s script as inspiration I came up with this, in Perl for some reason.

Loading ‘powerman.pl’ from GitHub...

The idea is that this runs via launchd however often you would like. Using Lingon to create a .plist file, I have it triggered every hour. It uses the hostname of the machine to determine where it is, with different rules applied if the system is a ‘cluster’ or a ‘studio’ machine. Once per boot it reapplies the power management policy, and on every run it examines the state of the machine and decides whether it should be powered down.

Keep reading...