MicroLisp With Matching Parens

Lisp is a supremely elegant programming language, but you won’t find it around much today. That’s a shame; in the 80s and 90s, all the cool kids were using Lisp machines, computers dedicated to the creation and interpretation of Lisp. While the AI renaissance of the 80s is dead, replaced with the machine learning fad of today, Lisp machines have gotten much smaller. Now, they’ll fit in your pocket, and they have parenthesis matching, to boot.

If this build looks familiar, you’re not wrong. A while back, we saw a similar pocket Lisp computer based around the ATMega328 microcontroller with 32k of Flash and 2k of RAM. That’s not a lot by any measure, and a much more suitable processor for an AVR-based pocket Lisp machine would be the big boys of the ATMega family.

The new and improved version of the Tiny Lisp Computer is built around the ATMega1284. If it’s capable enough to run a 3D printer, it should run Lisp very well. With more program space and more RAM come more features including matching parens when entering code, a serial monitor interface, and a program editor – basically a text editor on the chip.

Apart from the larger chip, the circuit remains relatively unchanged. The display is still an OLED that can be had for a few dollars from the usual online retailers, and the other bits of circuitry are still just a handful of resistors, caps, and wire. An off-the-shelf FTDI module (or whatever serial chip you desire) can be added to connect to a serial terminal, and support for a PS/2 keyboard rounds out the board.

Hackaday Links Column Banner

Hackaday Links: November 6, 2016

Here’s a life protip for you: get really, really good at one video game. Not all of them; you only want to be good – top 10% at least – at one video game. For me, that’s Galaga. It’s a great arcade game, and now it’s IoT. [justin] has been working on publishing high scores from a Galaga board to the Internet. The electronics are actually pretty simple – just a latch on a memory address, and an ESP8266 for comms.

On with the mergers and acquisitions! Lattice has been sold to Canyon Bridge, a Chinese private equity firm, for $1.3 Billion. Readers of Hackaday should know Lattice as the creators of the iCE40 FPGA platform, famously the target of the only Open Source FPGA toolchain.

The Internet of Chocolate Chip Cookies. Yes, it’s a Kickstarter for a cookie machine, because buying a tube of pre-made cookie dough is too hard. There is one quote I would like to point out in this Kickstarter: “Carbon Fiber Convection Heating Element (1300W) is more energy-efficient than traditional electric elements and heats up instantly.” Can someone please explain how a heating element can be more efficient? What does that mean? Aren’t all resistive heating elements 100% efficient by default? Or are they 0% efficient? The Internet of Cookies broke my brain.

The USB Rubber Ducky is a thumb-drive sized device that, when plugged into a computer, presents itself as a USB HID keyboard, opens up a CLI, inputs a few commands, and could potentially do evil stuff. The USB Rubber Ducky costs $45, a Raspberry Pi Zero and a USB connector costs $6. [tim] built his own USB Rubber Ducky, and the results are great.

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.

CNC Upgrade To Guitar Pickup Winding Machine

The idea of winding inductive guitar pickups by hand is almost unthinkable. It uses extremely thin wire and is a repetitive, laborious process that nevertheless requires a certain amount of precision. It’s a prime candidate for automation, and while [Davide Gironi] did exactly that, he wasn’t entirely satisfied with his earlier version. He now has a new CNC version that is more full-featured and uses an ATMega8 microcontroller.

[Davide Gironi]’s previous version took care of winding and counting the number of turns, but it was still an assisted manual system that relied on a human operator. The new upgrade includes a number of features necessary to more fully automate the process, such as a wire tensioner, a wire guide and traverse mechanism (made from parts salvaged from a broken scanner), and an automatic stop for when the correct number of turns has been reached.

guitar_pickup_winding_sample_microscope

All kinds of small but significant details are covered in the build, such as using plastic and felt for anything that handles the wire — the extremely fine wire is insulated with a very thin coating and care must be taken to not scratch it off. Also, there is the need to compute how far the traverse mechanism must move the wire guide in order to place the new wire next to the previously-laid turn (taking into account the winding speed, which may be changing), and doing this smoothly so that the system does not need to speed up and slow down for every layer of winding.

This system is still programmed by hand using buttons and an LCD, but [Davide Gironi] says that the next version will use the UART in order to allow communication with (and configuration by) computer – opening the door to easy handling of multiple winding patterns. You can see video of the current version in action, below.

Continue reading “CNC Upgrade To Guitar Pickup Winding Machine”

1btn – An Open Source Dash

The availability of cheap radios, omni-present WiFi and powerful web services means the IoT wave is here to stay. Amazon got into the act with its “do only one thing” Dash button. But a more interesting solution would be an IoT “do it all” button.

[Anand] has been working on his 1btn Open Source WiFi connected IoT button for a while. It connects to the Internet over WiFi to trigger whatever action you have assigned to it using a simple, online interface. It’s reconfigurable and open source. Which means it can be used in pretty imaginative ways, and if needed, can be re-flashed with your own custom firmware should you decide to really get under its hood.

The 1btn’s ESP8266 module is usually in sleep mode, waking up when the button is pressed, making the connection, performing the task and then going back to sleep once confirmation is received. A Red/Green LED indicates if the action was successful or not. You can set it up to send e-mails, messages, tweets or perform actions via a custom script, API or the IFTTT – maker channel. To make it hacker friendly, all of the ESP8266 GPIO pins are accessible via headers. This makes it convenient to add external sensors, for example. There’s also a (unpopulated) QFN footprint to allow adding an ATmega device (168P/328P) whose GPIO pins are also accessible via headers. This opens up a large number of additional applications for the device such as home automation.

On the software side, the 1btn connects to a web console, where you can set up an account, configure the device, register its MAC ID, assign it an alias and set up its actions. All of the source files for the 1btn – firmware, enclosure, schematic, BOM, PCB layout and example use cases – are posted on his Github repository.

The HackadayPrize2016 is Sponsored by:

When Are 8 Bits More Than 32?

Whenever we write up a feature on a microcontroller or microcontroller project here on Hackaday, we inevitably get two diametrically opposed opinions in the comments. If the article featured an 8-bit microcontroller, an army of ARMies post that they would do it better, faster, stronger, and using less power on a 32-bit platform. They’re usually right. On the other hand, if the article involved a 32-bit processor or a single-board computer, the 8-bitters come out of the woodwork telling you that they could get the job done with an overclocked ATtiny85 running cycle-counted assembly. And some of you probably can. (We love you all!)

redblue_pillWhen beginners walk into this briar-patch by asking where to get started, it can be a little bewildering. The Arduino recommendation is pretty easy to make, because there’s a tremendous amount of newbie-friendly material available. And Arduino doesn’t necessarily mean AVR, but when it does, that’s not a bad choice due to the relatively flexible current sourcing and sinking of the part. You’re not going to lose your job by recommending Arduino, and it’s pretty hard to get the smoke out of one.

But these days when someone new to microcontrollers asks what path they should take, I’ve started to answer back with a question: how interested are you in learning about microcontrollers themselves versus learning about making projects that happen to use them? It’s like “blue pill or red pill”: the answer to this question sets a path, and I wouldn’t recommend the same thing to people who answered differently.

For people who just want to get stuff done, a library of easy-to-use firmware and a bunch of examples to crib learn from are paramount. My guess is that people who answer “get stuff done” are the 90%. And for these folks, I wouldn’t hesitate at all to recommend an Arduino variant — because the community support is excellent, and someone has written an add-on library for nearly every gizmo you’d want to attach. This is well-trodden ground, and it’s very often plug-and-play.

Continue reading “When Are 8 Bits More Than 32?”

Hackaday Links: November 8, 2015

[Burt Rutan] is someone who needs no introduction. Apparently, he likes the look of the Icon A5 and is working on his own version.

Earlier this week, the US Air Force lost a few satellites a minute after launch from Barking Sands in Hawaii. This was the first launch of the three stage, solid fueled SPARK rocket, although earlier versions were used to launch nuclear warheads into space. There are some great Army videos for these nuclear explosions in space, by the way.

[Alexandre] is working on an Arduino compatible board that has an integrated GSM module and WiFi chip. It’s called the Red Dragon, and that means he needs some really good board art. The finished product looks good in Eagle, and something we can’t wait to see back from the board house.

The Chippocolypse! Or however you spell it! TI is declaring a lot of chips EOL, and although this includes a lot of op-amps and other analog ephemera (PDF), the hi-fi community is reeling and a lot of people are stocking up on their favorite amplifiers.

[Jeremy] got tired of plugging jumper wires into a breadboard when programming his ATMega8 (including the ‘168 and ‘328) microcontrollers. The solution? A breadboard backpack that fits right over the IC. All the files are available, and the PCB can be found on Upverter.

In case you haven’t heard, we’re having a Super Conference in San Francisco later this week. Adafruit was kind enough to plug our plug for the con on Ask an Engineer last week.