Transferring Audio to an AVR at 12kbps

Back in the bad ‘ol days of computing, hard drives cost as much as a car, and floppy drives were incredibly expensive. The solution to this data storage problem offered by all the manufacturers was simple – an audio cassette. It’s an elegant solution to a storage problem, and something that has applications today.

[Jari] was working on a wearable message badge with an 8-pin ATTiny. To get data onto this device, he looked at his options and couldn’t find anything good; USB needs two pins and the firmware takes up 1/4 of the Flash, UART isn’t available on every computer, and Bluetooth and WiFi are expensive and complicated. This left using audio to send digital data as the simplest solution.

[Jari] went through a ton of Wikipedia articles to figure out the best modulation scheme for transferring data with audio. What he came up with is very simple: just a square wave that’s changed by turning a pin off and on. When the audio is three samples long without crossing zero, the data is 0. When it’s five samples long without crossing zero, the data is 1. There’s a 17-sample long sync pulse, and with a small circuit that acts as a zero crossing detector, [Jari] had a simple circuit that would transfer data easily and cheaply.

All the code for this extremely cheap modem is available on GitHub.

Phoenard, A Prototyping Gadget

The Hackaday Prize party wasn’t just about the five finalists; actually, there were more THP entries in attendance – All Yarns Are Beautiful, OpenExposer, M.A.R.S., a 3D scanner, and a few more that I’m forgetting – than actual finalists. In addition, a number of people brought projects that had never seen the light of day, like [Ralf] and [Pamungkas]’ Phoenard.

Phoenard is a Kickstarter project the guys launched at the prize party, something they could attend as a little side trip after manning the ‘maker’ part of the Atmel booth at Electronica. They’ve come up with a tiny handheld device that can only be described as a ‘gadget’. It has a touchscreen, a battery, an MegaAVR, a few connectors, and not much else. What makes this project cool is how they’re running their applications. A bootloader sits on the AVR, but all the applications – everything from a GSM phone to an MP3 player – lives on a microSD card.

The Phoenard guys have come up with a few expansion modules for Bluetooth LE, GSM, GPS, and all the usual cool modules. Plugging one of these modules into the back of the device adds capability, and if that isn’t enough, there’s an old 30-pin iPhone connector on the bottom ready to accept a prototyping board.

Video of these guys below.

Continue reading “Phoenard, A Prototyping Gadget”

Hackaday Links: November 9, 2014

After many years of searching, [Dan Wood] finally got his hands on something he’s wanted for the past twenty-two years: an Amiga 4000. No, it’s not the queen bee of Amiga land – that honor would fall to the 68060-equipped 4000T, but [Dan]’s 4000 is decked out. It has a 256MB RAM expansion, Ethernet, USB, and a Picasso IV graphics card that gives it better resolution and color depth than most modern laptops.

[Pistonpedal] has a fully automatic pneumatic can crusher that is far too cool to be wasted on a case of Keystone. A funnel at the top guides the cans in to be crushed one at a time and ejected into a garbage can underneath. Great for recycling.

Coming over from ‘normal’ programming into the world of embedded development? [AndreJ] has the AVR C Macro for you. It’s a great way to get away from all those ~=, |=, and &=s that don’t make any sense at all.

[CNLohr] has a reputation for running Minecraft servers on things that don’t make any sense at all. The latest build is a light up redstone ore block equipped with an ESP8266 WiFi chip.

Oh, the Hackaday overlords and underlings are in Munich for this little shindig we’re doing. If you in town for Electronica come on down. If you have a copy of Neil Young’s Trans, bring it to the party.

Inexpensive AVR Programmer Made From Five Components

If you want to program an AVR chip as inexpensively as possible, then [Ian’s] solution might just be for you. He built an AVR programmer using only four components. This design is based on the vusbtiny AVR programmer design, with a few components left out.

[Ian’s] design leaves out two of the resistors and two diodes, leaving just four components. These include a 1.5k resistor, a small capacitor, a USB connector, a six pin header, and an ATtiny45. He admits that this may not be exactly up to USB spec, but it does work.

This is one of those projects that is really an exercise in “will it work?” more than anything else. The fact that you need to first program an AVR chip means that this wouldn’t be useful in a pinch, because you would already have to have a working programmer. Nonetheless, it’s always fun to see what can be done with as little as possible.

The Most Basic BASIC Computer

avr computer

AVR microcontrollers can do pretty much anything nowadays. Blinking LEDs, handling sensor inputs, engine control modules, and now, thanks to [Dan], a small single chip BASIC computer with only ten parts (and four of them are capacitors).

[Dan]’s homebrew computer has it all. The ATmega 1284P microcontroller outputs a composite video signal and handles inputs from a PS/2 keyboard. The microcontroller runs at 16 MHz, has 7 kB of memory for programs, and can use a separate EEPROM to store data. It also has an array of GPIO pins for interacting with the physical world.

For software, the microcontroller runs a version of BASIC called Tiny BASIC plus, which is a stripped-down language that can fit in 3 kB of memory. This is crucial if you’re in the 1970s or if you’re programming on an AVR microcontroller in the 21st century.

We’ve seen other Arduinos and AVR-type microcontrollers that can run BASIC, but this one has a great form factor and clean look. It’s also a great way to get familiar with homebrew computing and the BASIC programming language!

THP Entry: Tinusaur AVR Platform Teaches Noobs, Plays Game of Life

tinusaur[Neven Boyanov] says there’s nothing special about Tinusaur, the bite-sized platform for learning and teaching the joys of programming AVRs. But if you’re dying to gain a deeper understanding of your Arduino or are looking to teach someone else the basics, you may disagree with that assessment.

Tinusaur is easy to assemble and contains only the components necessary for ATTiny13/25/45/85 operation (the kit comes with an ’85). [Neven] saved space and memory by forgoing USB voltage regulator. An optional button cell mount and jumper are included in the kit.

[Neven] is selling boards and kits through the Tinusaur site, or you can get the board from a few 3rd party vendors. His site has some projects and useful guides for assembling and driving your Tinusaur. He recently programmed it to play Conway’s Game of Life on an 8×8 LED matrix. If you’re looking for the zero-entry side of the AVR swimming pool, you can program it from the Arduino IDE. Be warned, though; they aren’t fully compatible.


SpaceWrencherThe project featured in this post is an entry in The Hackaday Prize. Build something awesome and win a trip to space or hundreds of other prizes.

Fantastic Tach Is Strangely Called Tachtastic

tachtastic diy tachometer

We all have projects from yesteryear that we wish had been documented better. [EjaadTech] is fighting back by creating a project page about a tachometer he built 3 years ago while in college. He’s done a great write-up documenting all the steps from bread-boarding to testing to finished project. All of the code necessary for this tachometer is available too, just in case you’d like to make one yourself.

At the heart of the project is an AVR ATMega8 chip that performs the calculations and controls the LCD output screen that displays both the immediate RPM as well as the average. To hold everything together, [EjaadTech] etched his own custom PCB board that we must say looks pretty good. In addition to holding all the necessary components, there is also an ISP connector for programming and re-programming.

There are two attachment options for sensing the RPM. One is a beam-break style where the IR emitter is on one side of the object and the receiver is on the other. This type of sensor would work well with something like a fan, where the blades would break the IR beam as they passed by. Then other attachment has the IR emitter and receiver on one board mounted next to each other. The emitter continually sends out a signal and the receiver counts how often it sees a reflection. This works for rotating objects such as shafts where there would not be a regular break in the IR beam. For this reflective-based setup to work there would have to be a small piece of reflective tape on the shaft providing a once-per-revolution reflection point. Notice the use of female headers to block any stray IR beams from causing an inaccurate reading… simple and effective.