Hacklet 28 – Programmable Logic Hacks

FPGAs, CPLDs, PALs, and GALs, Oh My! This week’s Hacklet focuses on some of the best Programmable Logic projects on Hackaday.io! Programmable logic devices tend to have a steep learning curve.  Not only is a new hacker learning complex parts, but there are entire new languages to learn – like VHDL or Verilog. Taking the plunge and jumping in to programmable logic is well worth it though. High-speed projects which would be impossible with microcontrollers are suddenly within reach!

fpga-hdmiA great example of this is [Tom McLeod’s] Cheap FPGA-based HDMI Experimenting Board. [Tom’s] goal was to create a board which could output 720p video via HDMI at a reasonable frame rate. He’s using a Xilinx Spartan 6 chip to do it, along with a handful of support components. The images will be stored on an SD card. [Tom] is hoping to do some video with the setup as well, but he has yet to see if the chip will be fast enough to handle video decoding while generating the HDMI data stream. [Tom] has been quiet on this project for a few months – so we’re hoping that either he will see this post and send an update, or that someone will pick up his source files and continue the project!

ardufpgaNext up is our own [technolomaniac] with his Arduino-Compatible FPGA Shield. Starting out with FPGAs can be difficult. [Technolomaniac] has made it a bit easier with this shield. Originally started as a project on .io and now available in The Hackaday Store, the shield features a Xilinx Spartan 6 FPGA. [Technolomaniac] made power and interfacing easy by including regulators and level shifters to keep the sensitive FPGA happy. Not sure where to start? Check out [Mike Szczys’] Spartan-6 FPGA Hello World! [Mike] takes us from installing Xilinx’s free tool chain to getting a “hello world” led blinker running!

lander3Still interested in learning about Programmable Logic, but not sure where to go? Check out [Bruce Land’s] Teaching FPGA parallel computing. Actually, check out everything [Bruce] has done on Hackaday.io – the man is a living legend, and a wealth of information on electronics and embedded systems. Being a professor of engineering at New York’s Cornell University doesn’t hurt either! In Teaching FPGA parallel computing, [Bruce] links to Cornell’s ECE 5760 class, which he instructs. The class uses an Altera/Terasic DE2 FPGA board to demonstrate parallel computing using programmable logic devices. Note that [Bruce] teaches this class using Verilog, so all you seasoned VHDL folks still can learn something new!

 

chamFinally, we have [Michael A. Morris] with Chameleon. Chameleon is an Arduino compatible FPGA board with a Xilinx Spartan 3A FPGA on-board. [Michael] designed Chameleon for two major purposes:  soft-core processors, and intelligent serial communications interface. On the processor side Chameleon really shines. [Michael] has implemented a 6502 core in his design. This means that it would be right at home as the core of a retrocomputing project. [Michael] is still hard at work on Chameleon, he’s recently gotten fig-FORTH 1.0 running! Nice work [Michael]!

Want more programmable logic goodness? Check out our Programmable Logic List!

That about wraps things up for this episode of The Hacklet! As always, see you next week. Same hack time, same hack channel, bringing you the best of Hackaday.io!

Prototyping With The ATMega1284P

While most people are moving onto ARMs and other high-spec microcontrollers, [Dave Cheney] is bucking the trend. Don’t worry, it’s for a good reason – he’s continuing work on one of those vintage CPU/microcontroller mashups that implement an entire vintage system in two chips.

While toying around with the project, he found the microcontroller he was using, the ATMega1284p, was actually pretty cool. It has eight times the RAM as the ever-popular 328p, and twice as much RAM as the ATMega2560p found in the Arduino Mega. With 128k of Flash, 4k of EEPROM, 32 IOs, and eight analog inputs, it really starts to look like the chip the Arduino should have been built around. Of course historical choices don’t matter, because [Dave] can just make his own 1284p prototyping board.

The board is laid out in Fritzing with just a few parts including a crystal, a few caps, an ISP connector, and pins for a serial connector. Not much, but that’s all you need for a prototyping board.

The bootloader is handled by [Maniacbug]’s Mighty 1284 Arduino Support Package. This only supports Arduino 1.0, not the newer 1.5 versions, but now [Dave] has a great little prototyping board that can be put together from perfboard and bare components in a few hours. It’s also a great tool to continue the development of [Dave]’s Apple I replica.

A Bluetooth Garage Door, Take Three

A few years ago, [Lou] came up with a pretty clever build to open his garage door with his phone. He simply took a Bluetooth headset, replaced the speaker with a transistor, and tied the transistor to a few wires coming out of his garage door opener. When the Bluetooth headset connected, the short beep coming from the speaker output opened the door.

The newest version of this build does away with the simple Bluetooth headset and replaces it with a Bluetooth 4.0 chip. The reason for this is that Apple and their walled garden of an App store would never allow a Samsung Bluetooth headset to be used with one of their iDevices.

The latest build is just about as simple as using a Bluetooth headset. A board that appears to use TI’s CC2540 chip is attached to the garage door opener with a few passives and a transistor. Pairing the new circuit with a phone is as simple as shorting a pair of pins, and the new iOS app does exactly what it should – opens a garage door at the press of a non-button.

While it’s not something that can be put together with scraps from a junk drawer, it’s still an extremely simple solution to opening a garage door with a phone. Video below.

Continue reading “A Bluetooth Garage Door, Take Three”

Amazon Echo Becomes A Better Home Automation Appliance

There’s a bright future ahead of us, filled with intelligent computerized assistants that will listen to everything we say and do our bidding. It’ll be like HAL from 2001: A Space Odyssey, but without unverified mission-critical software and a bunch of killing. Until then, we have a few Amazon Echo hacks that tease out a reasonably capable home automation system without a proper API.

This build was inspired by an earlier project that polled the to do list looking for key phrases. Saying, “Alexa, to do, lights on” would turn on an Internet-connected light bulb. Saying, “Alexa, to do, call home” would call a phone number set up with the ‘home’ keyword.

[Glen] has improved that earlier setup somewhat, mostly by getting rid of the requirement to say, ‘to do.’ The Git for the project still shows it’s exploiting the Amazon to do list, but this is a much cleaner build that should end up having a lot more possibilities.

So far, [Glen], or rather, Alexa, can control the temperature of the house through a Nest thermostat, the lighting of a room with a Phillips Hue light bulb, and other random tasks like playing an audio file through the speakers. Not bad, and something that really demonstrates the potential of a smart, connected home.

Controlling Nokia Phones With Arduino

While [Ilias Giechaskiel] was waiting for his SIM900 shield to arrive, he decided to see what he could do with an old Nokia 6310i and an Arduino. He was researching how to send automated SMS text messages for a home security project, and found it was possible to send AT commands via the headphone jack of Motorola phones. But unfortunately Nokia did not support this, as they use a protocol known as FBus. With little information to go on, [Ilias] was able to break down the complicated protocol and take control with his Arduino.

With the connections in place, [Ilias] was able to communicate with the Nokia phone using a program called Gnokii — a utility written specifically for controlling the phone with a computer. Using the Arduino as an intermediary, he was eventually able tap into the FBus and send SMS messages.

Be sure to check out his blog as [Ilias] goes into great detail on how Nokia’s FBus protocol works, and provides all source code needed to replicate his hack. There is also a video demonstration at the end showing the hack in action.

A Dev Board For The ESP Lua Interpreter

From the great minds behind the NodeMCU Lua interpreter for the ESP8266 comes a proper dev board for the WiFi platform of 2015. They are calling it, the NodeMCU-devkit, and it’s a reasonable, cheap, and breadboardable breakout board for the ESP8266.

The version of ESP8266 used in this project is the ESP-12, the newer, fancier model with RF shielding, a questionable FCC logo, and every single one of the GPIOs exposed on castellated connectors. The rest of the board is a USB to serial converter (the CH340G – probably the cheapest USB to serial chip out there), a few passives, and a USB micro connector. It’s simple, cheap, and open source. You can’t do better than that.

This dev board is explicitly designed to work with the NodeMCU firmware, a Lua-based firmware for the ESP. Already we’ve seen some projects make the Hackaday front page with this firmware. Sure, it’s just a garage door opener, but that’s extremely impressive for a chip that’s only a few months old.

Thanks [Baboon] for the tip.

What’s In A Name?

Take thirty seconds out of your day and try to make fun of the last name of the person who wrote this post. Go ahead, it’s okay. You probably won’t need more than ten seconds to come up with something that uses the same first, middle, and last letter. While nothing can be done to prevent last name-based harassment in the schoolyard, first names are another matter. [Ranthalion] recently dined with friends who are expecting twins and have yet to decide on names for them. It’s difficult enough to name one child, and we can imagine ourselves spending an entire day or two getting funny name pairs for twins out of our systems (Flora and Fauna, Scylla and Charybdis, &c). With the baby shower two weeks away, [Ranthalion] had to act fast in creating his Baby Namer.

It needed to be something he could make relatively cheaply with parts on hand. Although he made a prototype with an Arduino, he wasn’t about to just give one away. [Ranthalion]’s Baby Namer uses two arrays, one with awesome names like, well, Sharktooth Chompenstein, and one with regular names from census data such as Bob, Carol, Ted, and Alice. Things got a bit hairy with the volume of names he got from census data and he learned the value of PROGMEM for storing things.

On startup, it displays four names from the Awesome pile as a gag and then pulls from the Ho-Hum group. However, each time it pulls a regular name, there’s a 25% chance that part of an Awesome name will be included. Get thee to the gits and have a laugh at other names on the Awesome list.