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?”

Tiny USB Morse Code Beacon

It is reasonably easy to make a microcontroller spit out some Morse code. What makes [pavlin’s] take on this project interesting is that it resides on a tiny USB board with an ARM processor. The design for the board is available with single-sided artwork suitable for production using simple methods like toner transfer.

The STM device has a built-in USB bootloader. It can also act as a serial port, which makes the project very simple. The only external parts are a speaker and an optoisolator. The program provides a command line interface over the serial port that you can use to program the message and set other options like speed and the delay between messages. The code is available on GitHub.

You might argue that a beacon shouldn’t need a USB port, and we’ve seen an alternative that fits the bill. If you want a much larger Arduino-based keyer, we’ve seen those, too.

Back to the Drawing Board

Ever try signing your name with a mouse or a trackball? Not so easy. You could buy a graphics tablet with a pen. [Rahul Ramakrishnan] has a different approach. He took two 10-turn pots, and attached some strings and a washer. A pencil goes through the washer, and a BeagleBone Black reads the pots to determine what it is drawing on the paper. A couple of retractable badge lanyards keep tension on the string.

This ingenious design would be easy enough to replicate with any microcontroller that can read the two pots. The only awkward part is the need to press a button down when you want the device to treat the pencil as down (see the video below). It would probably be easy to rig up some switch on the pencil to make operation a little smoother.

Continue reading “Back to the Drawing Board”

Pi Zero Video Card Via Bare Metal Programming

Rolling your own synthesizer is no small feat, which is what [Thomas] has taken on with his project “Nerdsynth”. [Thomas] has an impressive amount of data on his site covering the overall design and progress of the project, but that isn’t what piqued our interest. [Thomas] has an on-board TFT display to navigate the versatile Nerdsynth’s menu nerdsynth-sketchbut he wanted to add video output to  do some video sequencing. After some investigation and poking around the available options he decided to tackle yet another sub-project (textbook scope-creep).

[Thomas] chose to do to some bare metal programming on the Pi Zero to use it as a video card for video output. By following a tutorial  from Valvers and modifying an SPI driver from Microelecroniki he was able to clone the video on an external monitor. This is a step in the right direction and we’ll have to keep an eye on his site for updates about video sequencing on the external display.

You can check out a recent demo of the Nerdsynth in action after the break, sadly you’ll have to settle for a pic of the cloned screen (below) until [Thomas] posts another update.

nerdsynth_tv-942x707

Continue reading “Pi Zero Video Card Via Bare Metal Programming”

PS/2 Keyboard for Raspberry Pi

A lot of people can bake a cake. Sort of. Most of us can bake a cake if we have a cake mix. Making a cake from scratch is a different proposition. Sure, you know it is possible, but in real life, most of us just get a box of cake mix. The Raspberry Pi isn’t a cake (or even a pie), but you could make the same observation about it. You know the Raspberry Pi is just an ARM computer, you could program it without running an available operating system, but realistically you won’t. This is what makes it fun to watch those that are taking on this challenge.

[Deater] is writing his own Pi operating system and he faced a daunting problem: keyboard input. Usually, you plug a USB keyboard into the Pi (or a hub connected to the Pi). But this only works because of the Linux USB stack and drivers exist. That’s a lot of code to get working just to get simple keyboard input working for testing and debugging. That’s why [Deater] created a PS/2 keyboard interface for the Pi.

Even if you aren’t writing your own OS, you might find it useful to use a PS/2 keyboard to free up a USB port, or maybe you want to connect that beautiful Model-M keyboard without a USB adapter. The PS/2 keyboard uses a relatively simple clock and data protocol that is well-understood. The only real issue is converting the 5V PS/2 signals to 3.3V for the Pi (and vice versa, of course).

Continue reading “PS/2 Keyboard for Raspberry Pi”

Introducing the BeagleBone Blue

The BeagleBone is a board that doesn’t get a lot of attention in a world of $5 Raspberry Pis, $8 single board computers based on router chipsets, and a dizzying array of Kickstarter projects promising Android and Linux on tiny credit card-sized single board computers. That doesn’t mean the BeagleBone still isn’t evolving, as evidenced by the recent announcement of the BeagleBone Blue.

The BeagleBone Blue is the latest board in the BeagleBone family, introduced last week at CES. The Blue is the result of a collaboration between UCSD Engineering and TI, and with that comes a BeagleBone built for one specific purpose: robotics and autonomous vehicles. With a suite of sensors very useful for robotics and a supported software stack ideal for robots and drones, the BeagleBone Blue is the perfect board for all kinds of robots.

On board the BeagleBone Blue is a 2 cell LiPo charger with cell balancing and a 6-16 V charger input. The board also comes with eight 6V servo outputs, four DC motor outputs and inputs for four quadrature encoders. Sensors include a nine axis IMU and barometer. Unlike all previous BeagleBones, the BeagleBone Blue also comes with wireless networking: 802.11bgn, Bluetooth 4.0 and BLE. USB 2.0 client and host ports are also included.

Like all of the recent BeagleBoards, including the recently released BeagleBone Green, the Blue uses the same AM3358 1 GHz ARM Cortex 8 CPU, features 512 MB of DDR3 RAM, 4GB of on board Flash, and features the main selling point of the BeagleBoard, two 32-bit programmable real-time units (PRUs) running at 200 MHz. The PRUs are what give the BeagleBone the ability to blink pins and control peripherals faster than any other single board Linux computer, and are extremely useful in robotics, the Blue’s target use.

Right now, the BeagleBone Blue isn’t available, although we do know you’ll be able to buy one this summer. Information on pricing and availability – as well as a few demos – will come in February.

Zedboard Multiport Ethernet

The Zedboard uses Xilinx’s Zynq, which is a combination ARM CPU and FPGA. [Jeff Johnson] recently posted an excellent two-part tutorial covering using a Zedboard with multiple Ethernet ports. The lwIP (light-weight Internet Protocol) stack takes care of the software end.

Vivado is Xilinx’s software for configuring the Zynq (among other chips), and the tutorial shows you how to use it. The Ethernet PHY is an FPGA Mezzanine Card (FMC) with four ports that is commercially available. The project uses VHDL, but there is no VHDL coding involved, just the use of canned components.

The real issue when using an FPGA and a CPU is the interface between the processor and the FPGA circuitry. In this case, the ARM standard AXI bus does this task, and the Ethernet component properly interfaces to that bus. The IP application in the second part of the post is an echo server.

We’ve seen the Zynq used in flying machines and also in a music synthesizer. Although this project doesn’t use any Verilog or VHDL that you create, it is still a great example of configuring using Vivado and using common components in a design.