Posts Tagged ‘AVR Programming’

The Joy Demon Cont’d

Sunday, January 10th, 2010

So sometime at the beginning of 2010 the sick children of Chicago set up a fuss looking for their monster again. You could hear them all the way from Brooklyn. Again, my guilt was heavy. Again, I made some stuff.

An introduction of what Remoc does is in order I guess. He’s basically a bigass toy that senses when little kids touch him in different spots and plays various games with them. He laughs, he cries. He may or may not be better than Cats. He also goes to sleep at night, sings songs, and has a weird interactive thermometer. He farts a lot. When he behaves, he’s kind of fun.

His memory and play pattern live on an SBC designed by my buddy Todd Squires which we used at the old toy company and affectionately call the toybrain (version 4). The TB4 was fine.

There was no real way to salvage most of the rest of Remoc’s old brain. There was a crappy class AB audio amp I put in which got way too hot, his touchsensor circuits were noise prone and also temperature sensitive, and his LED supply tended to go out of regulation when too many lights in the thermometer stayed on, and he got confused easily about time-of-day stuff if you turned his supply off. His eyeballs were light bulbs which burnt out (that was a committee decision, but). None of this was good.

His new brain boards (above) dealt with all this stuff. 2010 saw Remoc get new MOSFETs to run all his lights, a new audio amp, and a proper RTC with a ginormous battery for backup. More importantly, he got a bunch of precision opamps and a multichannel ADC to handle input from the touchsensors.

The touchsensors were actually fun to make. They’re an AVR which generates a crystal derived square wave (laziness on my part, and tunability. The generator could have been a logic gate or any crystal clock circuit really, although the programmable chip provided fudge room which I didn’t [and hopefully won’t] need) and drives it through a resistor to whatever gnarly sensor plate you have, and then filters and rectifies what’s left. They use hand capacitance to form a variable RC filter; the output of this device is a voltage which is inversely proportional to the capacitance at the sensing node. Not perfect, but pretty good. These sensors also use 1/8″ cables to carry power, ground, and signal, cause 1/8″ cables are cheap and promised to make wiring the beast a lot easier.

The thermometer. Some SMT LEDs on a stick. Yaaaawn.

All this stuff got packed up to schelp to Chicago.

“Video Game TiVo” Revised for Production

Monday, January 4th, 2010

So over the last couple years I’ve been building different variations on this thing for my client/buddy Cory. It’s had many names but the one we tended to call it the most often was the “Video Game TiVo”. It’s basically an AVR with a ton of Atmel Dataflash as well as some Vregs, level translators, and RS-232 chips.

The idea with these guys is that they sit around on a video game controller and log what the user is doing, and then spit that biz back out when you tell them to. The original ones simply hung out watching or asserting the actual switch lines using WPUs and the like, and as time went by they began to actually replace the controller interface entirely and deal exclusively with serial. Depending on the game system, they can sometimes play a game back deterministically, but mostly not because of RNG and/or timing issues. Either way, they’ll record MONTHS of game and can loop arbitrarily, etc etc. They also have a fancy terminal built in for communicating with a PC and recognizing different video game consoles.

Cory wanted them so he could throw infinite gutterballs in Playstation Bowling games. They do that just fine :-)

This one was tested on a PS1 and the canonical bowling.
This January I had geared up to finally make a TON of them so Cory could just have them handy and not need to call me when he needed one, and this was the final test run before we went into production.

WTPA Gets Iced; Version 2 Firmware Out!

Monday, July 6th, 2009

Happy Birthday America!

Wait — no: Happy Birtday WTPA!

It’s a little bogus to use the above fuzzy-wuzzy pictures, but given the current state of fireworks in my neighborhood and the celebratory announcement of the NEW FIRMWARE, I feel justified in using hazy party pics. The above was actually a totally kickass surprise party (peep the cake made by my girl Julianna Luther) in May to celebrate the WTPA launch here in Chicago; why my friends decided to start beef between me and Dre I’ll never know.

So anyway, we’ll pretend it’s a birthday party for the NEW FIRMWARE! As of today the version 2 firmware is now the most current, and will ship with all WTPAs ordered.

Changes From Rev1 To Rev2 Firmware:

  • The original firmware did not take into account settling time for the ADC when changing channels, and as a result, the last result from the control pot often ended up being logged as the first (or first several) samples. This resulted in a loud click at the beginning of a sampled phrase when the control pot was set to certain positions. The sampling routine now throws out the first few samples until the ADC has settled, eliminating the click.
  • The firmware now allows for playing a “single shot” sample when the sample is backwards masked.
  • The firmware now sets the DAC to midscale at powerup. This eliminates the loud bump that would happen the first time a user triggered any audio interrupt (including recording) after powerup.

The current firmware is now posted on the site (the old version of the source code is also included in the firmware download, and you’re welcome to compile and use that if you want to be retro for some weird reason). Those of you who already have WTPAs can update to the new firmware using any old avr programmer with a 6-pin ISP connector. I like the Atmel STK500, but I’d be remiss in not mentioning the fine programmers available for cheap at Adafruit Industries who pretty much have this whole kit game on lock.

Information on how to update your firmware is available in lots of AVR-specific places on the net:

  • The GNU Tool Chain for AVR — Very nerdy and complete and useful. It’s where I go.
  • Winavr — A Windows port of that toolchain.
  • AVRfreaks — The biggest and most complete AVR user community.
  • AVR Studio — Atmel’s IDE. I can’t stand this but you might like it.
  • WTPA User Forum — If and when there are WTPA specific questions about this, the answers will be here.

In other news, Narrat1ve has not one but THREE new products in the pipe. One smaller than WTPA, one bigger, and one A LOT bigger. And no, one of them is not a “real website”. I’m excited. Stay tuned.