The Effect Of Code On Power Consumption

Of course putting a microcontroller into sleep mode or changing the clock rate has an effect on the power consumption of the chip, but what about different bits of code? Is multiplying two numbers more efficient than adding them, and does ORing two values consume more power than NOPping? [jcw] wanted to compare the power draw of a microcontroller running different loops, so he threw some code on a JeeNode and hooked it up to an oscilloscope.

For his test, [jcw] tested two instructions: multiply and shift left. These loops run 50,000 and 5,000 times, respectively (bit shifting is really slow on ATMegas, apparently) and looked at the oscilloscope as the JeeNode was doing its work.

Surprisingly, there is a difference in power consumption between the multiply and shift loops. The shift loop draws 8.4 mA, while the multiply loop draws 8.8 mA. Not much, but clearly visible and measurable. While you’re probably not going to optimize the power draw of a project by only using low-power instructions, it’s still very interesting to watch a microcontroller do its thing.

Hands On With Raspbmc

Have you heard of the Raspberry Pi? Surprisingly enough, they’re starting to trickle into the hands of thousands of hackers, and we were fortunate to get our hands on one (second-hand since we didn’t jump in time for the initial preorder). We’ve longed for a tiny embedded option for running XBMC and this is one of the best opportunities we’ve seen yet. The Raspbmc project, created by [Sam Nazarko],  is tailored to getting XBMC on the Raspberry Pi just a few minutes after it arrives in the mail. And that’s exactly what we did.

If you’re familiar with writing an image to an SD card (or any device for that matter) this is a simple process. Raspbmc is distributed as a single image file which starts up the RPi hardware, then copies itself to RAM while it downloads and installs the filesystem for the distribution. Once the card is flashed just pop it in, power up, and wait about 20 minutes until XBMC shows up on the screen. After that it’s a quick boot each time.

The good news is that its works. XBMC runs pretty fast, with just a hint of lag when loading some menus. We felt at home using the confluence skin we’re familiar with, and had no trouble setting up our samba shares to the video library. The one problem is that it won’t play any of the video files we have on hand. None of them. So we downloaded the Big Buck Bunny trailer. It wouldn’t play that either. This is all a codec issue. Although the chip used on the RPi is capable of hardware decoding MPEG2 video, the foundation didn’t license that ability. So it can’t play that format, period. With the movie trailer we tried the OGG format and that’s not currently supported, but the MOV version did play, in full 1080p without trouble.

So the verdict is, if you’re looking to get an RPi just to run XBMC you should wait. So far the package is promising. But we record ATSC video, all of which is MPEG2. If you use MakeMKV to store your DVDs on a server, that also uses MPEG2. Of course there is the option of transcoding everything. But you’ll want to be careful if you have other XBMC frontends which may not be able to play alternative encodings.

Counting Bees

This is the bee counter which [Hydronics] designed. It’s made to attach to the opening for a hive, and will count the number of bees entering and exiting. We’re not experienced bee keepers ourselves (in fact we’re more of the mind of getting rid of stinging beasties) but we understand their important role in agriculture and ecosystem so we’re glad someone’s making a nice home for them.

Most of the apparatus is a circuit board lined with reflective sensors. There is a double-row of pin sockets on the top of the board which accepts the Teensy+ which monitors those sensors. The bees must pass below this PCB every time they enter or leave the hive, thereby tripping a sensor. In the video after the break [Hydronics] shows off the system with a netbook used to monitor the output. But it sounds like he has plans for an integrated display system in future versions of the bee counter.

Continue reading “Counting Bees”

[Ladyada’s] Thoughts On Quick-turn And Small-run PCB Houses

So you’ve mastered your PCB layout software, and it’s time to make the board. But if you don’t want to etch your own you’ve got to decided where to have it fabricated. There’s a slew of services out there, most of which you cannot afford, but the short list of those you can is still pretty long. We think this set of PCB fabrication house reviews will help you make your choice.

[Ladyada] — aka [Limor Fried] — knows what she’s talking about. She owns Adafruit Industries and has done the lion’s share of designing the many kits and items they sell. If you’re going to charge money for something it better work right, and that involves lots of prototypes. But even if you don’t need a quick turn-around or numerous testing boards the post is helpful as she also covers some of the batch producers we’re already familiar with. These include DorkBot PDX and BatchPCB to name a couple.

[via Reddit]

Keep An Eye On Your Palatial Estate With This Solar Powered WiFi Cam

If you’re expecting the serfs to hop the fence with pitch forks and torches you may want to employ a surveillance system. WiFi cameras are a cheap way of doing this, but you’ll need power. [CheapGuitar] decided not to run extension cords, and instead added solar power to his wireless camera. The solar panels are easy to spot in this image, but you’ll have to look close to see the camera.

He already had everything on hand, and this included a cheap WiFi camera which runs on 5V. To weatherproof it he used a plastic sandwich meat container. This is actually one of our favorite project enclosures, we used it for our door-bell button garage door lock. [CheapGuitar] painted it black to help keep it hidden after cutting a hole in the lid for the camera lens. Under the solar panels you’ll find a 12V car battery which uses a USB car charger to regulate voltage for the camera. Each of the panels is a 5W trickle charger and they’re designed to top off deep cycle batteries. The entire thing is cleverly hidden behind his existing landscaping.

[via Reddit]

Traffic Signal Controller Pulls Data Over WiFi

[Travis Brown] just published a post about the traffic light controller he built. His number one goal was to make the device wireless (except for AC power) and he achieved this by using a WiFi shield for his Arduino. But there is also a separate board that provides a way for the chip to switch the AC lights.

He works for a web hosting company, and the boss wanted a fun way to display the status of the servers among other things. He chose to use the WiServer library which controls the CoperHead WiFi Shield and gives him the ability to serve simple web pages from the Arduino. When power is applied the sketch automatically connects to the AP and starts polling the company’s API for status data. If you’re not within eyesight of the traffic lights you can log into the web server and check that way.

We think [Travis] did a great job of explaining his code, and we applaud him for making proper use of the watchdog timer (something we don’t see in very many projects). This joins the pile of traffic-light display devices we’ve seen around here. We still don’t know where people are getting their hands on the things.

Continue reading “Traffic Signal Controller Pulls Data Over WiFi”

Mantis9 PCB Mill

This is the Mantis9 PCB mill. It’s the first time we’ve featured the project, but it’s already well known by some as it keeps popping up in the comments for other CNC mill projects. Yes, it’s made out of wood — which some frown upon — but we’re happy with the build instructions and the especially the price tag (parts as low as $85).

We did feature an earlier revision of the hardware back in 2010. Subsequent versions changed the frame to use an open-front design, but it’s the build techniques that saw the biggest evolution. The problem was getting the holes for the parallel rods to align accurately. In the end it’s a simple operation that solves the problem; clamp both boards together and drill the holes at the same time. A drill press is used for all of the fabrication, ensuring that the holes are perpendicular to the surface of the boards. From there the rods are given some bronze bushings and pressed into place. Only then are the platforms secured to the bushings using epoxy. This is to ensure that the bushings don’t bind from poor alignment. We think it should end up having less play in it than other builds that use drawer slides.

Check out a PCB milling run in the clip after the break.

Continue reading “Mantis9 PCB Mill”