Mimimalist Arduino Gaming Platform

A pretty color LCD screen, an Arduino, a buzzer and a joystick is all you need for a minimalist gaming console for under $20. At least, that’s all [João Vilaça] needed to get this sweet version of Tetris up and running. He’s working on Breakout right now. His Breakout looks even better. See the postscript below for details.

It’s a testament to the current state of the hardware hacking scene that [João] could put this device together in an afternoon for so cheap, presumably after waiting a while for shipments from China. The 320×240 SPI color TFT LCD screen used to cost twice as much as this whole project did. And wiring it up is a simple matter of connecting this pin to that pin. Almost child’s play.

Equally impressive is the state of open source software. A TFT library from Seeed Studios makes the screen interface a piece of cake. [João] wrote his own sound and joystick code, and of course the Tetris gameplay itself, but it’d be much more than a few weeks’ work without standing on the shoulders of giants. Check out [João]’s Github for the project code and stick with us after the break for a demo video and some of our other favorite Arduino gaming hacks.

Continue reading “Mimimalist Arduino Gaming Platform”

Tiny Robot Jazz

Microcontroller-based projects don’t have to be fancy to be fantastic. Case in point: [r0d0t]’s “Musicomatic: the random jazz machine“. Clever programming and a nice case can transform a few servos and a microcontroller into something delightful.

musicomat_schematicsHardware-wise, there’s really nothing to see here; a speaker and some servos are hooked up to an ATmega328. We think it’s cute to have the microcontroller control its own power supply through a relay, but honestly a MOSFET in place of the relay or better still using the AVR’s shutdown sleep mode would be the way to go.

Nope, where this project shines is the programming. Technically, it might make some of you cringe — full of blocking delays and other coding “taboos”. But none of that matters, because [r0d0t] put his work in where it counts: the music. You simply must hear it for yourself in the clip after the break.

The basis of making music that humans like is rhythm, so [r0d0t] doesn’t leave this entirely to chance. The array “rhythms” has seven beat patterns that get randomly selected. The other thing humans like is predictability and repetition, so choruses and “improvs” repeat as well. All of the random notes are constrained to the pentatonic scale, which keeps it from ever sounding too bad. (The secret sauce of Kenny G.)

In short, [r0d0t] packs a lot of basic music theory into a very basic device, and comes up with something transcendent. We’re a bit reminded of the Yellow Drum Machine robot, and that’s high praise. Both projects are testaments to building something simple and then investing the time and effort into the code to make the project awesome.

For another slice of [r0d0t]’s excellent minimalist pie, check out his take on the classic Snake game: Twisted Snake.

Continue reading “Tiny Robot Jazz”

Foldable Quadrotor Is Origamilicious

A team at the École Polytechnique Fédéral de Lausanne has developed and built a quadcopter with arms that unfold just before takeoff. The idea is that you can fold the device back up when you’re done with it, making it possible to store a bunch more of the quads in your backpack for instance.

The unfolding mechanism relies on the torque of the rotors spinning up to swing the arms into place. Once fully extended, a spring-loaded flap folds up, catches on some magnets, and forms an L-shaped structure that won’t re-fold without human intervention.

quadcopter_animUnder normal flying conditions, quads have a two left-handed propellers and two right-handed ones and the motors spin in opposite directions. In order to do the unfolding, two of the motors need to run essentially in reverse until the frame has clicked into place. They use a sensor (Hall effect?) to detect the arm locking, and then the rotors quickly switch back to their normal rotation before the quad hits the floor. In the video, they demonstrate that they’ve got this so well tuned that they can throw it up into the air to launch. Wow.

Everything’s still in prototype phase, and one of the next goals is “strengthening the arms so they can withstand crashes”, so don’t expect to see these in your local hobby store too soon. In the mean time, you’ll be able to see them in the flesh if you head up to the IEEE International Conference on Robotics and Automation in Seattle that started today and runs through Friday. If anyone goes, take more video and post in the comments?

Continue reading “Foldable Quadrotor Is Origamilicious”

Covert Remote Protest Transmitters

As a piece of protest art, “Covert Remote Protest Transmitters” ticks all the boxes. An outdoor covert projector that displayed anti-globalization messages at a G20 summit is protest. To disguise it inside a surveillance camera body housing — sticking it to the man from inside one of his own tools — is art. And a nice hack.

However you feel about the politics of globalization (and frankly, we’re stoked to be able to get cheap tech from anywhere in the world) the open-source DIY guidebook to building the rig (PDF) makes up for it all.

They installed the camera/projector long before the summit, where it sat dormant on a wall. A cell phone inside turned on the projector’s light with each ring because they attached a relay to the cell phone’s speaker circuit. In the instructions there’s an example of using a light-dependent resistor (CdS cell) to do the same thing, relying on the phone’s backlight functionality instead. There are a lot of ways to go here.

The optics consist of a couple of lenses aligned by trial and error, then fixed in place to a balsa wood frame with hot glue. A big fat Cree LED and driver provide the photons.

The video documentation of the piece is great. It’s mostly the news media reacting to the art piece as a “security breach”. A security breach would be a gun or a bomb. This was an overhead projector displaying messages that were out of the organizers’ control. Equating security with the supression of dissent is double-plus-ungood. Touché, CRPT.

Anyway, while you’re getting prepped for your next protest, have a look at the Image Fulgurator.

Need Timing Diagrams? Try Wavedrom

When working with anything digital, you’re going to end up reading or writing a timing diagram before long. For us, that’s meant keeping (text) notes, drawing something on a napkin, or using a tool like Inkscape. None of these are ideal.

An afternoon’s search for a better tool ended up with Wavedrom.

Just so you know where we’re coming from, here’s our list of desiderata for a timing diagram drawing solution:

  • Diagrams have a text-based representation, so their generation can be easily scripted and the results versioned and tracked throughout project development
  • Command-line rendering of images, because we like to automate everything
  • Looks good
  • Simple to use for common cases, but flexible enough to do some strange stuff when needed
  • Output modifiable when absolutely necessary: SVG would be nice

Basically, what we want is graphviz for timing diagrams.

Wavedrom nails four out of these five at the moment, and has promise to cover all of the bases. Give the online editor demo a try. We found it intuitive enough that we could make simple diagrams without even reading the fine manual. The tutorial has got you covered for more esoteric use cases.

foo

Clearly, some good thought has been put into the waveform description language, WaveJSON; it’s mostly readable and makes the essentials quick and easy. Because you can also enter straight SVG, it leaves the door open for full-fledged lunacy.

Wavedrom is written in JavaScript, and built for embedding in webpages; that’s the way they intend us to use it. On the other hand, if you want to run your own local version of the online editor, you can download it and install it locally if you’d like.

Our only quibble is that the standalone, command-line application wouldn’t generate images without the GUI on our Arch system. (Looks like there are some Google Chrome dependencies?) Otherwise, we think we’ve found our solution.

There are other applications out there. Drawtiming looks good, but we can’t quite get our head around the file format and the graphic output isn’t as flexible as we’d like: it only outputs GIF and we’re more into SVG because it can be edited easily after the fact.

There are font-based solutions that let you “type” the timing diagrams. We found Xwave and “Timing Diagram Font“. These work but aren’t particularly flexible; if you want something to happen at odd times, you’re out of luck. Plus, it just feels like a dirty hack, as if that were a bad thing.

Latex users can use tikz-timing, which makes sketching out your timing diagrams as much fun as laying out a very complex table in Latex (that is: not fun at all). On the other hand, it looks good, is ultimately flexible, outputs PDF, and would be scriptable if someone put the time in to write a nice frontend.

So for the next little while, we’re trying out Wavedrom.

What do you use for making timing diagrams?

LED Matrix Plus Geiger Counter

A lot of projects get made because someone just has the parts lying around. In this case, [Ed Nisley] got given a nice 8×8 RGB LED matrix, and needed something to display. [Ed] details the transformation of stuff-lying-on-the-desk into a unique matrix display for a Geiger counter (which he also presumably had sitting around somewhere). The result is a lightshow that’s as random as radioactive decay, and that’s pretty darn random.

img_5583-random-led-dots-circuit-layout-rb-smd-resistorsThe first post covers the hardware layout. It’s build on protoboard, but ends up looking a lot nicer than our projects because [Ed] spent some time hiding the shift-register ICs and row-driver transistors underneath the matrix itself, which was nicely socketed above. A sweet touch is the use of SMT resistors soldered upright underneath the board to save space. Cute.

The second post covers the circuit design, and is worth a look if you’re new to driving many LEDs from a minimum number of microcontroller pins. There are eight rows, and three colors each for eight LEDs per row. Without using shift registers, this would require 8*8*8*8 = way too many pins to control. If you want a worked example of how to do this with just four microcontroller pins, have a look. (Spoiler: cascaded shift registers driven by the AVR’s hardware SPI peripheral.)

The third post starts to flesh out the software. [Ed] settled on seven colors (and off) for the display, so the matrix’s total state can be crammed into just 32 bytes, which fits nicely in even a tiny microcontroller, much less the gargantuan ATmega328. Wrapping this all up in an array of structs and providing a couple of helper functions makes quick work of the software side. The addition of a sync pulse to trigger an oscilloscope at the end of a row is a nice touch.

aware-rm-60-geiger-pulseNext up is the Geiger counter interface software post. When a radioactive decay event is detected, the code reads out the time in milliseconds and uses that as the source of randomness. To whiten the noise, the times are run through a simple hash function: the Jenkins hash (link). This hash function was new to us and seems pretty useful for quick-and-dirty microcontroller applications.

The last post details pre-loading the matrix on startup and running a test sequence that blinks each LED to make sure they’re all working. Using a single random value to seed a software pseudo-random number generator ensures that it will (almost) never start off with the same display twice.

Phswew! That’s a lot of well-documented writeup of a well-polished project! Hope it inspires you to dig out something cool from your junk drawer and build.

Robot Camel Jockeys

You might think we’re sinking to lowest-common-denominator, click-bait headlines like the rest of the online press. We’re not. The New York Times Video Notebook series has a story on camel racing that you’ve just got to see in the video after the break.

robotPreviously, the camel races in Abu Dhabi had used small children as jockeys because they’re lightweight. Unfortunately, this lead to illegal trafficking of small children, mostly orphans. That won’t do. So they came up with a technological solution.

Strap a cordless drill with a purpose-built whip in the chuck onto the back of your camel. Add a car-remote keyfob to activate, and a two-way radio so that you can shout encouragement into your animal’s ear at just the right times. Now just chase the racers down the highway in an SUV and it’s like you’re there on the camel’s back!

talkingWe love the little silk suits that the drillbot-jockeys get to wear, but we’re not sure that cordless drills with walkie-talkies and remote controls count as “robots” really, because they don’t do anything autonomous. We think they’re more accurately described as “telepresence agents”.

Continue reading “Robot Camel Jockeys”