I need someone to explain this to me.

Emulating ARM on an 8-pin AVR

Falling on the heels of some fabulous ‘lets see what we can emulate on an AVR’ builds we’ve seen, [Dimitri] emulated an ARM Cortex-M0 on an 8-pin ATtiny85.

The emulator is written entirely in AVR assembly. Unfortunately, the instruction set of ATtinys don’t have a multiply instruction, so that had to emulated in a separate piece of code. Even with this addition, the emulator is very small; the core is just over 1300 instructions and small enough to fit on the Flash of the very small ‘tiny85.

Unlike the ATMega running Linux we saw last month, [Dimitri] won’t be doing anything crazy like making the tiniest and worst Linux computer ever. The Cortex-M0 doesn’t have a MMU, so Linux is out of the question. [Dimitri] could go with μCLinux, with the addition of a I2C EEPROM and RAM, but don’t expect a speed demon for an emulated ARM running at 200kHz.

[Dimitri] put all the code up on his webpage, and the installation is just running ‘make.’  It looks easy enough to get up and running very quickly, so we’re sure some bored hardware guru will come up with something interesting to do with this code.

Poking machine

We may be showing our age here, but we have no idea what a ‘poke’ on Facebook actually means. Whether it’s the passive-aggressive manifestations of online stalkers or an extension of  the ‘like’ button, all we know is [Jasper] and [Bartholomäus] built a machine that translates virtual pokes into our analog world.

The “Poking Machine” as [Jasper] and [Bart] call it, syncs to your phone over a Bluetooth connection. The build is incredibly simple: just an ATtiny running Arduino for ATtiny, a Bluetooth controller (possibly this one from Sparkfun), and a servo. When the Facebook app on [Jasper] and [Bart]‘s phone receives notification of a ‘poke’, the servo is powered and gently taps the wearer on the arm.

One thing we really like about this project is the case made of several layers of laser-cut acrylic bolted together. This case offers a very clean look even if it is a bit ungainly. We suppose the guys could have used a simple vibration/pager motor for this build, but it wouldn’t exactly be a poking machine at that point. Check out the build video after the break.

[Read more...]

Monitoring home electricity usage via a tidy wall display

power-meter-display

[Janne Mäntyharju] wanted to get an idea as to how much electricity he consumed in his new home, mainly to see if using his fireplace for additional heat had any effect on his bill. Luckily his power meter was mounted in the utility room of his house, making it easy to keep tabs on his usage.

His meter features a small LED that blinks a fixed number of times per consumed Kilowatt hour, so he mounted a photoresistor and ATtiny2313 above it to detect the light pulses. [Janne’s] server polls the microcontroller every 5 minutes over an XBee connection, recording the power usage in an SQL database for further analysis. From this database, he generates graphs showing both the temperature in his home as well as the average electricity usage for the specified time period.

[Janne] also wanted to make the data easily accessible, so he constructed a wall-mounted display using a Beagleboard and digital picture frame. The display not only shows his electricity usage, but it toggles between the weather, calendar events, IRC logs, and pictures from his security camera.

We’ve certainly seen this sort of electric meter monitoring before, but it serves as a quick reminder that given the right tools, watching your power usage (among other things) can be as easy as taking a quick glance over at the wall.

Learning to use the V-USB (AVR USB firmware) library

The V-USB library is a pretty handy piece of code that lets you add USB connectivity to ATtiny microcontrollers (it was previously named tinyUSB). But if you’ve ever looked into adding the library to your own projects you may have been stymied by the complexity of the code. There are many examples, but there’s a lack of a concise quick-start for the uninitiated. [Joonas Pihlajamaa] has been working to correct that shortfall with his four-part V-USB tutorial series. It’s not for the absolute newbie; you should already be comfortable working with AVR chips but that’s the only real prerequisite we can see.

He starts the series with a look into the hardware considerations. USB provides a 5V power rail but the data lines expect 3.3V logic so this must be accounted for. With the test rig built on a breadboard he moves on to pick apart the code, covering various user-defined variables that you’ll need to set based on your project’s needs. We’re going to keep this on the back burner and hopefully the Troll Sniffing Rat will get a makeover (although we must say comments have been a lot nicer as of late… keep it up!).

We’ve embedded links to all four tutorial parts after the break.

[Read more...]

WiFi experiments with ATtiny microcontrollers

[Quinn Dunki] got some free stuff from Element14 to evaluate, including this Mircrochip WiFi module. It’s been used as the centerpiece of an Arduino shield in the past, and she grabbed a copy of that library to see if it would play nicely with an ATtiny chip. What follows is a struggle to de-Arduino the code so that it’s portable for all AVR controllers.

This module is one of the least expensive ways to add WiFi to a project, coming in at around $23. But it’s not really an all-in-one solution as there’s still a huge software hurdle to cross. The hardware provides access to to radio functions needed to communicate with the network, but you need to supply the TCP/IP stack and everything that supports it. Hence the re-use of the Arduino library.

Battling adversity [Quinn] fought the good fight with this one. Switching from an ATtiny to the ATmega168, compiling more code, and troubleshooting the process. She used a single LED as feedback, and can get some connectivity with her hotspot. But to this point she hasn’t gotten everything up and running.

We’re hot for an AVR WiFi solution that is cheap and easy to use. But as we see here, the software is complex and perhaps best left up to beefier hardware like the ARM controllers. What do you think?

Automatic flashlight tag damage sensor

You’re out at night and playing a boisterous game of flashlight tag. But how can you tell if you’ve been mortally wounded by your opponents light beam? [Kenyer] solved this problem by building a flashlight tag damage sensor which is worn by each participant. It adds a bit of the high-tech equipment used with laser tag while keeping a low-tech price tag.

The sensor relies on a light dependent resistor to register hits when a flashlight beam passes through the round window. It will only register one hit in a three-second time period. At the end of the game, the total number of hits recorded can be flashed back using an on-board LED to see who is the victor. You can see a demo of this functionality in the clip after the break.

[Kenyer] started with a breadboard prototype using an Arduino as the driver. Obviously the cost of an Arduino for every player is a bit ridiculous. He scaled down the project, running the Arduino code on an ATtiny microcontroller. [Read more...]

Musical [Blinky] candy tin

Since it’s the holidays and pine trees are being cut down and installed in living rooms all around the world, [Jarv] though it would be a good idea to make a musical Christmas ornament. He needed to keep some of his geek cred, so [Jarv] decided to build a musical [Blinky] ghost from Pacman.

A few weeks ago, [Jarv] sent in his musical greeting card that uses a minimal amount of parts to play a short 8-bit tune. His project was based around an ATtiny85 and sounded pretty good. For his [Blinky] ornament, [Jarv] used a similar circuit along with some old-school Pacman songs that sound great.

[Jarv] found a [Blinky] candy tin and after dispensing with all that pressed sugar began work on his build. In keeping with his greeting card, everything is very minimal. Just a speaker, ATtiny85, and button make up the build. Pressing the button cycles through three songs from Ms. Pacman. The result sounds uncannily like a vintage arcade game, so be sure to check out the video after the break.

[Read more...]