Arduino And FPGA Done Differently

FPGA guru [Max Maxfield] recently took a look at the XLR8 (pronounced accelerate) board from a company called Alorium. On the surface, it looks like another Arduino UNO clone. But instead of a CPU, it contains an Intel MAX10 FPGA that runs a softcore AVR processor. Of course, that’s only part of the story. If the board was just a mock Arduino using an FPGA, that’s not very interesting for practical purposes. However, by incorporating accelerator blocks or XBs, you can add FPGA modules to the soft CPU. [Max] shows an example that you can see in the video below where an FPGA block controls servos more easily than a standard Arduino. There’s also a version that looks like an Arduino Nano, but can clock much faster as well as use the XBs.

In addition to prebuilt XBs, there is a workflow to build your own if you are familiar with working with FPGAs. The products aren’t exactly new, but we enjoyed [Max’s] take on the product. We also appreciated the simple code examples showing exactly how you would convert a program to use the accelerated functions. Continue reading “Arduino And FPGA Done Differently”

Arduino Serial Vs SerialUSB

[Andrew] wonders why the SerialUSB() function on the Cortex M3-based Arduino Due is so much faster than Serial() on the Uno or Nano, and shares his observations in this short video. He sets up an experiment with a simple sketch on both boards and uses Wireshark to evaluate the results.

Data is sent in the USB packets in groups of four characters on the ATmega-based boards, but the entire string is put in a packet on the Due board. If you look under the hood, the answer is hiding in plain sight. While the Arduino family of boards connect to your computer using a USB virtual serial port, the ATmega ones have an actual serial connection on-board. For instance, on the Nano there is an FT232RL between the USB connector and the microprocessor (on an Arduino Uno board, a small ATMEGA8U2 is used instead of an FTDI chip, but the concept is the same). On the Arduino Due, the USB connects directly to the SAM3X8E processor.

This concept doesn’t apply only to Arduino boards, of course. On any serial connection between two computers, when a virtual USB device is used on both sides of the link (no actual serial signals involved), the serial baud rate is a fictional thing — data transfer speeds depends on USB alone. We are curious why the packets contain four characters in [Andrew]’s ATmega Wireshark captures — why not 1, 2, or 10? Is this something that can be controlled by the programmer, or is it fixed by the protocol and/or the FTDI chip? If you have the answer, let us know in the comments below. Continue reading “Arduino Serial Vs SerialUSB”

Negative Reinforcement: Drill Bits Edition

In theory, it’s fun to have a lot of toys tools around, but the sad reality is that it’s only as fun as the organization level applied. Take it from someone who finds organization itself thrilling: it really doesn’t matter how many bits and bobs you have, as long as there’s a place for everything and you put away your toys at the end of the day.

[Cranktown City] is always leaving drill bits lying around instead of putting them back in their bit set boxes. Since he responds well to yelling, he decided to build an intelligent drill bit storage system that berates him if he takes one out and doesn’t put it back within ten minutes.

But [Cranktown City] did much more than that. The system is housed in a really nice DIY stand that supports his new milling and drilling machine and has space to hold a certain type of ubiquitous red tool box beneath the drill bits drawer.

All the bits now sit in a 3D-printed index that fits the width of the drawer. [Cranktown City] tried to use daisy-chained pairs of screws as contacts behind each bit that could tell whether the bit was home or not, but too much resistance interfered with the signal. He ended up using a tiny limit switch behind each bit instead. If any bit is removed, the input signal from the index goes low, and this triggers the Arduino Nano to do two things: it lights up a strip of red LEDs behind the beautiful cut out letters on the drawer’s lip, and it starts counting upward. Every ten minutes that one or more bits are missing, the drawer complains and issues ad hominem attacks. Check out the demo and build video after the break, but not until you put your tools away. (Have you learned nothing?)

Okay, so how do you deal with thousands of jumbled drill bits? Calipers and a Python script oughta do it.

Continue reading “Negative Reinforcement: Drill Bits Edition”

Planetary Escape (-Room In A Box)

The trick to a fun escape room is layers. For [doktorinjh]’s Spacecase, you start with an enigmatic aluminum briefcase and a NASA drawstring backpack. A gamemaster reads the intro speech to set the mood, and you’re ready to start your escape from the planet. The first layer is the backpack with puzzles you need to solve to get into the briefcase. In there, you discover a hidden compartment and enough sci-fi references to put goofy smiles on our faces. We love to see tools reused as they are in one early puzzle, you use a UV LED to reveal a hidden message, but that light also illuminates puzzle clues later.

All the tech in Spacecase makes it a wonder of mixed media. The physical layer has laser engraved wood featuring the font from the 1975 NASA logo, buttons, knobs, LEDs, toggle switches, and a servo. Beneath the visible faceplate is an RGB sensor, audio player, speaker, and at the center is an Arduino MEGA. We’d love to get our hands on Spacecase for a game, and we’re inspired to pull out all the stops and build games with our personal touches. Maybe something with a mousetrap.

This isn’t the first escape room hardware we’ve seen and [doktorinjh] similarly made a bomb diffusing defusing game.

Continue reading “Planetary Escape (-Room In A Box)”

Running 57 Threads At Once On The Arduino Uno

When one thinks of the Arduino Uno, one thinks of a capable 8-bit microcontroller platform that nonetheless doesn’t set the world alight with its performance. Unlike more modern parts like the ESP32, it has just a single core and no real multitasking abilities. But what if one wanted to run many threads on an Uno all at once? [Adam] whipped up some code to do just that.

Threads are useful for when you have multiple jobs that need to be done at the same time without interfering with each other. The magic of [Adam]’s ThreadHandler library is that it’s designed to run many threads and do so in real time, with priority management as well. On the Arduino Uno, certainly no speed demon, it can run up to 57 threads concurrently at 6ms intervals with a minumum timing error of 556 µs and a maximum of 952 µs. With a more reasonable number of 7 threads, the minimum error drops to just 120 µs.  Each thread comes with an estimated overhead of 1.3% CPU load and 26 bytes of RAM usage.

While we struggle to think of what we could do with more than a handful of threads on an Arduino Uno, we’re sure you might have some ideas – sound off in the comments. ThreadHandler is available for your perusal here, and runs on SAMD21 boards as well as any AVR-based boards that are compatible with TimerOne. We’ve seen other work in the same space before, such as ChibiOS for the Arduino platform. Video after the break.

Continue reading “Running 57 Threads At Once On The Arduino Uno”

Supersized Weather Station Uses Antique Analog Meters

For most of us, getting weather information is as trivial as unlocking a smartphone or turning on a computer and pointing an app or browser at one’s weather site of choice. This is all well and good, but it lacks a certain panache that old weather stations had with their analog dials and stained wood cases. The weather station that [BuildComics] created marries both this antique aesthetic with modern weather data availability, and then dials it up a notch for this enormous analog weather station build.

The weather station uses 16 discrete dials, each modified with a different label for the specific type of data displayed. Some of them needed new glass, and others also needed coils to be modified to be driven with a lower current than they were designed as well, since each would be driven by one of two Arduinos in this project. Each are tied to a microcontroller output via a potentiometer which controls the needle’s position for the wildly different designs of meter. The microcontrollers themselves get weather information from a combination of real-world sensors outside the home of [BuildComics] and from the internet, which allows for about as up-to-date information about the weather as one could gather first-hand.

The amount of customization of these old meters is impressive, and what’s even more impressive is the project’s final weight. [BuildComics] reports that it took two people just to lift it onto the wall mount, which is not surprising given the amount of iron in some of these old analog meters. And, although not as common in the real world anymore, these old antique meters have plenty of repurposed uses beyond weather stations as well.

Continue reading “Supersized Weather Station Uses Antique Analog Meters”

Arduino Micro Pushes Animal Crossing’s Buttons

Repetitive tasks in video games often find a way of pushing our buttons. [Facelesstech] got tired of mashing “A” while catching shooting stars in Animal Crossing, so he set out to automate his problem away. After briefly considering rigging up a servo to do the work for him, he recalled a previous effort that used an Arduino Teensy to automate a bowling mini-game in Zelda: Breath of the Wild and decided to use a microcontroller to catch stars for him.

[Facelesstech] programmed an Arduino Pro Micro to fake controller button presses. It starts with a couple of presses to identify itself to the Switch, before generating an endless stream of button presses that automatically catch every shooting star. Hooking it up is easy—an on-the-go adapter allows the Switch’s USB-C port to connect directly to the Arduino’s Micro-USB port, even supplying power!

[Facelesstech] also designed a compact 3D-printed case that packages up the Arduino Pro Micro along with an ISP header for easy updating. The case even lets the Arduino’s power LED shine through so you know that it’s working!

If you, too, need to automate video game button-pushing, [Facelesstech] has kindly uploaded the source code and 3D designs for you to try. If you’d prefer something a little more low-tech, perhaps you might try a mechanical button pusher.

Continue reading “Arduino Micro Pushes Animal Crossing’s Buttons”