Posts | Comments

Planet Arduino

We always think it is interesting that a regular DC motor and a generator are about the same thing. Sure, each is optimized for its purpose, but inefficiencies aside, you can use electricity to rotate a shaft or use a rotating shaft to generate electricity. [Andriyf1] has a slightly different trick. He shows how to use a stepper motor as an encoder. You can see a video of the setup below.

It makes sense. If the coils in the stepper can move the shaft, then moving the shaft should induce a current in the coils. He does note that at slow speeds you can miss pulses, however. Again, the device isn’t really optimized for this type of operation.

The circuit uses an opamp-based differential amplifier to read the pulses from the coil. Two opamps on two coils produce a quadrature signal just like a normal encoder. When the shaft turns in one direction, one pulse will lead the other. In the other direction, the lead pulse will be reversed.

There’s code to let an Arduino read the pulses, but we were disappointed it was behind a Patreon paywall. However, there’s plenty of code that will read quadrature on an Arduino or other processors, and that really isn’t the point of the post, anyway. We’ve seen similar hacks done with hard drive motors which are quite similar, by the way.

Once upon a time, there was a music venue/artist collective/effects pedal company that helped redefine industry in Williamsburg, Brooklyn. That place was called Death By Audio. In 2014, it suffered a death by gentrification when Vice Media bought the building that DBA had worked so hard to transform. From the ashes rose the Death By Audio Arcade, which showcases DIY pinball cabinets made by indie artists.

Their most recent creation is called A Place To Bury Strangers (APTBS). It’s built on a 1959 Gottlieb Mademoiselle table and themed around a local noise/shoegaze band of the same name that was deeply connected to Death By Audio. According to [Mark Kleeb], this table is an homage to APTBS’s whiz-bang pinball-like performance style of total sensory overload. Hardly a sense is spared when playing this table, which features strobe lights, black lights, video and audio clips of APTBS, and a fog machine. Yeah.

[Mark] picked up this project from a friend, who had already cut some wires and started hacking on it. Nearly every bit of the table’s guts had to be upgraded with OEM parts or else replaced entirely. Now there’s a Teensy running the bumpers, and another Teensy on the switches. An Arduino drives the NeoPixel strips that light up the playfield, and a second Uno displays the score on those sweet VFD tubes. All four micros are tied together with Python and a Raspi 3.

If you’re anywhere near NYC, you can play the glow-in-the-dark ball yourself on July 15th at Le Poisson Rouge. If not, don’t flip—just nudge that break to see her in action. Did we mention there’s a strobe light? Consider yourself warned.

Want to get into DIY pinball on a smaller scale? Build yourself a sandbox and start playing.

Ultrasonic sensors are great tools for measuring linear distance or object presence. As shown in this experiment by “lingib,” two sensors can also be combined to determine not just linear distance to a sensor, but its position in an X/Y plane.

For his experiment, he hooked two of these units up to an Arduino Uno at a known distance from each other, with one emitter blanked out with masking tape. The non-blanked emitter pulses an ultrasonic signal, which is bounced back to it as well as the second sensor by the measured object. From the time it takes to receive the return signal, distance to each sensor can be inferred, giving a triangle with each side known. Trigonometry is then used to pinpoint the item’s position, and a Processing sketch displays coordinates on lingib’s computer.

This Instructable explains how to pinpoint the location of an object using an Arduino, two ultrasonic sensors, and Heron’s formula for triangles. There are no moving parts.

Heron’s formula allows you to calculate the area of any triangle for which all sides are known. Once you know the area of a triangle, you are then able to calculate the position of a single object (relative to a known baseline) using trigonometry and Pythagoras.

The accuracy is excellent. Large detection areas are possible using commonly available HC-SR04, or HY-SRF05, ultrasonic sensors.

Construction is simple … all you require is a sharp knife, two drills, a soldering iron, and a wood saw.

We’re all familiar with the experience of buying hobby servos. The market is awash with cheap clones which have inflated specs and poor performance. Even branded servos often fail to deliver, and sometimes you just can’t get the required torque or speed from the small form factor of the typical hobby servo.

Enter [James Bruton] and his DIY RC servo from a windscreen wiper motor. Windscreen wiper motors are cheap as chips, and a classic salvage. The motor shaft is connected to a potentiometer via a pulley and some string, providing the necessary closed-loop feedback. Instead of using the traditional analog circuitry found inside a servo, an Arduino provides the brains. This means PID control can be implemented on the ‘duino, and tuned to get the best response from different load characteristics. There’s also the choice of different interfacing options: though [James]’ Arduino code accepts PWM signals for a drop-in R/C servo replacement, the addition of a microcontroller means many other input signal types and protocols are available. In fact, we recently wrote about serial bus servos and their numerous advantages.

We particularly love this because of the price barrier of industrial servomotors; sure, this kind of solution doesn’t have the precision or torque that off-the-shelf products provide, but would be sufficient for many hacks. Incidentally, this is what inspired one of our favourite open source projects: ODrive, which focuses on harnessing the power of cheap brushless motors for industrial use.

Morse code may not be as widely used as in its heyday, but it still certainly has its adherents. One avid user is Tanya Finlayson, who has been using this as her method of communication for roughly 40 years. Now, with the Gboard phone keyboard supporting input via dots and dashes, the world of Android computing has been opened up to her as well.

In order to get button presses to the phone, Ken Finlayson used an Arduino Leonardo to read inputs from a trio of buttons, indicating dot, dash, and mode select. The third button allows for phone navigation in addition to text input. Because of its built-in HID capabilities via the ATmega32U4 chip, the Leonardo is a great choice for this application, demonstrated in the video below. 

Many people cannot use keyboards and touchscreens to control their digital devices. Instead, they use custom hardware switches that emulate typing, swiping, and tapping. The Android operating system provides software that allows these switches to control Android devices, and recently Google provided a new Morse Keyboard within the Gboard keyboard for people who find this method easier for text entry.

This experiment is a DIY hardware adapter that enables assistive tech developers to connect existing switch based input systems to their Android device. Once connected, 2 switch assistive systems (with an additional switch for mode switching) can control both the standard Android accessibility functions as well as text entry through Morse on Gboard.

This experiment is built using Arduino and is compatible with most standard assistive 2 switch systems with 1/8” mono outputs.

Cultural probes aim to elicit unique responses by asking people to respond to a question, many times in the form of a photograph. While disposable cameras once worked quite nicely for this purpose, their relative rarity today meant a new digital alternative was needed. For this, Interaction Research Studio came up with a series of ProbeTools cameras that anyone can make and customize.

The most basic type in this series of cameras is known as the TaskCam, which features a 3D-printed frame and an Arduino Uno at its core. A shield with several snap-off sections provides user interface, including a trio of buttons, and a display that shows questions that are read off of a micro SD card. Users then respond to queries with photographs, saved with the corresponding question for future analysis.

TaskCams recreate the proven Cultural Probe technique of relabelling disposable cameras with requests for pictures. The 3D Printed TaskCam is the basic workhorse of the collection, robust and flexible enough to use across multiple studies.

The 3D Printed TaskCam has a small screen on the back that shows a scrollable list of requests for pictures.  Researchers can load their own list of requests onto the camera to prepare for a study. When users take a picture, the image is tagged with the current request, and stored on a standard flash drive that can be removed for downloading.

The casing for the 3D Printed TaskCam can be printed successfully without support materials even on low-end printers. The device requires a custom Arduino shield,  buy online at cost price, or follow the open-source plans to make yourself. Smart power management mean that two AA batteries provide more than enough power for an entire user study.

You can find more details on ProbeTools here, as well as in Designboom’s recent article. 

Infrared certainly has its uses, but if you’re trying to locate objects, ultrasonic detection is far superior. It’s contact-less, undetectable to the human ear, and it isn’t affected by smoke, dust, ambient light, or Silly String.

If you have one ultrasonic sensor and a microcontroller, you can detect plenty of useful things, like the water level in a rain barrel or the distance traveled by a tablet along a rail. If you have two sensors and a microcontroller, you can pinpoint any object within a defined range using trigonometry.

[lingib]’s dual sensor echo locator uses two HY-SRF05s, but the cheap and plentiful HC-SR04s will work, too. Both sensors are arranged for maximum beam overlap and wired up to an Arduino Uno. One sensor’s emitter is blocked with masking tape, so all it does is listen.

When the system registers the object, it shows up as a red dot on a grid inside a Processing sketch along with a bunch of details like the object’s coordinates, its distance from each sensor, and the area of the triangle formed by the two sensors and the object. [lingib] reports that the system is quite accurate and will work for much larger playgrounds than the 1 meter square in the demo after the break.

Don’t want to detect objects? Ultrasonic sensors are cheap enough to hack into other things, like this one-way data communications module.

Thanks for the tip, [Setvir].

As spotted here, Sam Izdat decided to make a preamplifier for a friend who provides voice talent for audiobooks and the like. The primary audio circuitry for the build is provided by a purchased PCB based on the INA217 chip from TI, but from there things get a bit more interesting.

To complete the project, Izdat added a tiny Arduino-powered OLED display. This shows a VU meter, along with a variety of other animations, seen through a window in the enclosure made from a broken wristwatch. 

The device was prototyped using an Arduino Uno, while a Nano was embedded in the final product, allowing everything to fit into the unique compartmentalized enclosure that he constructed.

The amplifier is based on the Texas Instruments INA217 chip, with an Arduino Nano and 128×64 OLED display providing the visualization. [Sam] was able to find a bare PCB for a typical INA217 implementation on eBay for a few bucks (see what we mean?), which helped get him started and allowed him to spend more time on the software side of things. His visualization code offers a number of interesting display modes, uses Fast Hartley Transforms, and very nearly maxes out the Arduino.

While the STAR, or Sprawl Turned Autonomous Robot, is more than capable of traveling over obstacles with its three-pointed wheels, it can also make itself thin enough to simply slide under others as needed. This clever design uses an Arduino Pro Mini for control, and normally moves around like a tank, rolling on six wheels that are turned by two motors.

When the task calls for it to go under something, a third motor cranks these wheels to nearly parallel with the floor, shrinking the robot down to a very slim profile—so thin, in fact, that it can actually slide under a door as seen in the video below! 

Print files and more information on the build can be found here, while the original paper upon which this robot is based is also available.

Father’s Day 2018 has come and gone, but it’s never too early to start planning for next year. As seen here, Michael Teeuw decided to build a clock out of three analog voltmeters for his dad in 2017. After getting sidetracked last year, he was finally able to complete it on time for 2018!

Teeuw’s clock features a trio of indicators, properly scaled and labeled for hours, minutes, and seconds, with control via an Arduino Nano, along with an RTC module for accurate timekeeping. Each indicator is housed in its own 3D-printed module, with white LEDs added for visibility. 

If you’d like to build your own, Teeuw’s code is available on GitHub and the 3D print files can be found on Thingiverse.



  • 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