Posts | Comments

Planet Arduino

Archive for the ‘ARM’ Category

We missed [iliasam’s] laser text projector when it first appeared, perhaps because the original article was in Russian. However, he recently reposted in English and it really caught our eye. You can see a short video of it in operation, below.

The projector uses raster scanning where the beam goes over each spot in a grid pattern. The design uses one laser from a cheap laser pointer and a salvaged mirror module from an old laser printer. The laser pointer diode turned out to be a bit weak, so a DVD laser was eventually put into service. A DVD motor also provides the vertical scan which is just a slight wobble of a mirror. A Blue Pill CPU provides all the smarts. You can find the code on GitHub.

The projector is fairly limited in size with a maximum resolution of 32×14. Some displays use a vector scheme that draws with the laser. This is brighter and more capable, but also more difficult to arrange since the laser has to move rapidly in a complex motion. The raster scanning is much easier to accomplish.

A light sensor tells the CPU when the laser is about to start hitting the vertical scan mirror. Obviously, there are other ways you could arrange for the mirrors to move, but the logic would be the same.

We’ve seen [illiasam] has a lot of interest in lasers. He’s hacked rangefinders and even 3D scanners that we’ve looked at before.

We always think that crossing the Atlantic in a blimp would be very serene — at least once they put heaters on board. The Hindenburg, the R-101, and the Shenandoah put an end to the age of the airship, at least for commercial passenger travel. But you can still fly your own with a helium balloon and some electronics. One notable project — the Blimpduino — has evolved into the Blimpduino 2. The open-source software is on GitHub. We couldn’t find the PCB layout, so we aren’t sure if it is or will be open. The 3D printed parts are available, though.

The PCB is the heart of the matter, a four-layer board with an ARM M0 processor, an ESP8266 WiFi module, four motor outputs, two motor outputs, a 9-axis inertial navigation system, an altimeter, and a forward object detection system. There’s also a battery charger onboard.

The standard set up uses three props: two for thrust and one for altitude. There’s a smartphone app and apparently, you can even have a copilot with a second phone. The lifting body is a mylar balloon with helium and they say the control is suitable even for a very large balloon. The altimeter data is from a time-of-flight sensor and there’s also a pressure transducer with temperature sensor if you want to measure higher altitudes.

We couldn’t embed the video, but there’s one of people flying the things through hoops on the website. You can, however, see a promotional video, below. As you might expect, payload capability is very low and so 3D printed parts have low infill and the board is made to be light.

Of course, our own [Sophi Kravitz] has been building her drone blimp army for some time and we are waiting for her attempt at world domination any day now. If you are in the mood for something lower tech, you can always rip apart a toy car and add your own balloon.

 

We’ve seen [Johan]’s AA-battery-sized Arduino/battery crossover before, but soon (we hope!) there will be a new version with more MIPS in the same unique form factor! The original Aarduino adhered to classic Arduino part choices and was designed to run as the third “cell” in a 3 cell battery holder to relay temperature readings via a HopeRF RFM69CW. But as [Johan] noticed, it turns out that ARM development tools are cheap now. In some cases very cheap and very open source. So why not update an outstanding design to something with a little more horsepower?

The Aarduino Zero uses the same big PTH battery terminals and follows the same pattern as the original design; the user sticks it in a battery holder for power and it uses an RFM69CW for wireless communication. But now the core is an STM32L052, a neat low power Cortex-M0+ with a little EEPROM onboard. [Johan] has also added a medium size serial flash to facilitate offline data logging or OTA firmware update. Plus there’s a slick new test fixture to go along with it all.

So how do you get one? Well… that’s the rub. It looks like when this was originally posted at the end of 2017 [Johan] was planning to launch a Crowd Supply campaign that hasn’t quite materialized yet. Until that launches the software sources for the Zero are available, and there are always the sources from the original Aarduino to check out.

Who owns Arduino? We don’t mean metaphorically — we’d say that’s the community of users and developers who’ve all contributed to this amazing hardware/software ecosystem. We mean literally. Whose chips are on the table? Whose money talks? It looks like it could be ARM!

The Arduino vs Arduino saga “ended” just under a year ago with an out-of-court settlement that created a private holding company part-owned by both parties in the prior dispute over the trademark. And then, [Banzi] and the original founders bought out [Musto]’s shares and took over. That much is known fact.

The murky thing about privately held companies and out-of-court settlements is that all of the details remain private, so we can only guess from outside. We can speculate, however, that buying out half of the Arduino AG wasn’t cheap, and that even pooling all of their resources together, the original founders just didn’t have the scratch to buy [Musto] out. Or as the Arduino website puts it, “In order to make [t]his a reality, we needed a partner that would provide us with the resources to regain full ownership of Arduino as a company… and Arm graciously agreed to support us to complete the operation.” That, and the rest of the Arduino blog post, sure looks like ARM provided some funds to buy back Arduino.

We reached out to [Massimo Banzi] for clarification and he replied:

“Hi arm did not buy nor invest in arduino. The founders + Fabio Violante still own the company. As I wrote in the blog post we are still independent, open source and cross platform.”

We frankly can’t make sense of these conflicting statements, at least regarding whether ARM did or didn’t contribute monetary resources to the deal. ARM has no press release on the deal as we write this.

Announcing a partnership without details isn’t a new activity for Arduino. Recently we wrote about open questions on the Arduino Foundation. [Banzi] was willing to speak with Hackaday at length about that topic, suggesting more details were just weeks away but we have yet to see follow-through on that.

What we can tell is that [Banzi] and Arduino want us to know that they’re still independent. The Arduino post mentions independence and autonomy eight times in a 428-word post. (The lady doth protest too much?) They’re very concerned that we don’t think that they’ve been snapped up by ARM.

And there’s also good reason to believe that Arduino will remain autonomous even if ARM owns a big stake. ARM sells its intellectual property to a number of silicon manufacturers, who then compete fiercely by offering different peripheral sets and power budgets, and they’re very serious about providing them all with a level playing field.

Anyway, the various ARM chips are nice to work with from a hacker perspective. If the AVR-based UNO was the last non-ARM Arduino board ever made, we’d only shed a tiny little tear. On the other hand, if you’re an MSP430 or PIC fanboy or fangirl, we wouldn’t be holding your breath for a light-blue board sporting your favorite silicon but that is just conjecture.

So we have seemingly conflicting information on the details of this deal, but also promises of openness and transparency. On one hand we’re pleased that ARM is the apparent silent partner, but on the other hand we’re left confused and wanting more. Who owns Arduino?


Filed under: Arduino Hacks, Business, Current Events, Featured, news

Dear Arduino Community,

Back in July, we announced that the original Arduino founders regained full control of Arduino as a company. It was the culmination of a project that lasted several months, which required a tremendous amount of effort in finding the right partner that could help us make it happen while keeping the spirit of Arduino true to itself.

Throughout the litigation we dreamed of reclaiming control of the company, bringing it back to its original principles while designing a strategy that would allow us to tackle the challenges of the contemporary IoT world.

In order to make his a reality, we needed a partner that would provide us with the resources to regain full ownership of Arduino as a company while keeping it independent and true to its values of openness.

It wasn’t easy, but more than a year ago, in the middle of the litigation, we started a conversation with an important technology company that is an essential building block of today’s digital world: Arm.

During a very hot day in spring I visited California to meet with Arm. It was a great meeting of minds and we determined that such a partnership was the right fit for us. Arm is an extremely innovative company whose processors can be found inside virtually every mobile device on the planet; but they don’t actually build silicon. Instead, they have created an ecosystem of a thousand-plus partners, some of whom compete with each other, but Arm works in harmony with all of them.

Arm recognized independence as a core value of Arduino. This was very important for us, as it meant full understanding of our need to work with multiple silicon vendors and architectures as long as they make sense for Arduino—without any lock-in with the Arm architecture.

Following the meeting with Arm, I was thrilled. I shared my excitement with our new CEO Fabio Violante and my cofounders: Arduino could again be 100% ours, with the help of a supportive partner that leaves complete autonomy to our team and our community.

We worked very hard for many months to make this happen, and Arm graciously agreed to support us to complete the operation.

What should you expect from us in the future? A stronger Arduino, free to innovate with more firepower, and plenty of enthusiasm for future challenges and opportunities.

We will continue to work with all technology vendors and architectures moving forward. We stay independent; we stay open, and we still provide the most loved microcontroller development platform that has changed the lives of so many people around the world.

If you use the Arduino IDE to program the ESP32, you might be interested in [Andreas Spiess’] latest video (see below). In it, he shows an example of using all three ESP32 UARTs from an Arduino program. He calls the third port “secret” although that’s really a misnomer. However, it does require a quick patch to the Arduino library to make it work.

Just gaining access to the additional UARTs isn’t hard. You simply use one of the additional serial port objects available. However, enabling UART 1 causes the ESP32 to crash! The reason is that by default, UART 1 uses the same pins as the ESP32 flash memory.

Luckily, the chip has a matrix switch that can put nearly any logical I/O pin on any physical I/O pin. [Andreas] shows how to modify the code, so that UART 1 maps to unused pins, which makes everything work. it is a simple change, replacing two parameters to a call that — among other things — maps the I/O pins. You could use the technique to relocate the UARTs to other places if you choose.

If you want to learn more about the ESP32, we covered a good set of tutorials for you to check out. Or if you just want a quick overview, you can start here.


Filed under: Arduino Hacks, ARM

[Micah Elizabeth Scott] needed a custom USB keyboard that wrapped around a post. She couldn’t find exactly what she wanted so she designed and printed it using flexible Nijaflex filament. You can see the design process and the result in the video below.

The electronics rely on a Teensy, which can emulate a USB keyboard easily. The keys themselves use the old resistor divider trick to allow one analog input on the Teensy to read multiple buttons. This was handy, but also minimized the wiring on the flexible PCB.

The board itself used Pyralux that was milled instead of etched. Most of the PCB artwork was done in KiCAD, other than the outline which was done in a more conventional CAD program.

We always enjoy seeing practical use of hacker-grade 3D printers. After all, there are only so many keychains you can make. Of course, you probably don’t need exactly this keyboard layout. But the techniques of creating the flexible PCB, printing the keypad itself and integrating everything with the electronics would be a great road map for any similar project.

As far as we can tell, the cat made no actual contribution to the final design. Unless you count inspiring flexibility, perhaps.

We’ve seen people make the actual PCBs using Pyralux and Ninjaflex as an etch resist if you don’t want to mill the boards. This isn’t the first time we’ve seen a Teensy pressed into keyboard controller service, either.

Thanks [Kyle] for the tip.


Filed under: 3d Printer hacks, Arduino Hacks, ARM

[Otermrelik] wanted to experiment with the Teensy audio library and adapter. That, combined with his 3D printer, led to a very cool looking build of the teensypolysynth. The device looks like a little mini soundboard with sliders and 3D printed knobs. You can see (and hear) it in the video below.

The Teensy audio library supports several output devices including several built-in options and external boards like the audio adapter used here. The library does CD-quality sound, supports polyphonic playback, recording, synthesis, mixing, and more.

Even more interesting is there is an audio design tool that runs in your web browser for building the audio portion of your code graphically. Even though it is in a browser, it isn’t tied back to a server so you can run the tool offline and you don’t have to worry about your world-changing audio design leaking out on the Internet. Browsing the tool is a good way to get a feel for just how much capability the library provides.

The tool can export code you add to your project and can import it again, too, if you need to make changes. Overall, it is very slick. Of course, the library does all the work, as you can see from this simple exported code:

#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>

// GUItool: begin automatically generated code
AudioSynthWaveform waveform1; //xy=344,303
AudioInputAnalog adc1; //xy=351,227
AudioMixer4 mixer1; //xy=485,230
AudioEffectFlange flange1; //xy=657,237
AudioFilterFIR fir1; //xy=804,233
AudioOutputAnalog dac1; //xy=947,227
AudioConnection patchCord1(waveform1, 0, mixer1, 3);
AudioConnection patchCord2(adc1, 0, mixer1, 0);
AudioConnection patchCord3(mixer1, flange1);
AudioConnection patchCord4(flange1, fir1);
AudioConnection patchCord5(fir1, dac1);
// GUItool: end automatically generated code

The build details are a little light, but between the code, the pictures, and the 3D printable files you can probably figure it out. Your layout might be a little different, but you’d probably want that anyway.

We’ve talked about the Teensy audio library before, and we are still impressed. If music synthesis isn’t your thing, don’t worry. You can’t help but love this voice changer.


Filed under: Arduino Hacks, ARM, musical hacks

If you’ve ever been curious if there’s a way to program microcontrollers without actually writing software, you might be interested in FlowCode. It isn’t a free product, but there is a free demo available. [Web learning] did a demo of programming a Nucleo board using the system. You can check it out below.

The product looks slick and it supports a dizzying number of processors ranging from AVR (yes, it will do Arduino), PIC, and ARM targets. However, the pricing can add up if you actually want to target all of those processors as you wind up paying for the CPU as well as components. For example, the non-commercial starter pack costs about $75 and supports a few popular processors and components like LEDs, PWM, rotary encoders, and so on.

Price aside, we have serious concerns about building applications with GUIs. It sounds seductive and for simple projects, it is easy and intuitive. However, complex problems get messy quickly when you have flowcharts. This is the same reason complex logic designs moved away from schematics — another form of graphical representation — and went to Verilog and VHDL.

Still, looking at how this is done might give you some ideas and it might be just the ticket for the right application. It isn’t the only graphical game in town, of course. There’s ArduBlock, for example. Another one we’ve looked at is MiniBloq. You can even use Scratch on the Arduino or Raspberry Pi.


Filed under: Arduino Hacks, ARM, Software Development

In a recent post, I talked about using the “Blue Pill” STM32 module with the Arduino IDE. I’m not a big fan of the Arduino IDE, but I will admit it is simple to use which makes it good for simple things.

I’m not a big fan of integrated development environments (IDE), in general. I’ve used plenty of them, especially when they are tightly tied to the tool I’m trying to use at the time. But when I’m not doing anything special, I tend to just write my code in emacs. Thinking about it, I suppose I really don’t mind an IDE if it has tools that actually help me. But if it is just a text editor and launches a few commands, I can do that from emacs or another editor of my choice. The chances that your favorite IDE is going to have as much editing capability and customization as emacs are close to zero. Even if you don’t like emacs, why learn another editor if there isn’t a clear benefit in doing so?

There are ways, of course, to use other tools with the Arduino and other frameworks and I decided to start looking at them. After all, how hard can it be to build Arduino code? If you want to jump straight to the punch line, you can check out the video, below.

Turns Out…

It turns out, the Arduino IDE does a lot more than providing a bare-bones editor and launching a few command line tools. It also manages a very convoluted build process. The build process joins a lot of your files together, adds headers based on what it thinks you are doing, and generally compiles one big file, unless you’ve expressly included .cpp or .c files in your build.

That means just copying your normal Arduino code (I hate to say sketch) doesn’t give you anything you can build with a normal compiler. While there are plenty of makefile-based solutions, there’s also a tool called PlatformIO that purports to be a general-purpose solution for building on lots of embedded platforms, including Arduino.

About PlatformIO

Although PlatformIO claims to be an IDE, it really is a plugin for the open source Atom editor. However, it also has plugins for a lot of other IDEs. Interestingly enough, it even supports emacs. I know not everyone appreciates emacs, so I decided to investigate some of the other options. I’m not talking about VIM, either.

I wound up experimenting with two IDEs: Atom and Microsoft Visual Studio Code. Since PlatformIO has their 2.0 version in preview, I decided to try it. You might be surprised that I’m using Microsoft’s Code tool. Surprisingly, it runs on Linux and supports many things through plugins, including an Arduino module and, of course, PlatformIO. It is even available as source under an MIT license. The two editors actually look a lot alike, as you can see.

PlatformIO supports a staggering number of boards ranging from Arduino to ESP82666 to mBed boards to Raspberry Pi. It also supports different frameworks and IDEs. If you are like me and just like to be at the command line, you can use PlatformIO Core which is command line-driven.

In fact, that’s one of the things you first notice about PlatformIO is that it can’t decide if it is a GUI tool or a command line tool. I suspect some of that is in the IDE choice, too. For example, with Code, you have to run the projection initialization tool in a shell prompt. Granted, you can open a shell inside Code, but it is still a command line. Even on the PlatformIO IDE (actually, Atom), changing the Blue Pill framework from Arduino to mBed requires opening an INI file and changing it. Setting the upload path for an FRDM-KL46 required the same sort of change.

Is it Easy?

Don’t get me wrong. I personally don’t mind editing a file or issuing a command from a prompt. However, it seems like this kind of tool will mostly appeal to someone who does. I like that the command line tools exist. But it does make it seem odd when some changes are done in a GUI and some are done from the command line.

That’s fixable, of course. However, I do have another complaint that I feel bad for voicing because I don’t have a better solution. PlatformIO does too much. In theory, that’s the strength of it. I can write my code and not care how the mBed libraries or written or the Arduino tools munge my source code. I don’t even have to set up a tool chain because PlatformIO downloads everything I need the first time I use it.

When that works it is really great. The problem is when it doesn’t. For example, on the older version of PlatformIO, I had trouble getting the mBed libraries to build for a different target. I dug around and found the issue but it wasn’t easy. Had I built the toolchain and been in control of the process, I would have known better how to troubleshoot.

In the end, too, you will have to troubleshoot. PlatformIO aims at moving targets. Every time the Arduino IDE or the mBed frameworks or anything else changes, there is a good chance it will break something. When it does, you are going to have to work to fix it until the developers fix it for you. If you can do that, it is a cost in time. But I suspect the people who will be most interested in PlatformIO will be least able to fix it when it breaks.

Bottom Line

If you want to experiment with a different way of building programs — and more importantly, a single way to create and build — you should give PlatformIO a spin. When it works, it works well. Here are a few links to get you started:

Bottom line, when it works, it works great. When it doesn’t it is painful. Should you use it? It is handy, there’s no doubt about that. The integration with Code is pretty minimal. The Atom integration — while not perfect — is much more seamless. However, if you learn to use the command line tools, it almost doesn’t matter. Use whatever editor you like, and I do like that. If you do use it, just hope it doesn’t break and maybe have a backup plan if it does.


Filed under: Arduino Hacks, ARM, Hackaday Columns, reviews, Skills


  • Newsletter

    Sign up for the PlanetArduino Newsletter, which delivers the most popular articles via e-mail to your inbox every week. Just fill in the information below and submit.

  • Like Us on Facebook