Monthly Archives: May 2021

A remote-controlled Arduino Nerf tank

via Arduino Blog

Arduino Nerf Tank

Makers love Nerf guns, but Nathan Li takes foam-based home security to a new level with his mini Nerf tank. Naturally there’s an Arduino Uno in there, powering the mobile dart launcher.

Scruffy lookin’ Nerf tank herder

This miniature roving robot, known as M.A.T. (Modular Arduino Tank), is beautifully built. Not only is it remarkably accurate, but the dart launching mechanism is a triumph of non-lethal weapon design.

Unlike the majority of Nerf mods out there, this tank doesn’t actually use any parts from a toy gun. Attached to the front of the dart turret is a pair of flywheel motors. These spin the flywheels in opposite directions, at a pretty fast rate. An arm mounted on a servo feeds a dart into the flywheels, which propel it at an impressive lick!

The next dart is gravity fed, and simply falls into place, making it quite a rapid firing micro tank.

Testing the tank

Li takes his tank through a series of batteries, all of which show impressive results. Accuracy is spot on, which isn’t easy with notoriously unreliable Nerf darts. A five-foot muzzle velocity test achieves a whopping 35MPH dart speed. The distance test sends foam projectiles an impressive 44 feet.

Then there’s a demonstration of some excellent grouping in the accuracy test.

It’s sparked up a whole conversation over on Reddit about how the firing mechanism can be modified. The flywheel thrower operates much like baseball launchers (and this dog toy, for example), which has really captured the maker community’s imagination. Shooting dried peas seems to be a popular idea. As does the idea of building in object detection for pest control.

The maker has shared his Arduino code on GitHub. You can also find the 3D print files and a build guide on Li’s website.

The post A remote-controlled Arduino Nerf tank appeared first on Arduino Blog.

Arduino Cloud now supports ESP32 devices

via Arduino Blog

Arduino Cloud now supports ESP32

Support for ESP32 devices is now available on the Arduino IoT Cloud. It’s a huge step forward in bringing IoT devices of all kinds together, and giving them a way to get connected, communicate with each other, and offer new levels of convenience and control.

A new world of IoT connectivity

Arduino’s been working on this for some time, and we’re really excited to introduced ESP32 support by including the Arduino Core developed by Espressif on the Arduino Cloud platform. This opens up cloud-connected projects to a whole new world of IoT devices, projects and possibilities. Web Editor is by far the most convenient way to program an ESP32, and to connect it and control it via a cloud platform.

Support for ESP8266 devices is already available, and was recently moved into the free Arduino Cloud tier. The addition of ESP32 boards, along with the wide range of Cloud-compatible Arduino devices, adds some serious power to a Cloud account.

It’s all about communication. There’s never been an easier way to program your boards, or implement device-to-device communication in IoT. Once your devices are hooked up to an IoT Cloud account, they can talk to each other, sync variables, share data and be combined into powerful dashboards. You even get seamless smartphone control through the Arduino IoT Remote apps. Or if you just want a simpler, easier way to program your ESP32 boards, the Arduino Cloud Web Editor makes it a walk in the park.

It’s the next step in making Arduino Cloud into a secure, ubiquitous platform for all connected devices. It’s still early days, but that’s where the community comes in. We want you guys to get on there, hook up your boards, and test the limits of what’s possible in Cloud-connected projects.

Connect Your ESP32 to the Cloud

There are only a couple of things you need to get an ESP32 board onto Arduino Cloud.

An account on the Arduino IoT Cloud, of course. You’ve got multiple options, so plenty of ways to tailor the subscription to exactly what you need. Get started with the free plan, and then just bump it up to the next level once you’re ready.

Arduino Cloud Plans

Grab the Arduino Create Agent, which runs in the background on your computer. It lets Arduino IoT Cloud detect and communicate with supported boards. It makes it a doddle to upload sketches from your web browser using the Web Editor IDE, as well as read and write data.

Note: It’s possible your computer might need drivers to recognize your ESP32 board on the serial port. If you’re having difficulties, check in with the board manufacturer to get the necessary drivers.

And then you’re good to go! Follow the Arduino IoT Cloud process just as you would with any other board. Create a device, select “ESP32 device”, and take note of your secret key during this setup process.

Your contribution and tests will really help to build on this exciting evolution of Arduino IoT Cloud. So we want to hear all about it. Join us over on the forum to share your experiences.

This is a great way to upgrade existing projects, home automation or other applications. It makes it so easy to take advantage of IoT Cloud’s powerhouse features. With almost no code, you can have any combination of Arduino, ESP8266 and ESP32 boards communicating and working together seamlessly and wirelessly. It’ll cut the time it takes to build adventurous new projects while expanding the possibilities and significantly reducing the legwork.

Once you’re in the Cloud, there’s no looking back!

The post Arduino Cloud now supports ESP32 devices appeared first on Arduino Blog.

A Barcode Scanner Darkly

via SparkFun: Commerce Blog

Welcome back, everyone! It's Friday and that means new products - this week we have six! Our new 2D Barcode Scanner Breakout is able to detect 20 different 1D and 2D codes and can connect via a simple USB-C interface. Next up, announced on Monday, we have Raspberry Pi's new PoE+ HAT available for pre-order. Last up this week, we have four new cables that can really improve your breadboard efficiency. Now, let's jump in and take a closer look!

Holy Star-Spangled Scanner, Batman!

SparkFun 2D Barcode Scanner Breakout

SparkFun 2D Barcode Scanner Breakout


The SparkFun 2D Barcode Scanner Breakout is a nifty little breakout board featuring the DE2120 barcode scanner module from DYScan. The DE2120 reads 20 different barcode symbologies (both 1D and 2D) using a camera coupled with on-board image processing to identify and decode everything from UPC codes to QR codes. The module also features two LEDs: one for illumination and one to project the red line that you're used to seeing from laser-based scanners.

Raspberry Pi PoE+ HAT

Raspberry Pi PoE+ HAT


The Raspberry Pi PoE+ HAT is designed to replace the existing Raspberry Pi PoE HAT in all new and existing designs. Like the original, the PoE+ HAT allows you to power your Raspberry Pi using Power over Ethernet networks. The PoE+ HAT meets all the requirements of the IEEE 802.3af (802.3at Type 1, PoE+) specifications. This ups the power the network can supply from 15.4 watts (PoE) to 25.5 Watts (PoE+) over CAT5 cable.

The Raspberry Pi PoE+ HAT is available for pre-order and does not include a Raspberry Pi. Orders are expected to be fulfilled by late June and in the order they are received.

Breadboard to GHR-05V Cable - 5-Pin x 1.25mm Pitch

Breadboard to GHR-05V Cable - 5-Pin x 1.25mm Pitch

Breadboard to GHR-06V Cable - 6-Pin x 1.25mm Pitch

Breadboard to GHR-06V Cable - 6-Pin x 1.25mm Pitch

Breadboard to JST-ZHR Cable - 4-pin x 1.5mm Pitch

Breadboard to JST-ZHR Cable - 4-pin x 1.5mm Pitch

Breadboard to JST-ZHR Cable - 6-pin x 1.5mm Pitch

Breadboard to JST-ZHR Cable - 6-pin x 1.5mm Pitch


We wrap up the day with these new breadboard-friendly JST cables. Whether you need a 5-pin, 1.25 mm pitch GHR-05V, 6-pin, 1.25 mm pitch GHR-06V, 4-pin, 1.5 mm pitch JST-ZHR, or 6-pin, 1.5 mm pitch JST-ZHR cable, we have you covered!

That's it for this week! As always, we can't wait to see what you make! Shoot us a tweet @sparkfun, or let us know on Instagram or Facebook. We’d love to see what projects you’ve made! Please be safe out there, be kind to one another, and we'll see you next week with even more new products!

Never miss a new product!

comments | comment feed

Raspberry Pi Pico-controlled model railroad

via Raspberry Pi

The Orient Express. The Flying Scotsman. Ivor the Engine. All juggernauts of the rail community, but none powered by our microcontroller and all, thus, inferior in our eyes. Raspberry Pi Pico has been used in cooler and more interesting ways every day since its launch in January this year, but this is the first time we’ve seen it powering a miniature railway. KushagraK7 shared this compact application on Instructables, and we ended up down a rabbit hole of model trains enthusiasm.

The Motor Channel on YouTube is a great community for miniature railway enthusiasts

What does Raspberry Pi Pico do here?

KushagraK7’s Raspberry Pi Pico controls the track voltage to control the speed of the train using pulse-width modulation (PWM). PWM is a method of reducing the average power delivered by an electrical signal. A motor driver powers the locomotive itself.

mini railroad build kit
Photo from KushagraK7’s Instructable

You gotta speed it up and then you gotta slow it down

This particular setup is designed to make the train start off slowly then speed up gradually each time it travels over a sensored segment of the track — that is, a segment equipped with an infrared sensor to detect whether a train is there. A therapeutic loop of the speeding-up process plays from this point in KushagraK7’s YouTube video.

sensored parts of train track
The ‘sensored’ part of the train track ready to be connected

Once the train reaches its top speed, it slows down again, coming to a complete halt after it passes the sensored track section once more. The train stops for a set amount of time, then starts up again. Fast, faster, slow, stop. Fast, faster, slow, stop. And on and on and on again. All without any human interaction needed – you can just watch. Super satisfying.


Learn how to make a low-cost sensored track “in minutes” with this previous Instructable from the maker

How do I build it?

KushagraK7 has created an illustrated step-by-step tutorial for other miniature railway enthusiasts to follow, including when you should tidy up your wires, plus ideas to tinker with the code to adjust speed and stopping patterns.

Point us to your Raspberry Pi-powered model railway projects in the comments. Choo choooooooo.

The post Raspberry Pi Pico-controlled model railroad appeared first on Raspberry Pi.

Wake Up to your Own Personalized IoT

via SparkFun: Commerce Blog

There are times when every original intention you had for a blog post winds up on the cutting room floor. This is one such post. It began simply enough - discuss the Internet of Things, create a project, share the project, eat some pie. But the further I got with my project, the deeper I dug, and the further down the rabbit hole I found myself.

The project idea is simple enough - make a device that listens for a keyword or wake word(s), and when it hears it, executes some simple code, sending a command to some other device. There are devices from major companies that do this, and millions of people have them, so why don’t I just buy one of those?

You’ve met me, right?


alt text
Of the three major players in the Smart Speaker market, guess which one is customizable...

For most people, there are three ways to verbally access the Internet of Things. You either say “hey Google,” “hey Siri,” or “Alexa”. But what if you want to change your wake word? Well, if you have a Nest Hub, you could change your wake word to “OK Google.” On an apple device you could switch from “hey Siri” to “OK Siri.” But what if you have an Amazon Echo? Well, the world’s your oyster my friend! You have the freedom to change your wake word to any word you choose, just as long as the word you choose to change it to is either “Amazon,” “Echo” or “computer.”

Now admittedly that last one is great if you want that Star Trek feel around your home, but none of these devices come anywhere near what I would call customizable. I want a device that allows me to set any wake word I want, or even any command word I want. None of this is going to be possible on any of the aforementioned devices, but with a Raspberry Pi and some Python code, you control the wake words, the control words, and pretty much any verbal input you want. Want the name of your estate to be a keyword? No problem. What about your favorite toy from when you were a kid? Or that classmate you had a crush on in third grade? It’s all possible now.

So many options

Having worked with Pete Warden at the ARM AIoT Dev Summit, presenting a session on building a Harry Potter-esque wand using TensorFlow Lite (back when we were traveling and attending events), I knew that chapter 7 of Pete’s book TinyML focused entirely on wake word detection. Having worked with TensorFlow, I also knew that it took quite a bit of time to train a model, and works best using multiple voices to gather audio samples for training.

TensorFlow definitely yields solid results, but I wanted something simpler and less time consuming, so I started hunting around. I knew that I could probably use a speech-to-text service like Google Speech-to-Text, Microsoft Azure Speech, or IBM Watson Speech to Text, but I didn’t want to have to worry about a streaming API. Further down the rabbit hole.

While I know there are more options, I looked into three wake word engines - PocketSphinx, Carnegie Mellon University's open source, large vocabulary, speaker-independent continuous speech recognition engine;’s hotword detector package Snowboy; and from, their wake-word engine Porcupine. All come with pros and cons, and here’s what I learned.

How much time (and how many friends) do you have?

For custom word recognition, training your model(s) will be compulsory, and can be incredibly time consuming. In CMU’s Sphinx training tutorial, they require a full hour of audio data for command and control usage by a single speaker. If your application is going to require command and control usage by multiple people, you’ll need five hours of audio data provided by two hundred separate speakers.

For Snowboy’s Hotword Creator, you only need five hundred of your closest friends to record three samples each. If I can’t muster two hundred people to help me build a wake word for PocketSphinx, chances are slim to none that I’ll be able to come up with two and a half times that many to help me out with Snowboy.

That leaves Porcupine. Apparently PicoVoice’s mantra seems to be “No friends? No problem!” The PicoVoice console simply asks you to type in a wake word phrase, choose a language from the four they offer (English, French, German or Spanish), and hit the “Train Wake Word” button. In about three hours you’ll receive an email letting you know that you can download your data set. However, even before it’s completed, you can test it on the console. I was amazed and how well and how quickly my phrase was recognized.

CPU usage

CPU usage varied quite a bit between the three engines. PocketSphinx, arguably the most flexible of the three, was also the hungriest. Snowboy sat on the high side of center, and Porcupine came in at just 12 percent of what PocketSphinx used.

alt text
When it comes to your wake word engine's CPU usage, less is definitely more.


What good is speech recognition if your speech isn’t being recognized? False positives and negatives greatly affect performance, and when benchmarked, the results also swung fairly broadly.

alt text
The lower the miss rate, the better (and more impressive) the final project.

Full disclosure, these findings were based on tests run by PicoVoice, so one might think that the results might be skewed, like drug side-effect studies paid for by the manufacturer of the drug. However, they are completely transparent in their methodology, and I was able to find comparable results when the engines were tested by Rhasspy.


Having been created in an educational setting, PocketSphinx is more than just a speech to text engine, it is a research system, so it will most likely continue to improve and expand. For an educational entity, it definitely should not be overlooked. As far as Snowboy is concerned, it is a decent engine, however, KItt.AI announced early last year that they would be shutting down all of their products as of December 31st, 2020. It remains in their Github repository, and can still be used and improved, but any support is now purely community-based. With it’s low CPU usage and extremely high accuracy, PicoVoice’s Porcupine is the engine I chose to use for my project. That being said, there are still some things to be aware of if you decide to use Porcupine for any IoT projects. First, you’ll need to create an account with PicoVoice. I know that there can be some aversion to that, but isn’t that what your Yahoo account is for? Then there’s the decision that comes with your account. PicoVoice offers two options for your account - you can create a Personal Account or an Enterprise Account. Speech models created with a Personal Account cannot be used for any commercial applications. This account type is designed for researchers, hobbyists, tinkerers, and educators. Additionally, wake words created with a Personal Account expire after thirty days. By contrast, an Enterprise Account allows for commercial use and distribution, and the wake words do not expire. However, if you’re a small startup or single-employee company, the $400/month (charged annually) might be a bit steep, but it is important to note that they do offer a “Startup Discount”.

alt text
Using the PicoVoice Console, you can create new wake words simply by typing them into the Phrase field.


After all of this digging and researching, I have to say I’m very happy with Porcupine as a wake word engine for my project. Oh right, my project… My IoT project blog post will have to wait for another day, but do stay tuned, as this potential money-making project, which is definitely not a cryptocurrency harvester, promises to be much more fun than training a custom wake word for five hours! And if a bit more research on the front end can yield a more efficient project on the back end, then I believe that it's time well spent.

comments | comment feed