MicroLisp, Lisp For The AVR

We’ve seen tiny microcontroller-based computers before, but nothing like this. Where the usual AVR + display + serial connection features BASIC, Forth, or another forgotten language from the annals of computer history, this project turns an AVR into a Lisp machine.

The μλ project is the product of several decades of playing with Lisp on the university mainframe, finding a Lisp interpreter for the 6800 in Byte, and writing a few lisp applications using the Macintosh Toolbox. While this experience gave the author a handle on Lisp running on memory-constrained systems, MicroLisp is running on an ATMega328 with 32k of Flash and 2k of RAM.  In that tiny space, this tiny computer can blink a few boards, write to an OLED display, and read a PS/2 keyboard.

The circuit is simple enough to fit on a breadboard, but the real trick here is the firmware. A large subset of Lisp is supported, as is analog and digitalRead, analog and digitalWrite, I2C, SPI, and a serial interface. It’s an amazing piece of work that’s just begging to be slapped together on a piece of perfboard, if only to have a pocket-sized Lisp machine.

Thanks [gir] for the tip.

Secret Riddle Retro Radio

When [the-rene] was building an escape room, he decided to have a clue delivered by radio. Well, not exactly radio, but rather an old-fashioned radio that lets you tune to a faux radio station that asks a riddle. When you solve the riddle, a secret compartment opens up. [the-rene] says you could have the compartment contain a key or a clue or even a cookie.

The outer case is actually an old radio gutted for this purpose. In addition, a laser cut box and a servo motor form the secret compartment.

Continue reading “Secret Riddle Retro Radio”

Atmel Removes Full-Swing Crystal Oscillator

It is one of our favorite chips, and the brains behind the Arduino UNO and its clones, and it’s getting a tweak (PDF). The ATmega328 and other megaX8-series chips have undergone a subtle design change that probably won’t affect you, but will cause hours of debugging headaches if it does. So here’s your heads-up. The full-swing oscillator driver circuitry is being removed. As always, there’s good news and bad news.

The older ATmega chips had two different crystal drivers, a low-power one that worked for lower speeds, and higher-current version that would make even recalcitrant crystals with fat loading capacitors sing. This “full-swing” crystal driver was good for 16 MHz and up.

The good news about the change is that the low-power crystal driver has been improved to the point that it’ll drive 16 MHz crystals, so you probably don’t need the full-swing driver anymore unless you’re running the chip at 20 MHz (or higher, you naughty little overclocker).

This is tremendously important for Arduinos, for instance, which run a 16 MHz crystal. Can you imagine the public-relations disaster if future Arduinos just stopped working randomly? Unclear is if this is going to ruin building up a perfboard Arduino as shown in the banner image. The full-swing oscillator was so robust that people were getting away with a lot of hacky designs and sub-optimal loading capacitor choices. Will those continue to work? Time will tell.

The bad news is that if you were using the full-swing oscillator to overcome electrical noise in your environment, you’re going to need to resort to an external oscillator instead of a simple crystal. This will increase parts cost, but might be the right thing to do anyway.

Whenever anyone changes your favorite chip, there’s a predictable kerfuffle on the forums. An Atmel representative said they can get you chips with the full-swing driver with a special order code. We’re thinking that they’re not going to let us special order ten chips, though, so we’re going to have to learn to live with the change.

The ATmega328 has already gotten a makeover, and the new version has improved peripheral devices which are certainly welcome. They don’t have the full-swing oscillator onboard, so you can pick some up now and verify if this change is going to be a problem for you or not. We don’t have any of the new chips to test out just yet.

Thanks to [Ido Gendel] for tipping us off to the change in our comment section! If you have any first-hand experience with the new chips, let us know in the comments and send in a tip anytime you trip over something awesome during your Internet travels.

Upgrade The Graphics On A Sega Game Gear To Mental

[Nino K] built a portable game player for text adventures. He decided he had spent enough time with the ATmega328 kit from NerdKits to build a more advanced project.

To start with, he built a prototype PCB and tested out the concept. It worked so he began on the real thing. He tore out the guts from a broken Game Gear, saving some parts like those responsible for supplying power. Impressively, he etched his own replacement boards for the Game Gear’s control pads; surprising himself at how simple it ended up being. He fit a 16×4 LCD into the space previously occupied by the Game Gear’s screen.

The program itself is a simple text adventure of his own creation. He even added little 8-bit sprites. The story is classic, a princess has gotten herself in some trouble and a brave hero has been coerced into saving her. Last, he added some music and sound effects from Zelda with a piezo buzzer.

This project is guaranteed to disappoint a visiting younger cousin or relative, but we like to think of that as a feature and not a bug. Great work!

Bye-bye ATmega328P, Hello 328PB!

We never have enough peripherals on a microcontroller. Whether it’s hardware-driven PWM channels, ADCs, or serial communication peripherals, we always end up wanting just one more of these but don’t really need so many of those. Atmel’s new version of the popular ATmega328 series, the ATmega328PB, seems to have heard our pleas.

We don’t have a chip in hand, but the datasheet tantalizes. Here’s a quick rundown of the new features:

  • Two more 16-bit timer/counters. This is a big deal when you’re writing code that’s not backed up by an operating system and relies on the hardware for jitter-free timing.
  • Two of each USART, SPI, and I2C serial instead of one of each. Good when you use I2C devices that have limited address spaces, or when you need to push the bits out really fast over SPI.
  • Ten PWM channels instead of six. This (along with the extra 16-bit timers) is good news for anyone who uses PWM — from driving servos to making music.
  • Onboard capacitive sensing hardware: Peripheral Touch Controller. This is entirely new to the ATmega328PB chip, and looks like it’ll be interesting for running capacitive sense buttons without additional ICs. It relies on Atmel’s QTouch software library, though, so it looks like it’s not a free-standing peripheral as much as an internal multiplexer with maybe some hardware-level filtering. We’ll have to look into this in detail when we get our hands on one of the chips.

So what does this mean for you? A quick search of the usual suspects shows the chips in stock and shipping right now, and there’s an inexpensive dev kit available as well. If you write your own code in C, taking advantage of the new features should be a snap. Arduino folks will have to wait until the chips (and code support) work their way into the ecosystem.

Thanks [Peter van der Walt] for the tip!

Passcode-Protecting the Means of Caffeine

Several years ago, [Cameron] added an ATMega328-based PID temperature controller to his espresso machine. It has performed admirably to this day. But behind that cool bezel and LCD, all of the electronics are just sitting there, exposed. [Cameron] decided to give it a makeover. He has a better machine at home these days and wanted to take the old one to work. In order to keep untrained hands away from it in the office’s shared kitchen, [Cameron] installed a 4-digit keypad.

This makeover didn’t end with hiding wires and locking out noobs, though. [Cameron] added a float switch that will disable the pump when the water level gets too low. This is a nice touch. Otherwise, machines like this one will try to brew when the tank is dry, and then the pump has to be primed once the tank is refilled. [Cameron] also replaced the buttons’ back-lighting bulbs with bright LEDs. A small LCD mounted on the front of the machine shows the boiler temperature and shot-pulling duration.

If you’ve add PID temperature control to your espresso machine but have done nothing to improve the steam wand, why not add a pressure gauge?

Toy Television’s Dreams Come True

A couple of years ago, [Alec]’s boss brought him a souvenir from Mexico City—a small mid-century console television made of scrap wood and cardboard. It’s probably meant to be a picture frame, but [Alec] was determined to give it a better life.

As it turns out, the screen of [Alec]’s old Samsung I9000 was a perfect fit for the cabinet with room to spare. It was on its way to becoming a real (YouTube) TV once [Alec] could find a way to control it remotely. A giant new-old stock remote that’s almost bigger than the TV was just the thing. There’s enough room inside the remote for a non-LE Bluefruit module, which is what the I9000 will accept as input without complaint.

Trouble is, Bluefruit doesn’t support matrix keypads, so [Alec] used a bare ATMega328 running on the internal clock. Since the Bluefruit board provides voltage regulation, the remote was able to keep its native 9V power. [Alec] is happy with the results, though he plans to refine his button choices and maybe make a new overlay for the remote. Stay tuned for a tiny TV tour.

Continue reading “Toy Television’s Dreams Come True”