Using Arduino For Quadcopter Spectrum Analyzers

First-person-view (FPV) flying, by adding a camera, video transmitter, and video goggles to the meat on the ground, is one of the best ways to experience remote-controlled flight. For just a few hundred dollars, it’s the closest thing you’re going to get to growing wings and flying through the trees of your local park. One of the most popular and cheapest ways to go about this is the Boscam RX5808 wireless receiver – a $9 module able to pull down video from an aircraft over 5.8GHz radio. Stock, this radio module is just okay, but with a few modifications, it can be turned into a very good receiver with a spectrum analyzer and autoscan.

The Boscam RX5808 has three DIP switches to allow for eight different channels for receiving video, and this is where most RC hobbyists stop. But the module also has a very capable SPI interface, and by adding a simple Arduino, the complete capabilities of this receiver can be unlocked.

The core software for the build is [markohoepken]’s rx5808-pro and rx5808_pro_osd, and [crazyheea]’s rx5808-pro-diversity to enable all the capabilities available in the RX5808 receiver. With an off-the-shelf LCD, this mess of wires and boards turns into an auto-scanning spectrum analyzer that’s also able to put video from a drone onto a screen.

[garagedrone] put together a very complete demo video of the entire build. You can check that out below.

Continue reading “Using Arduino For Quadcopter Spectrum Analyzers”

Lego Technic of the Past Eliminates Apple ][ with Arduino and Touchscreen

[JAC_101], the Director of Legal Evil Emeritus for LVL1 Hackerspace (don’t ask me, it’s their title system), was challenged to a hacking duel. It all started years ago. The person who is now president of LVL1, visited the space for the first time and brought with her a discarded Apple II controller for Lego bricks which had previously belonged to her father. Excited to test it, the space found that, unfortunately, LVL1’s Apple II wouldn’t boot. An argument ensued, probably some trash talking, and [JAC_101] left with the challenge: Could he build an Arduino interface for the Apple II Lego controller quicker than the hackerspace could fix its Apple II?”

Other things that belonged to people's fathers.
Other things that belonged to people’s fathers.

In the end, a concentrated force by one hacker over two years overcame the collective ADHD of many. He began by opening the interface to look inside, a completely unnecessary step since he found it was already thoroughly documented. Next he forgot about the project for a year. Then he remembered it, and built an interface for an Arduino Uno to hook to the controller and wrote a library for the interface. Realizing that sending serial commands was not in line with the original friendly intention of the device, he added a graphical display to the project; which allowed the user to control the panel with touch. In the end he won the challenge and LVL1 still doesn’t have a working Apple II. We assume some gloating occurred. Some videos of it in action after the break.

Continue reading “Lego Technic of the Past Eliminates Apple ][ with Arduino and Touchscreen”

Running Calculus on an Arduino

It was Stardate 2267. A mysterious life form known as Redjac possessed the computer system of the USS Enterprise. Being well versed in both computer operations and mathematics, [Spock] instructed the computer to compute pi to the last digit. “…the value of pi is a transcendental figure without resolution” he would say. The task of computing pi presents to the computer an infinite process. The computer would have to work on the task forever, eventually forcing the Redjac out.

Calculus relies on infinite processes. And the Arduino is a (single thread) computer. So the idea of zeno_03running a calculus function on an Arduino presents a seemingly impossible scenario. In this article, we’re going to explore the idea of using derivative like techniques with a microcontroller. Let us be reminded that the derivative provides an instantaneous rate of change. Getting an instantaneous rate of change when the function is known is easy. However, when you’re working with a microcontroller and varying analog data without a known function, it’s not so easy. Our goal will be to get an average rate of change of the data. And since a microcontroller is many orders of magnitude faster than the rate of change of the incoming data, we can calculate the average rate of change over very small time intervals. Our work will be based on the fact that the average rate of change and instantaneous rate of change are the same over short time intervals.

Continue reading “Running Calculus on an Arduino”

Federico Musto of Arduino SRL Shows Us New Products and New Directions

Recently, we sat down with [Federico Musto], CEO of Arduino SRL, for a chat about how the Italian Arduino firm was doing, what new products and projects they’ve got in the hopper, and what they’ve been up to for the last six months or so. It was high time!

Boards

The big story from our meeting, that [Federico] actually hinted at before, is the release of the Uno WiFi. How many projects have you seen on Hackaday that are based on an Arduino Uno with an ESP8266 WiFi module plugged into it? A bazillion. The Uno and ESP8266 are like the peanut butter and jelly of the last few years’ hacker zeitgeist.

Uno WiFi

arduino-uno-wifiThe Uno WiFi, then, is the Goober Grape (not an endorsement, you consume this stuff at your own risk). Less poetically put, Arduino has soldered the ESP8266 onto the Arduino Uno for you: no fiddling around with modules and pin-headers necessary. It’s not a ground-breaking innovation, but this is the kind of smart, community-led development that we like to see. You wanted cheap and easy WiFi on your Arduino? You got it.

Indeed, since the Arduino Yun came out, a lot of hackers were using it as a simple way to get their Arduino onto a wireless network: IoT and all that. When the ESP8266 hit the scene, many thought that the Yun looked dead in the water: with the ESP chip, you could get WiFi on your Arduino for half the price. But some folks need the extra power, or would rather just program in Python. Think of all the simple IoT projects based on the Raspberry Pi, for instance.

With the addition of the Uno WiFi, both the simple IoT devices and the more demanding applications can stay within the Arduino family. Go with the Uno WiFi if you want something networked but simple that the standard AVR ATmega328 processor can handle easily. If you actually need the extra computational power and flexibility of an embedded Linux distribution in addition to the ATmega, go for the Yun. If the ATmega isn’t cutting it, or if you need more power or peripherals from the microcontroller side, the new Tian board with its ARM Cortex-M0+ will fit the bill. It’s actually a compelling range of products even if they are superficially similar.

Tian

DSCF8150Which brings us to the Tian. The Arduino Tian is a neat new board, in our opinion. It’s got an integrated MIPS processor with 2.4 and 5GHz WiFi on board, as well as being able to do Bluetooth and Bluetooth LE. It runs faster than the Yun by a bit, and it’s got 4 GB of eMMC memory on-board so you don’t have to fool around with an external SD card as you do with the Yun or fruit-pastry Linux single-board computers.

We can’t decide if the Tian (or the Yun, for that matter) is a microcontroller with a Linux computer tacked on, or a Linux computer with a microcontroller to handle GPIO. Most of the applications that we’ve seen fit in with the former. We’d like to see more development on the Linux side, à la Raspberry Pi. In that light, we’re glad to see Arduino SRL continuing work on their Ciao library to help streamline communication between the microcontroller and the Linux box.

DSCF8151One of the cool tricks that [Federico] showed with the Tian was the ability to control the Linux computer from the Cortex M0+ microcontroller. As you can see in this prototype, only a few green wires (and some hot glue) were needed to make it work. The production version of the Tian should have this functionality built in.

As a demonstration, we SSH’ed into the Linux side of the Tian and pressed a button connected to the M0+ microcontroller.

The Linux side shut down gracefully, and we later booted it back up again. This is a particularly cool trick because the Linux side, with its fast processor and WiFi, is a power hog. The M0+ and its associated circuitry, on the other hand, run on very little power and can be throttled back into sleep mode when not crunching numbers. Although the boot-up time for the Linux side means that you wouldn’t be turning it on an off every few minutes, the ability to get the combined system into a low-power state for longer periods of time vastly increases the scope of projects where the Tian would be useful. Cute hack.

The Tian has only been available for about a month now. Have any of you tried one out?

Other Boards

DSCF8149[Federico] also showed us the Lei, which is a China-only Arduino board that combines the Tian’s Linux side with the Atmel ATmega part from the Yun, and has no onboard memory. It’s a cheaper hybrid between the two boards that [Federico] said wasn’t worth getting FCC certified for the US and the rest of the world. With the Yun and the Tian being so broadly similar already, we think that he’s probably right.

What the newest revision of the Yun, the Tian, and even the Lei have in common is that the microcontroller’s USB pins have been broken out to headers so that it could more easily be used as a standalone USB device. This gives even the cheapest boards in the family three ways to connect to USB — device mode through the microcontroller, and both host mode and USB OTG mode also through the Linux side. And it also enables shields, like this GSM shield below, to connect up to the microcontroller over USB. (Although the headers weren’t populated in this photo.)

DSCF8145This photo also shows a cute touch in the physical design of all of the Arduino SRL boards. All of the pinouts are labelled on the side of the female headers. Although we’re sure that you diehard Arduino fans out there can tell your A0 from your A5 in your sleep, we think it’s great not to have to go running back to the datasheet to double-check.

And finally, [Federico] showed me some of the new development they’ve been making on the Industrial and the Industrial 101 demonstration board. The Industrial is essentially the same Linux side as in the Yun, just in a smaller stand-alone package. Pairing this up with the Industrial 101 board, with its ATmega32u4 gives you essentially a Yun, but with a few more pinouts. We’re not yet sure what to make of the module-style packages that we’ve seen from many firms of late — we think that they’re too fidgety for hobbyists, and easy enough to DIY for a firm that’s producing tens of thousands of units. We could easily be wrong.

Anyway, the fun part about the Industrial 101 board was showing off all of the special shields that Arduino SRL has designed to go along with them. Here’s an OLED screen and joystick combo, for instance.

Free Stuff

If you’re interested in the Uno WiFi, you should probably check out the Arduino Christmas Challenge that’s going on through January 31st. If you enter a project on GitHub and register with Arduino, you stand a decent chance of winning a free Uno WiFi in January. (For what it’s worth, Arduino LLC and Microsoft are doing something similar. We’re not picking sides, just pointing out how to get free boards.)

IDE Developments

dl38We’d seen the new(ish) Arduino Studio development environment before, but it only just now made sense to us. Sure, it’s great to have a better editor than the old Java-based one. We’ve all been whining about the lack of code completion and so forth. The new editor environment, based on Adobe’s open-source Brackets editor is a huge step forward. But we’ve got a further direction that we’d like to see Arduino SRL take this, and the fact that the new editor is written in client-side Javascript is a big help.

The Yun, the Tian, and the China-only Lei boards all feature an OpenWRT-based Linux distribution onboard as well as WiFi connectivity. They also managed to get the entire GCC compilation chain compiling natively on the MIPS cores. It shouldn’t be too much more work to get a cross-compiler for the microcontroller up and running on the Arduino’s Linux side. Once that happens, you could compile and flash code onto the microcontroller entirely from within the Yun or Tian. Add in a nice, browser-based graphical editor, and you have a recipe for a self-contained development environment.

os.jsAnd [Federico] demoed some more tricks that point obliquely toward this future of Arduino-hosted Arduino development: we connected over the public Internet to an Arduino Yun in their R&D labs in Sicily that was serving an Arduino-branded version of OS.js, an “operating system” written in Javascript that runs in the client’s browser. Coupling something like OS.js to their Javascript-based Studio, running a cross-compiler on the Arduino’s Linux side would put the last pieces together to enable you to write, debug, and flash microcontroller projects completely on the Yun or Tian, without installing anything on your laptop other than a browser. The Arduino could become its own self-contained toolchain. How neat would that be? We hope we’re right.

Foundation and Stores

After months of legal work and lining up partners, Arduino SRL recently announced the formation of the Arduino Foundation. The Foundation is a non-profit that aims to give out Arduino boards and materials to schools and communities that might not have the resources to do so themselves, and also simply to give back to the Arduino community. In fact, the Uno WiFi Christmas challenge we mentioned above is sponsored by the Foundation.

manifestinoWe’d like to see the Foundation figure out how to reward the people who wrote popular Arduino libraries. In our mind, the success of Arduino is largely due to the enthusiastic and talented pool of coders who’ve written diverse libraries that support every kind of hardware peripheral known to man. There’s a million projects out there that simply use a Dallas one-wire temperature sensor or an RFM12B radio, and every one of them owes the coders who wrote the initial libraries a big debt. It’d be neat if the Arduino Foundation could find a way to pay some of this debt back. And from talking with [Federico], paying the community back is one of their main goals.

Arduino SRL has also thought about how to connect up better with the people making hardware that goes along with their boards — the shield-makers out there. [Federico] said that they’d open up their first brick-and-mortar Arduino store in Berlin any day now. The plan is to have a section of the store dedicated to community projects, giving the people who make shields and other add-ons a place to have their wares seen and sold. It’s also a clever way for the Arduino company to connect closer with the people who are doing the most innovative work in the Arduino ecosystem, so we think it’s a win all around.

And finally, we couldn’t talk Arduino without asking about the legal situation. Although everyone’s lawyers have been busy, [Federico] told me that there’s not much news on the trademark court cases since the last time we talked.

In Italy, and presumably the rest of the world outside of the USA, it’s all over but the shouting. It looks very likely that the court will rule for Arduino SRL, because Italy and Europe has a very straightforward trademark law — the company to file first essentially gets the trademark. And that was Arduino SRL.

Only in the USA is the situation more complicated, both because Arduino LLC filed first, and because it’s possible that Arduino SRL will demonstrate that they were producing boards with the Arduino name on them before Arduino LLC was even incorporated. We’re not lawyers, but this case certainly looks like it could go either way to us. And the US case is not likely to be settled until the summer of 2016, though, so don’t hold your breath.

Wrapup

Maybe 2015 will be remembered as the year of the dueling Arduinos, but we’re hopeful that instead it will be remembered as a year in which a bunch of new and improved Arduino hardware got released. From Arduino LLC, we’ve seen further collaborations with Intel. Arduino SRL has stayed true to their Linux and WiFi roots, coming out with the Tian, Industrial, and the Uno WiFi and continuing work on their operating system and the microcontroller interfacing. All in all, it’s been a good year for Arduino.

We’ve already hinted at some of what we’d like to see on the Arduino scene next year. What do you want to see for 2016?

Better 3D Graphics On The Arduino

There are cheap LCDs available from China, and when plugged into an Arduino, these displays serve as useful interfaces or even shinier baubles for your latest project. [Michael] picked up a few of these displays in the hope of putting a few animated .GIFs on them. This is an impossible task with an ATMega microcontroller – the Arduino does not have the RAM or the processing power to play full-screen animations. It is possible to display 3D vector graphics, with an updated graphics library [Michael] wrote.

The display in question uses the ILI9341 LCD driver, found in the Adafruit library, and an optimized 3D graphics driver. Both of these drivers have noticeable flicker when the animation updates, caused by the delay between erasing a previous frame and when a new frame is drawn.

With 16-bit color and a resolution of 320×240 pixels, there simply isn’t enough memory or the processing power on an ATMega microcontroller to render anything in the time it takes to display a single frame. There isn’t enough memory to render off-screen, either. To solve this problem, [Michael] built his render library to only render pixels that are different from the previous frame.

Rendering in 3D presents its own problems, with convex surfaces that can overlap themselves. To fix this, [Michael]’s library renders objects from front to back – if the pixel doesn’t change, it doesn’t need to be rendered. This automatically handles occlusions.

In a demo application, [Michael]’s LCD and Arduino can display the Stanford bunny, a low-poly 3D face, and geometric object. It’s not a video game yet, but [Michael] thinks he can port the classic game Spectre to this platform and have it run at a decent frame rate.

Video of the demo below.

Continue reading “Better 3D Graphics On The Arduino”

Code Craft-Embedding C++: Hacking the Arduino Software Environment

The Arduino software environment, including the IDE, libraries, and general approach, are geared toward education. It’s meant as a way to introduce embedded development to newbies. This is a great concept but it falls short when more serious development or more advanced education is required. I keep wrestling with how to address this. One way is by using Eclipse with the Arduino Plug-in. That provides a professional development environment, at least.

The code base for the Arduino is another frustration. Bluntly, the use of setup() and loop() with main() being hidden really bugs me. The mixture of C and C++ in libraries and examples is another irritation. There is enough C++ being used that it makes sense it should be the standard. Plus a good portion of the library code could be a lot better. At this point fixing this would be a monumental task requiring many dedicated developers to do the rewrite. But there are a some things that can be done so let’s see a couple possibilities and how they would be used.

Continue reading “Code Craft-Embedding C++: Hacking the Arduino Software Environment”

Christmas Bauble is neither spherical nor runs Arduino

[Jordan Wills] was tasked by his company, Silicon Labs, to build some Christmas Baubles to give away to co-workers. While the commissioned units were designed to be simple battery and LED affairs, he decided to make one of his own with bells and whistles. His Mario themed Christmas Ornament uses a Silicon Labs FM972 micro controller, capacitive sensing, PWM controlled 8 bit audio, and blinky lights.

The interesting part is some of the construction techniques that he used. The finger-joint style cube is built from circuit boards. Electrical connections between panels were routed using solder wicking copper braid. That’s a interesting trick which we’ll keep in mind along with some of our favorite creative structural uses of PCB.

The top of the cube has four LED’s which light up the Mario “Question Mark” symbols on the four sides of the cube while the base contains all of the electronics. The outside of the base piece was a large copper plane to act as the capacitive sensing element. This meant all electronics needed to be surface mounted with tracks laid out on one side – which posed some layout challenges. Adding the Capacitive sense function was a cinch thanks to support from the in-house design team. PWM output from the micro controller takes care of audio, and the output is routed through a buffer to boost the signal. A bandpass filter then cleans up the PWM output before feeding it to the speaker.

Continue reading “Christmas Bauble is neither spherical nor runs Arduino”