Posts | Comments

Planet Arduino

Archive for the ‘arduino hacks’ Category

Even if you wouldn’t describe yourself as a history buff, you’re likely familiar with the Enigma machine from World War II. This early electromechanical encryption device was used extensively by Nazi Germany to confound Allied attempts to eavesdrop on their communications, and the incredible effort put in by cryptologists such as Alan Turing to crack the coded messages it created before the end of the War has been the inspiration for several books and movies. But did you know that there were actually several offshoots of the “standard” Enigma?

For their entry into the 2019 Hackaday Prize, [Arduino Enigma] is looking to shine a little light on one of these unusual variants, the Enigma Z30. This “Baby Enigma” was intended for situations where only numerical data needed to be encoded. Looking a bit like a mechanical calculator, it dropped the German QWERTZ keyboard, and instead had ten buttons and ten lights numbered 0 through 9. If all you needed to do was send off numerical codes, the Z30 was a (relatively) small and lightweight alternative for the full Enigma machine.

Creating an open source hardware simulator of the Z30 posses a rather unique challenge. While you can’t exactly order the standard Enigma from Digi-Key, there are at least enough surviving examples that they’ve been thoroughly documented. But nobody even knew the Z30 existed until 2004, and even then, it wasn’t until 2015 that a surviving unit was actually discovered in Stockholm.

Of course, [Arduino Enigma] does have some experience with such matters. By modifying the work that was already done for full-scale Enigma simulation on the Arduino, it only took a few hours to design a custom PCB to hold an Arduino Nano, ten buttons with matching LEDs, and of course the hardware necessary for the iconic rotors along the top.

The Z30 simulator looks like it will make a fantastic desk toy and a great way to help visualize how the full-scale Enigma machine worked. With parts for the first prototypes already on order, it shouldn’t be too long before we get our first good look at this very unique historical recreation.

Even if you wouldn’t describe yourself as a history buff, you’re likely familiar with the Enigma machine from World War II. This early electromechanical encryption device was used extensively by Nazi Germany to confound Allied attempts to eavesdrop on their communications, and the incredible effort put in by cryptologists such as Alan Turing to crack the coded messages it created before the end of the War has been the inspiration for several books and movies. But did you know that there were actually several offshoots of the “standard” Enigma?

For their entry into the 2019 Hackaday Prize, [Arduino Enigma] is looking to shine a little light on one of these unusual variants, the Enigma Z30. This “Baby Enigma” was intended for situations where only numerical data needed to be encoded. Looking a bit like a mechanical calculator, it dropped the German QWERTZ keyboard, and instead had ten buttons and ten lights numbered 0 through 9. If all you needed to do was send off numerical codes, the Z30 was a (relatively) small and lightweight alternative for the full Enigma machine.

Creating an open source hardware simulator of the Z30 posses a rather unique challenge. While you can’t exactly order the standard Enigma from Digi-Key, there are at least enough surviving examples that they’ve been thoroughly documented. But nobody even knew the Z30 existed until 2004, and even then, it wasn’t until 2015 that a surviving unit was actually discovered in Stockholm.

Of course, [Arduino Enigma] does have some experience with such matters. By modifying the work that was already done for full-scale Enigma simulation on the Arduino, it only took a few hours to design a custom PCB to hold an Arduino Nano, ten buttons with matching LEDs, and of course the hardware necessary for the iconic rotors along the top.

The Z30 simulator looks like it will make a fantastic desk toy and a great way to help visualize how the full-scale Enigma machine worked. With parts for the first prototypes already on order, it shouldn’t be too long before we get our first good look at this very unique historical recreation.

[JBumstead] didn’t want an ordinary microscope. He wanted one that would show the big picture, and not just in a euphemistic sense, either. The problem though is one of resolution. The higher the resolution in an image — typically — the narrower the field of view given the same optics, which makes sense, right? The more you zoom in, the less area you can see. His solution was to create a microscope using a conventional camera and building a motion stage that would capture multiple high-resolution photographs. Then the multiple photos are stitched together into a single image. This allows his microscope to take a picture of a 90x60mm area with a resolution of about 15 μm. In theory, the resolution might be as good as 2 μm, but it is hard to measure the resolution accurately at that scale.

As an Arduino project, this isn’t that difficult. It’s akin to a plotter or an XY table for a 3D printer — just some stepper motors and linear motion hardware. However, the base needs to be very stable. We learned a lot about the optics side, though.

Two Nikon lenses and an aperture stop made from black posterboard formed a credible 3X magnification element. We also learned about numerical aperture and its relationship to depth of field.

One place the project could improve is in the software department. Once you’ve taken a slew of images, they need to blend together. It can be done manually, of course, but that’s no fun. There’s also a MATLAB script that attempts to automatically stitch the images together, blending the edges together. According to the author, the code needs some work to be totally reliable. There are also off-the-shelf stitching solutions, which might work better.

We’ve seen similar setups for imaging different things. We’ve even seen it applied to a vintage microscope.

We have had no shortage of clock projects over the years, and this one is entertaining because it spells the time out using Tetris-style blocks. The project looks good and is adaptable to different displays. The code is on GitHub and it relies on a Tetris library that has been updated to handle different displays and even ASCII text.

[Brian] wanted to use an ESP8266 development board for the clock, but the library has a bug that prevents it from working, so he used an ESP32 board instead. The board, a TinyPICO, has a breakout board that works well with the display.

There are also some 3D printed widgets for legs. If we’re honest, we’d say the project looks cool but the technology isn’t revolutionary. What we did find interesting though is that this is a good example of how open source builds on itself.

Of course, the library does a lot of the work, but according to [Brian] the it has several authors. [Tobias Bloom] started the code, and others have changed the library to draw ASCII characters and to support any display that uses the AdaFruit GFX-style library.

So while the code is simple, the result is impressive and is a result of [Brian] leveraging a lot of code from others — a great example of Open Source in action.

We looked at Brian’s use of this library for a YouTube subscription counter, but a clock has more universal appeal, we think — not everyone has a lot of YouTube subscribers. If you don’t have a life, you might try to recreate Tetris using the game of life.

Microcontroller demo boards such as the Arduino UNO are ubiquitous on Hackaday as the brains of many a project which inevitably does something impressive or unusual. Sometime someone builds a particularly tiny demo board, or an impressively large one. In the case of the board featured here, the Arduino is a gorgeous labor of love which can’t really be called a board since there is no PCB. Instead of the traditional fiberglass, [Jiří Praus] formed brass bars into the circuitry and held it together with solder.

This kind of dedication to a project leaves an impression. His notes show he saw the barest way to operate an ATMega328, built it, tested, and moved on to the power supply to make it self-sustaining, then onto the communication circuit, and finally the lights. The video below shows a fully-functional Arduino happily running the blink program. He plans to encase the brass portion in resin to toughen it up and presumably keep every bump from causing a short circuit. The components are in the same position due to a custom jig which means a standard shield will fit right into place.

The Arduino started far less flashy yet nearly as fragile, and it has grown. And shrunk.

The ArduBoy, as you might have guessed from the name, was designed as a love letter to the Nintendo Game Boy that many a hacker spent their formative years squinting at. While the open source handheld is far smaller than the classic DMG-01, it retains the same general form factor, monochromatic display, and even the iconic red LED to the left of the screen. But one thing it didn’t inherit from the original was the concept of removable game cartridges. That is, until now.

Over the last year, [Mr.Blinky] and a group of dedicated ArduBoy owners have been working on adding a removable cartridge to the diminutive handheld. On paper it seemed easy enough, just hang an external SPI flash chip off of the test pads that were already present on the ArduBoy PCB, but to turn that idea into a practical cartridge required an immense amount of work and discussion. The thread on the ArduBoy community forums covers everything from the ergonomics of the physical cartridge design to the development of a new bootloader that could handle loading multiple games.

Early cartridge prototypes.

The first problem the group had to address was how small the ArduBoy is: there’s simply no room in the back to add in a cartridge slot. So a large amount of time is spent proposing different ways of actually getting the theoretical cartridge attached to the system. There was some talk of entirely redesigning the case so it could take the cartridge internally (like the real Game Boy), but this eventually lost out for a less invasive approach that simply replaced the rear of the ArduBoy with a 3D printed plate that gave the modders enough room to add a male header along the top edge of the system.

As an added bonus, the cartridge connector doubles as an expansion port for the ArduBoy. While perfecting the design, various forum users have chimed in with different gadgets that make use of the new port, from WS2812B LEDs to additional input devices like joysticks or a full QWERTY keyboard. Even if you aren’t interested in expanding the storage space on your ArduBoy, being able to plug in new hardware modules certainly opens up some interesting possibilities.

In fact, the project so impressed ArduBoy creator [Kevin Bates] that he chimed in on the topic last month to announce he would start looking into integrating the community’s cartridge modification into the production hardware. If all goes well, pretty soon there might be an official upgrade path for those who want to expand what this tiny nostalgia machine is capable of.

[Thanks to Roo for the tip.]

The ArduBoy, as you might have guessed from the name, was designed as a love letter to the Nintendo Game Boy that many a hacker spent their formative years squinting at. While the open source handheld is far smaller than the classic DMG-01, it retains the same general form factor, monochromatic display, and even the iconic red LED to the left of the screen. But one thing it didn’t inherit from the original was the concept of removable game cartridges. That is, until now.

Over the last year, [Mr.Blinky] and a group of dedicated ArduBoy owners have been working on adding a removable cartridge to the diminutive handheld. On paper it seemed easy enough, just hang an external SPI flash chip off of the test pads that were already present on the ArduBoy PCB, but to turn that idea into a practical cartridge required an immense amount of work and discussion. The thread on the ArduBoy community forums covers everything from the ergonomics of the physical cartridge design to the development of a new bootloader that could handle loading multiple games.

Early cartridge prototypes.

The first problem the group had to address was how small the ArduBoy is: there’s simply no room in the back to add in a cartridge slot. So a large amount of time is spent proposing different ways of actually getting the theoretical cartridge attached to the system. There was some talk of entirely redesigning the case so it could take the cartridge internally (like the real Game Boy), but this eventually lost out for a less invasive approach that simply replaced the rear of the ArduBoy with a 3D printed plate that gave the modders enough room to add a male header along the top edge of the system.

As an added bonus, the cartridge connector doubles as an expansion port for the ArduBoy. While perfecting the design, various forum users have chimed in with different gadgets that make use of the new port, from WS2812B LEDs to additional input devices like joysticks or a full QWERTY keyboard. Even if you aren’t interested in expanding the storage space on your ArduBoy, being able to plug in new hardware modules certainly opens up some interesting possibilities.

In fact, the project so impressed ArduBoy creator [Kevin Bates] that he chimed in on the topic last month to announce he would start looking into integrating the community’s cartridge modification into the production hardware. If all goes well, pretty soon there might be an official upgrade path for those who want to expand what this tiny nostalgia machine is capable of.

[Thanks to Roo for the tip.]

Okay, we’ve just left May and stepped into June, why are we talking about Arduino Day — traditionally a March 16th event where makers congregate and share projects? I live in Ho Chi Minh City, and the event tends to take place in mid-May, but the enthusiasm and collaborative spirit are just as strong. Organized by the awesome local maker group Fablab Saigon with the venue provided by Intek Institute, there were some neat projects on display along with some talks from local companies.

The first thing that struck me about the event was how young the maker movement is here – most attendees were still in high school or early university. By contrast, I was 23 when I first learned to use AVR microcontrollers with assembly language (by the time Arduino started to get traction the boat effectively missed me). I couldn’t help but feel like a bit of a relic, at least until we all started talking excitedly about robots (I had brought a couple). It seems that geeking out about electronics is the great equalizer which knows no age limits.

Tesla Coils, Blinking Circuits, and Robot Races

Among the projects on display was this low-power Tesla coil, happily making small sparks, turning on CCFL bulbs in its immediate vicinity, and generating a bit of plasma too.

There was a learn to solder workshop for attendees to join in anytime and produce artful dead-bug style transistor multivibrator circuits.

Many of you will be familiar with the astable multivibrator circuit seen here as a popular introduction to electronics and soldering. But if you’re not, it’s a good place to start as you’ll learn about several different components, and the result has blinking lights… while leaving your Arduino free to be used in other projects! Someone had also brought in a bit of a show-and-tell on using GSM modules here.

Next there was a workshop where rover-style robots were built from a locally developed STEM education kit called GaraStem. Fundamentally, it’s a tacklebox filled with instructions, laser-cut chassis parts, an Arduino compatible board and sensors, and an Android control application for your smartphone. It looked easy and fun to work with, and I wish that STEM robot kits like this were available when I was a kid. I can’t help but feel a little jealous – all we had in my area when I was in high school was the occasional science fair!

Of course, any time more than one remote controlled robot is in the same place, a race is necessary and we got right to that. Entirely by coincidence, the floors were painted in a way that sort of looked like a racetrack.

Talks from Hardware Startups

Besides the projects and workshops, there was a track of talks from local companies on what they’ve been up to. One of them, called Indruino, designs their own Arduino boards for use in industrial environments, along with all the bells and whistles that requires. They had a good demo of a speed controller for a 3-phase motor, and talked about what they’ve done to make the platform suitable for industrial use.

At the very least, I could tell that their boards made ample use of optoisolators, secure connectors, and high quality shielded DC-DC converters. According to their pamphlet, they’ve already deployed in a number of factories, with industrial touchscreens and a freeze-drying system controller — not surprising as freeze dried foods is an industry that has really been taking off in Vietnam the last few years and designing what you can locally is a good move.

Vulcan Augmentics, a local startup that designs modular prosthetic limbs was there to present their work on practical human-machine interfaces. For a variety of reasons, there are quite a few amputees of all ages in Vietnam, and so any effort to better serve them is certainly appreciated. Unfortunately, their prosthetic limbs were either overseas or in use at the time, so I couldn’t examine the hardware. Nonetheless, it’s a nice example of how the skills we learn as a hobby can one day develop to the point where we can make a positive impact on another person’s life.

I presented some IoT use cases and demos, many of which I’ve written about here, along with some notes on the importance and implementation of security such as MQTT with either AES or TLS. I also talked about ways to define reliable failure states for IoT devices in case of loss of connectivity. While it’s an extreme example, you can’t have a large robot plow into a wall because the last command received before a connection loss was ‘go forward’! Of course, there exists the argument that we shouldn’t be connecting dangerous robots to the Internet frivolously in the first place, but it’s not very interesting and the lessons in control systems still apply. It was good fun and no robot, human, or architecture was harmed.

Chúc mừng sinh nhật Arduino!

Even the Cake was High Tech

At the end of the day, there was the requisite cake (strawberry jam). The local bakeries have something like a type of marzipan sheet that they can print on at a surprisingly good resolution, and the cake featured some pretty good imagery as a result.

The event wrapped up with a trivia competition, with some kits that had been donated as prizes for the highest scores.

Overall the sense of community at the event was strong, and despite the fairly high attendance it was well organized. My hat is off to Fablab Saigon for putting it together.

Historically, getting files on to a microcontroller device was a fraught process. You might have found yourself placing image data manually into arrays in code, or perhaps repeatedly swapping SD cards in and out. For select Arduino boards, that’s no longer a problem – thanks to the new TinyUSB library from Adafruit (Youtube link, embedded below).

The library is available on Github, and is compatible with SAMD21 and SAMD51 boards, as well as Nordic’s NRF52840. It allows the Arduino board to appear as a USB drive, and files can simply be dragged and dropped into place. The library can set up to use SPI flash, SD cards, or even internal chip memory as the storage medium.

Potential applications include images, audio files, fonts, or even configuration files. Future plans include porting the TinyUSB library to the ESP32-S2 as well. Being able to drag a settings file straight on to a board could make getting WiFi boards online much less of a hassle.

We’ve seen other nifty USB libraries before, VUSB is a great option if you need USB on your AVR microcontroller. Video after the break.

There’s nothing quite as annoying as duplicated effort. Having to jump through the same hoops over and over again is a perfect way to burn yourself out, and might even keep you from tackling the project that’s been floating around in the back of your mind. [Alain Mauer] found that he’d build enough Arduino gadgets that were similar enough he could save himself some time by creating a standardized piece of hardware that he can load his code du jour on.

He’s come to call this device the Arduino Nano QP (which stands for Quick Project), and now it’s part of the 2019 Hackaday Prize. [Alain] doesn’t promise that it’s the perfect fit for everything, but estimates around 85% of the simple Arduino projects that he’s come up with could be realized on QP. This is thanks to the screw terminals on the bottom of the device which let you easily hook up any hardware that’s not already on the board.

The QP board itself has the ubiquitous 16×2 character LCD display (complete with contrast control trimmer), seven tactile buttons arranged in a vaguely Game Boy style layout, and of course a spot to solder on your Arduino Nano. All of which is protected by a very slick laser cut acrylic case, complete with retained buttons and etched labels.

We’ve seen no shortage of handheld Arduino devices, but we have to admit, something about the utilitarian nature of this one has us intrigued. We wouldn’t mind having one of these laying around the lab next time we want to do a quick test.



  • 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