SPI: Let Go And Use The Force

Take a leap the next time you use SPI and don’t poll for the busy flag. “What, are you crazy? That’s the whole point of the busy flag! It’s a quick check to make sure you don’t kill a byte waiting to be shifted out!” Sure, we thought the same thing, but the other side of the coin is that it takes time to check the busy flag, and that’s time he could be transmitting data. [bigjosh2] calculates that his technique saves 20% of those wasted cycles in this particular case. And he’s “using the force” only because he’s a Jedi master able to rely on the cycle count of a chunk of assembly code.

He’s working with an AVR processor, and pumping out bits to drive the vintage LED display pictured above. The ancient chips don’t have buffered SPI so he has to blank the display while shifting new data in to prevent it from glitching. Because the display blank during the SPI transmission, the slower it goes, the dimmer the lights.

He attacks the problem with synchronous code. It takes 2 cycles for the hardware SPI to send each bit, so he twiddles his thumbs (that’s exactly what he wrote in his code comments) for 16 cycles before reloading the SPI register with his next value. This leaves it up to faith in the silicon that the shifting will always take the same number of cycles, but the nice thing about hardware is that it’s deterministic. He ends up killing a few cycles in order to save time by not polling the busy flag.

Still need a crash course in what SPI actually does? [Bil Herd] has you covered with this SPI communication demo.

Magic Mirror On The Wall, “Is Pi Or ESP, Fairest Of All?”

“What’s the weather like, honey?” “I don’t know. Let me check the mirror.”  The mirror?

Both [Dylan Pierce] and [squix] have mirror projects that display the weather. They took two different approaches which makes for an interesting comparison. [Dylan] uses a Raspberry Pi with an actual monitor behind the mirror. [squix] puts an OLED behind the mirror driven by a ESP8266.  It appears there is more than one way to hack a mirror, or anything, which is what makes hacking fun.

[squix] started with a picture frame, adding tinting film to the glass so it would reflect. A small section of tint was removed to allow the OLED to be seen. The ESP8266 software connects to the Weather Underground to get the latest information.

The Raspberry Pi version by [Dylan] puts a 27″ monitor behind the mirror. That is either terribly impressive or way over the top but seeing Linux boot behind the mirror makes it worth the effort. The Pi generates a web page which makes this adaptable as a general purpose kiosk.

A video of [squix]’s mirror in operation, after the break.

Continue reading “Magic Mirror On The Wall, “Is Pi Or ESP, Fairest Of All?””

Stepping Out In Style With Top Hat Navigation

Wearable tech is getting to be a big thing. But how we interface with this gear is still a bit of a work in progress. To explore this space, [Bruce Land]’s microcontroller course students came up with an acoustic interface to assist with navigation while walking. With style, of course.

[Bruce], from the Cornell University School of Electrical and Computer Engineering, has been burning up the Hackaday tips line with his students’ final projects. Here’s the overview page for the Sound Navigation Hat. It uses a PIC32 with GPS and compass. A lot of time was spent figuring out how to properly retrieve and parse the GPS data, but for us the interesting bits on that page are how the directional sound was put together.

Audio tones are fed to earbuds with phase shift and amplitude to make it seem like the sound is coming from the direction you’re supposed to walk. Navigation is all based on pre-programmed routes which are selected using a small LCD screen and buttons. One thing’s for sure, the choice of headwear for the project is beyond reproach from a fashion standpoint – engineering has a long history with the top hat, and we think it’s high time it made a comeback.

Is this a practical solution to land navigation? Of course not. But it could be implemented in smartphone audio players for ambient turn-by-turn navigation. And as a student project, it’s a fun way to demonstrate a novel interface. We recently covered a haptic navigation interface for the visually impaired that uses a similar principle. It’ll be interesting to see if either of these interfaces goes anywhere.

Continue reading “Stepping Out In Style With Top Hat Navigation”

Color Sonification Could Be Key To Rainbow Connection

Have you seen any loud sweaters this holiday season? Now there is a way to quantify their vibrancy and actually hear them at the same time. Cornell engineering students [Mengcheng Qi] and [Ryan Land] focused on the sonification of color and translated the visible spectrum into audible sounds.

They originally planned to use pixel samples from an OV7670 camera module, but weren’t able to extract any useful color data from it. We prefer their Plan B anyway, which was to use CdS photo resistors and the plastic color filters used for photography in red, blue, and green. The varying intensity of light falling on the photo resistors creates different patterns according to the voltage levels. The actual sound generation was done with FM sound synthesis.

There wasn’t a lot of natural sound variation between different RGB values, so in order to make it more fun, they created different instruments which play different patterns at variable speeds and pitch according to the colors. In addition to the audio feedback, the RGB values are displayed in real-time on a small TFT. Below those are dynamic bar graphs that show the voltages of each color.

Check out the demo after the break; they walk through the project and try it out on different things to hear their colors.

Continue reading “Color Sonification Could Be Key To Rainbow Connection”

Christmas Bauble Is Neither Spherical Nor Runs Arduino

[Jordan Wills] was tasked by his company, Silicon Labs, to build some Christmas Baubles to give away to co-workers. While the commissioned units were designed to be simple battery and LED affairs, he decided to make one of his own with bells and whistles. His Mario themed Christmas Ornament uses a Silicon Labs FM972 micro controller, capacitive sensing, PWM controlled 8 bit audio, and blinky lights.

The interesting part is some of the construction techniques that he used. The finger-joint style cube is built from circuit boards. Electrical connections between panels were routed using solder wicking copper braid. That’s a interesting trick which we’ll keep in mind along with some of our favorite creative structural uses of PCB.

The top of the cube has four LED’s which light up the Mario “Question Mark” symbols on the four sides of the cube while the base contains all of the electronics. The outside of the base piece was a large copper plane to act as the capacitive sensing element. This meant all electronics needed to be surface mounted with tracks laid out on one side – which posed some layout challenges. Adding the Capacitive sense function was a cinch thanks to support from the in-house design team. PWM output from the micro controller takes care of audio, and the output is routed through a buffer to boost the signal. A bandpass filter then cleans up the PWM output before feeding it to the speaker.

Continue reading “Christmas Bauble Is Neither Spherical Nor Runs Arduino”

Little Helper: Open Source Hardware Hacker Multitool

We love a good multitool. There’s something seductive about knowing that if, for some reason, you need to saw down a tree on a moment’s notice, you have a tiny saw in your pocket. We also like electronic versions of the multitool: gadgets that serve a lot of purposes as you develop and debug hardware. One of the most polished-looking ones we’ve seen is [Phillip Schuster’s] Little Helper.

The open source gadget looks like an iPod (if an iPod had header pins sticking out of it). It has basic analog I/O capability, can generate PWM pulses, sniff I2C traffic, and do lots of other features. It is open source, so you can always add more capabilities if you need them.

Continue reading “Little Helper: Open Source Hardware Hacker Multitool”

You Need A Self-Righting Thrust-Vector Balloon Copter

Cornell University’s microcontroller class looks like a tremendous amount of fun. Not only do the students learn the nitty-gritty details of microcontroller programming, but the course culminates in a cool project. [Brian Ritchken] and [Jim Liu] made a thrust-vector controlled balloon blimp. They call this working?!?!

Three balloons provide just enough lift so that the blimp can climb or descend on motor power. Since the machine is symmetric, there’s no intrinsic idea of “forward” or “backward”. Instead, a ring of eight LEDs around the edge let you know which way the blimp thinks it’s pointing. Two controls on the remote rotate the pointing direction clockwise and counter-clockwise. The blimp does the math to figure out which motors to run faster or slower when you tell it to go forward or back.

The platform is stabilized by a feedback loop with an accelerometer on board, and seems capable of handling a fairly asymmetric weight distribution, as evidenced by their ballast dangling off the side — a climbing bag filled with ketchup packets that presumably weren’t just lifted from the dining halls.

It looks like [Brian] and [Jim] had a ton of fun building and flying this contraption. We’d love to see a distance-to-the-floor sensor added so that they could command it to hover at a given height, but that adds an extra level of complexity. They got this done in time and under budget, so kudos to them both. And in a world full of over-qualified quadcopters, it’s nice to see the humble blimp getting its time in the sun.

Yep, you heard right… this is yet another final project for a University course. Yesterday we saw a spinning POV globe, and the day before a voice-activated eye test. We want to see your final project too so please send in a link!