Microcontroller Statistics With A Small SRAM Footprint

statistics-library-for-microcontrollers

You may know your way around the registers of that favorite microcontroller, but at some point you’ll also need to wield some ninja-level math skills to manage arrays of data on a small device. [Scott Daniels] has some help for you in this arena. He explains how to manage statistical calculations on your collected data without eating up all the RAM. The library which he made available is targeted for the Arduino. But the concepts, which he explains quite well, should be easy to port to your preferred hardware.

The situation he outlines in the beginning his post is data collected from a sensor, but acted upon by the collection device (as opposed to a data logger where you dump the saved numbers and use a computer for the heavy lifting). This can take the form of a touch sensor, which are known for having a lot of noise when looking at individual readings. But since [Scott] is using the Mean and Standard Deviation to keep running totals of collected data over time it is also very useful for applications like building your own home heating thermostat.

Deathly Hallows Mark The Passing Of Time

deathly-hallows-clock

Whether you’re a Harry Potter fan or not we think you’ll enjoy this Deathly Hallows clock. The body is modeled after the triangle, circle, and line that make up the symbol that played a prominent role when concluding the fantasy novel series. A bit of motion and a couple handfuls of LEDs are what allow it to display the time of day.

[Yeenasty] started by building the triangular surround out of wood. In the center he added a circular veneer which was partitioned into twelve chambers. These indicate the hour and are illuminated one at a time from midnight until noon. Once all of the LEDs are switched on (as seen above) they are then extinguish one at a time from noon until midnight. [Yeenasty] mentions that this means the clock isn’t overly bright during the night-time hours.

Minutes are displayed by the wooden slat in the middle of the ring of LEDs. Here it’s showing 30 minutes after the hour because it is vertical and the bottom red LED is lit. The hand is mounted on a 180 degree servo so when it has made half of a rotation the hand backtracks 29 minutes and the LED at the other end is illuminated to continue progress around the face of the clock.

[via Reddit]

Kitchen Scale Key Transplant

kitchen-scale-key-transplant

[Markus] is quite happy with his kitchen scale. It’s one of the tools he uses most frequently when cooking. But recently the button has begun to give him problems. He figures the years of spilling a little bit of this and that has mucked up the contacts. His solution was to bypass the button using a Cherry MX switch.

Really any replacement should do since the switch merely completes an electrical connection. But there’s a subset of hackers who swear by the Cherry MX switches that come in some keyboards. [Markus] had just such a keyboard on hand, which he was already using for parts, so he pulled out the switch and cut a hole in the scale’s case where he could mount it. After temporarily super gluing the switch in place he completed the task by filling the gap on the outside with hot glue, then running another bead of it along the inside. The addition of the ‘T’ key finishes the hack. The plastic key is easy to clean and will help shed flour, oil, or anything else he might spill during his culinary adventures.

This hack was fast and easy and may have convinced [Markus] to roll his own controller board for the device. We’ll keep a lookout for a follow-up post detailing those alterations.

USB To Serial Adapter Tells You What COM Port You’re On

xser

Since most of us are long past the days of hardware serial ports, the USB to serial adapter has become a mainstay on the hacker’s tool belt. While they’re cheap and convenient, USB to serial adapters aren’t always the easiest thing to use: there’s always the issue of what COM port Windows is calling your USB to serial adapter, or what TTY device it is in Linux/OS X.

[Avishay] has a very, very cool solution to this problem: put a display on a USB to serial converter to tell the user what COM port the OS labeled it as.

The prototype runs on a PIC  18F2553 dev board. When plugged into a Windows box, the serial adapter sets up two USB devices. The first device is a Communications Device Class that handles the grunt work of the USB to Serial connection. The second USB device is a proprietary piece of software that grabs the current COM port number. This number is displayed on an LCD thanks to a host application on the Windows PC that reports the COM port of the Serial adapter.

It’s one of those ideas where you didn’t know you needed it until it was presented to you. An excellent tool from [Avishay], although maybe a pair of 7-segment LEDs would make it a more manufacturable device.

Magic Eye Spectrum Analyzer

its goddamned magic

 

If Nixies aren’t cool enough, maybe it’s time to step it up to magic eye tubes.

Magic eye tubes are, like Nixies and Dekatrons, display tubes. Unlike the alphanumeric characters of Nixies or rotating points of light in a Dekatron, Magic eye tubes are either bar graph or ‘Pac-Man’ displays that were used to show the signal strength of a radio station on very expensive radio sets.

After doing a few experiments with tubes, [sylvain] thought it would be cool to do something with magic eye tubes. He sourced eight vertical ‘bar graph’ magic eye tubes and built an audio spectrum analyzer.

One of the more difficult things to do was to compute the power levels for each frequency band. There are a few graphic equalizer ICs available, but [sylvian] decided to go the old-school, harder way by putting an FFT algorithm on an ATMega624.

An impressive piece of work that would look amazing next to a nice tube stereo system.

A Bluetooth Trackpad From A Resistive Touchscreen

touch

If you’ve checked out your favorite online retailer of absurdly inexpensive Chinese electronics, you’ll find a whole bunch of replacement parts. Phone parts are especially common, with high-resolution LCDs available for just a few dollars. There are also a few touchscreen kits – resistive touchscreen digitizers that can easily be read with a microcontroller. [Vinod] got his hands on one of these touchscreen digitizers, and with the help of an 8-pin micocontroller turned it into a Bluetooth trackpad.

The clear plastic touchpad is a relatively simple device. By reading a pair of analog values, it’s easy to find the coordinates of a finger or stylus on the touchpad. [Vinod] programmed an ATtiny13 to read these values and turn them in to x y coordinates, but he needed something useful to do with this data.

By connecting a small bluetooth module to his microcontroller, [Vinod] could send these coordinates to his computer. The result is a homebrew touchpad, able to move a cursor around, left and right click, and emulate a scroll wheel.

Continue reading “A Bluetooth Trackpad From A Resistive Touchscreen”

This Has Not Been A Good Week For The Hacker Community

RIP

The Internet lost a few great minds this week. [Aaron Swartz], confronted with an upcoming federal trial for his actions in downloading and releasing public domain academic articles from JSTOR, hanged himself this week. As one of the co-developers for RSS, the Creative Commons license, and slew of other works, [Aaron]’s legacy expanded the freedoms and possibilities of the most important human invention since the book.

Perhaps overshadowed in the news by [Aaron] is [Fabio Varesano], the man behind FreeIMU and Femtoduino. He died of a sudden heart attack at the much too young age of 28. The RC helicopter/plane/drone and HCI/physical computing communities lose a great mind with [Fabio]’s passing.

There is talk on the Dangerous Prototypes forum of continuing the development of FreeIMU, a project it seems [Fabio] worked on alone. We’d love to see someone pick up the reigns of the FreeIMU project, hopefully after doing a run of the current hardware and donating the proceeds to [Fabio]’s family.