Posts | Comments

Planet Arduino

Archive for the ‘Adafruit Feather’ Category

Recently [Imran Haque]’s family bought the quite popular Peloton bike. After his initial skepticism melted to a quiet enthusiasm, [Imran] felt his hacker curiosity begin to probe the head unit on the bike. Which despite being a lightly skinned android tablet, has a reputation for being rather locked down. The Peloton bike will happily collect data such as heart rate from other devices but is rather reticent to broadcast any data it generates such as cadence and power. [Imran] set out to decode and liberate the Peleton’s data by creating a device he has dubbed PeloMon. He credits the inspiration for his journey to another hacker who connected a Raspberry Pi to their bricked exercise bike.

As a first step, [Imran] step began with decoding the TRRS connector that connects the bike to the head unit. With the help of a multi-meter and a logic analyzer, two 19200bps 8N1 RS-323 channels (TX and RX) were identified. Once the basic transport layer was established, he next set to work decoding the packets. By plotting the bytes in the packets and applying deductive reasoning, a rough spec was defined. The head unit requested updates every 100ms and the bike responded with cadence, power, and resistance data depending on the request type (the head unit did a round-robin through the three data types).

Once the protocol was decoded, the next step for [Imran] was to code up an emulator. It seems a strange decision to write an emulator for a device with a simple protocol, but the reasoning is quite sound. It avoids a 20-minute bike ride every time a code change needs to be tested. [Imran] wrote both an event-driven and a timing-accurate emulator. The former runs on the same board as the PeloMon and the latter runs on a separate board (an Arduino).

The hardware chosen for the PeloMon was an Adafruit Feather 32u4 Bluefruit LE. It was chosen for supporting Bluetooth LE as well as having onboard EEPROM. A level shifter allows the microcontroller to talk directly to the RS-323 on the bike. After a few pull requests to the Adafruit Bluetooth libraries and a fair bit of head-banging, [Imran] has code that advertises two Bluetooth services, one for speed and another for power. A Bluetooth serial console is also included for debugging without having to pull the circuit out.

The code, schematics, emulators, and research notes are all available on GitHub.

With little more than an Arduino, an OLED display, and some buttons, it’s easy to build your own faux-retro game system. There’s even a growing library of titles out there that target this specific combination of hardware, thanks in no small part to the Arduboy project. But unless you’re content to play Circuit Dude on a breadboard, at some point you’ll probably want to wrap the build up in a more convenient form.

Like many that came before it, the OLED handheld created by [Alex Zidros] takes inspiration from a Nintendo product; but it’s not the Game Boy. Instead, his design is based on a 3D printed grip for the Switch Joy-Cons that he found on Thingiverse. After tacking on a holder for the PCB, he had the makings of a rather unique system.

We especially like the offset SSD1306 OLED display. Not because we think a game system with an asymmetrical layout is a particularly sound design decision, but because it gives the whole build a rather cyberpunk feel. When combined with the exposed electronics, the whole system looks like it could have been cobbled together from a futuristic dumpster. Which is high praise, as far as we’re concerned.

Opposite the display is a LiPo pouch battery that [Alex] says was liberated from a portable speaker, and down below is an Adafruit Feather 328P. There are two tactile switches mounted to the front of the Feather, and in something of a departure from these sort of builds, there are two more on the shoulders of the 3D printed case. Everything is held together with nothing more exotic than a scrap of perfboard, making it easy for anyone who might want to build their own version.

If you prefer your Arduino and OLED gaming to come in a slightly more familiar form factor, the build that was done inside of a Dreamcast Visual Memory Unit (VMU) has always been a favorite around these parts.

Considering their hardware specification, graphing calculators surely feel like an anachronism in 2019. There are plenty of apps and other software available for that nowadays, and despite all preaching by our teachers, we actually do carry calculators with us every day. On the other hand, never underestimate the power of muscle memory when using physical knobs and buttons instead of touch screen or mouse input. [epostkastl] combined the best of both worlds and turned his broken HP-48 into a Bluetooth LE keyboard to get the real feel with its emulated counterpart.

Initially implemented as USB device, [epostkastl] opted for a wireless version this time, and connected an nRF52 based Adafruit Feather board to the HP-48’s conveniently exposed button matrix pins. For the software emulation side, he uses the Emu48, an open source HP calculator emulator for Windows and Android. The great thing about Emu84 is that it supports fully customizable mappings of regular keyboard events to the emulated buttons, so you can easily map, say, the cosine button to the [C] key. The rest is straight forward: scanning the button matrix detects button presses, maps them to a key event, and sends it as a BLE HID event to the receiving side running Emu84.

As this turns [epostkastl]’s HP-48 essentially into a regular wireless keyboard in a compact package — albeit with a layout that outshines every QWERTY vs Dvorak debate. It can of course also find alternative use cases, for examples as media center remote control, or a shortcut keyboard. After all, we’ve seen the latter one built as stomp boxes and from finger training devices before, so why not a calculator?

As has been made abundantly clear by the advertising department of essentially every consumer electronics manufacturer on the planet: everything is improved by the addition of sensors and a smartphone companion app. Doesn’t matter if it’s your thermostat or your toilet, you absolutely must know at all times that it’s operating at peak efficiency. But why stop at household gadgets? What better to induct into the Internet of Things than 600 year old samurai weaponry?

Introducing the eKatana by [Carlos Justiniano]: by adding a microcontroller and accelerometer to the handle of a practice sword, it provides data on the motion of the blade as it’s swung. When accuracy and precision counts in competitive Katana exhibitions, a sword that can give you real time feedback on your performance could be a valuable training aid.

The eKatana is powered by an Adafruit Feather 32u4 Bluefruit LE and LSM9DS0 accelerometer module along with a tiny 110 mAh LiPo battery. Bundled together, it makes for a small and unobtrusive package at the base of the sword’s handle. [Carlos] mentions a 3D printed enclosure of some type would be a logical future improvement, though a practice sword that has a hollow handle to hold the electronics is probably the most ideal solution.

A real-time output of sword rotation, pitch, and heading is sent out by the Adafruit Feather over BLE for analysis by a companion smartphone application. For now he just has a running output of the raw data, but [Carlos] envisions a fully realized application that could provide the user with motions to perform and give feedback on their form.

Incidentally this isn’t the first motion-detecting sword we’ve ever covered, but we think this particular incarnation of the concept might have more practical applications.

Old fashioned tide clocks were an attempt to predict high tide by timing the rising and setting of the moon. When you looked at one you could see how many hours until the next high tide. [rabbitcreek] wanted to make his own version of the tide clock that does a better job of predicting the actual high tide than those old clocks, which were essentially glorified timers tuned to the moon’s phases.

[rabbitcreek] based his the tide prediction software off of [Luke Miller’s] Tide Clock, which applies location-specific adjustments to the standard lunar clock, taking into consideration such factors as the geographic features (basin depth, etc.) that modify the default timing. [Miller]’s Arduino code includes a library of common locations organized by NOAA station number.

[rabbitcreek]’s project consists of a Adafruit Feather board hooked up to a DS3231 RTC breakout and a HS-225BB servo, which turns the clock’s hand. It’s an 180-degree servo, attached to a hacked-down Actobotics gearbox gearing the servo down 2:1 to permit 360 degrees of movement.

He also wanted his creation to be left to operate unattended for years, theoretically — so solar power was a natch. The face of the clock consists of individual wavers of solar panel glued into a huge clock-like array. The solar cells feed into an Adafruit PowerBoost 500, a TPL5111 low power timer breakout, and a LiPo battery for when it’s dark out.

If you’re looking for more solar clocks check out this one that uses capacitors as hour markers.


Filed under: Arduino Hacks, clock hacks


  • 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