For The ESP’s Next ESP Trick…

It is a pretty stale dad joke to tell someone you have ESP when you mean you have an ESP8266 or ESP32 in your hand. However, [Naufil Metkar] uses an ESP device to pretend — via a magic trick — that he does have ESP. The trick requires a bit of 3D printing, an MPU6050 gyro sensor, and a lot of showmanship.

We hate to spoil an illusion, but you can probably figure it out from the list of things you need. The die has a gyro in it and uses a small ESP module to transmit its current orientation out to a display. There is a small reed switch that lets you turn off the device with a magnet. Without it, the battery dies quickly.

Continue reading “For The ESP’s Next ESP Trick…”

One Solution, Many Problems

You might think you’re lucky when one of your problems has multiple solutions, and you get to pick and choose, but you’re even luckier when one solution has many problems! This week I stumbled on an old solution in a new place. The project was a fantastic old MIDI guitar build, the Tryndelka by [Aleksandr Goltsov]. And the old solution? Switch matrix diodes.

You see, [Aleksandr] is making an electric guitar where the strings are pulled up to a certain voltage and then make contact with metal frets. Each fret is cut into six pieces, so that the strings can be read out individually, and the microcontroller scans each string in succession to test if it’s pressed down or not. Done, right? Wrong! The problem comes when two or more strings are pressed at once — the electrical path from the string you want will travel through the closed switch on a string that you’re not scanning. The solution is a ton of diodes.

I learned this problem the hard way in wiring up a MAME cabinet, at about 3 A.M. the night before we were going to bring it to Shmoocon. We finally got the whole USB/button code working, so we played some celebratory rounds of Street Fighter. We eventually noticed that hitting one button, or even moving the joystick in a particular direction, would block some of the other buttons from working, or change their function entirely. Quick Internet search later, and we were hand soldering 64 diodes until dawn. Good times!

But the fact that switch matrices need diodes, and exactly why, is forevermore burned in my brain. It’s fun to see it pop up in all sorts of contexts, from DIY keyboards to MIDI guitars, to Charliplexing. (It’s the “D” in LED!) It’s one of the classics — a solution to many problems.

This ESP32 Pico Wristwatch Has Plenty Of Potential

First hand-built prototype. Nurse! isopropyl alcohol, stat!

Prolific hacker [Sulfuroid] is a medical doctor by day, and an electronics hobbyist by night, and quite how he finds the time, we have no idea.

The project we want to highlight is an ESP32 based LED smart watch, which we’ll sure you’ll agree, looks pretty nicely developed so far, and [Sulfuroid] has bigger plans, as you may find, when you dig into the GitHub repo. This analog-style design uses four groups of 0603-sized LEDs, arranged circularly to indicate the passage of time, or anything else you fancy. Since there are four control buttons, a pancake vibration motor, as well as Wi-Fi and Bluetooth, the possibilities are endless.

In order to stand a hope of driving those 192 LEDs from a single ESP32-Pico-D4, it was necessary to use a multiplexed LED driver, courtesy of the Lumissil IS31FL3733 device, which can handle arrays up to 12 x 16 devices. This chip is one to remember, since it has some really nice features, such as global current control to reduce CPU overhead, automatic breathing loops for those fancy fade effects, and even includes a handy open/short detection function, so it can report back assembly problems, assisting in reworking your dodgy soldering!

Routing circular arrays is such a pain.

Power and interfacing are taken care of via USB-C, with a TP4054 single Li-Ion cell charger chip handling the battery. This is a Taiwanese clone of the popular LTC4054, but that chip may be a bit hard to get at the moment. There is the common-as-muck CP2104 USB chip dealing with the emulated serial port side of things, since for some reason, the ESP32 still does not support USB. The Pico-D4 does have RTC support, but [Sulfuroid] decided to use a DS3231M RTC chip instead. We noticed the touch functionality wasn’t broken out – that could be added easily in the next revision!

We’ve covered watches a lot, because who doesn’t want custom geek-wear! Here’s a slick one, a fun one with the brains on display, and finally one using charlieplexing to get the component count down.

 

Living The Dream: New PCB For A Dirt-Cheap Calculator Watch

Well, this hack has us tickled pink. We love the idea of buying some really cheap piece of technology and doing something amazing with it, and this is a textbook example of that. [davedarko] found the cutest little calculator watch on Ali Express and is working on making a new PCB for it. The plan is to use an ARM processor and Arduino and add a few extras like 24-hour mode and a pink (or potentially RGB) backlight. The new brain will be an ATSAML22G18A, which has an on-board LCD controller and exactly one I/O pin to spare without charlieplexing the buttons.

One of [davedarko]’s primary goals is to keep the LCD and figure out how to talk to it. The first order of business was reverse engineering the watch’s LCD controller by sussing out the secrets from beneath the black blob of epoxy. This was an eye-opening experience as [davedarko] had never worked directly with LCDs before. A strange reading made him bust out the oscilloscope. Long-ish and informative story short, [davedarko] found out that it uses a bias of 1/2 for generating the wave necessary to multiplex the segments and keep the signal alternating. This is definitely one to watch!

We love timepieces around here and have seen all kinds of hacks, especially on Casio watches. Want dark mode? Done. Enable the hidden countdown timer? We’ve got that, too. And have you ever wondered just how water-resistant the F91W is?

Hackaday Links Column Banner

Hackaday Links: June 14, 2020

You say you want to go to Mars, but the vanishingly thin atmosphere, the toxic and corrosive soil, the bitter cold, the deadly radiation that sleets down constantly, and the long, perilous journey that you probably won’t return from has turned you off a little. Fear not, because there’s still a way for you to get at least part of you to Mars: your intelligence. Curiosity, the Mars rover that’s on the eighth year of its 90-day mission, is completely remote-controlled, and NASA would like to add some self-driving capabilities to it. Which is why they’re asking for human help in classifying thousands of images of the Martian surface. By annotating images and pointing out what looks like soil and what looks like rock, you’ll be training an algorithm that one day might be sent up to the rover. If you’ve got the time, give it a shot — it seems a better use of time than training our eventual AI overlords.

We got a tip this week that ASTM, the international standards organization, has made its collection of standards for testing PPE available to the public. With titles like “Standard Test Method for Resistance of Medical Face Masks to Penetration by Synthetic Blood (Horizontal Projection of Fixed Volume at a Known Velocity)”, it seems like the standards body wants to make sure that that homebrew PPE gets tested properly before being put into service. The timing of this release is fortuitous since this week’s Hack Chat features Hiram Gay and Lex Kravitz, colleagues from the Washington University School of Medicine who will talk about what they did to test a respirator made from a full-face snorkel mask.

There’s little doubt that Lego played a huge part in the development of many engineers, and many of us never really put them away for good. We still pull them out occasionally, for fun or even for work, especially the Technic parts, which make a great prototyping system. But what if you need a Technic piece that you don’t have, or one that never existed in the first place? Easy — design and print your own custom Technic pieces. Lego Part Designer is a web app that breaks Technic parts down into five possible blocks, and lets you combine them as you see fit. We doubt that most FDM printers can deal with the fine tolerances needed for that satisfying Lego fit, but good enough might be all you need to get a design working.

Chances are pretty good that you’ve participated in more than a few video conferencing sessions lately, and if you’re anything like us you’ve found the experience somewhat lacking. The standard UI, with everyone in the conference organized in orderly rows and columns, reminds us of either a police line-up or the opening of The Brady Bunch, neither of which is particularly appealing. The paradigm could use a little rethinking, which is what Laptops in Space aims to do. By putting each participant’s video feed in a virtual laptop and letting them float in space, you’re supposed to have a more organic meeting experience. There’s a tweet with a short clip, or you can try it yourself. We’re not sure how we feel about it yet, but we’re glad someone is at least trying something new in this space.

And finally, if you’re in need of a primer on charlieplexing, or perhaps just need to brush up on the topic, [pileofstuff] has just released a video that might be just what you need. He explains the tri-state logic LED multiplexing method in detail, and even goes into some alternate uses, like using optocouplers to drive higher loads. We like his style — informal, but with a good level of detail that serves as a jumping-off point for further exploration.

144 7-Segment Displays Combine To Form A Mighty Clock

What do you do with 144 7-segment displays? If you’re [Frugha] you put them all together to create an epic clock. Each display has 8 individual LEDs — 7 segments, and a decimal point. Put that all together, and you’ve got 1152 individual LEDs to control. This presented a problem, as [Frugha] wanted to control the clock with a single Arduino Nano. Even charlieplexing won’t get you that many I/O lines.

The solution was a nifty little chip called the MAX7219. The ‘7219 speaks SPI and can control 64 individual LEDs. [Frugha] used 18 of them in the clock, giving him full control over all his LEDs. That’s pretty impressive, considering the last matrix 7-segment display we saw required 48 Arduinos!

Another problem is memory – 1152 “pixels” would quickly overrun the 2KB RAM in the ATmega328. This is a clock though — which means only digits 0-9 and a colon. [Frugha] picked a nice font and hand-coded lookup tables for each digit. The lookup tables are stored in ROM, saving precious RAM on the Arduino.

A clock wouldn’t be any good if it wasn’t accurate. A Tiny RTC supplies battery-backed time data. [Frugha] wrapped everything up with a neat layout on a custom PCB. Sure, you could put it in a case, but we think a clock this crazy deserves to be left open – so you can see it in all its glory.

How Many LEDs Can You Drive?

Driving more than a handful of LEDs from a microcontroller is often a feat that takes tedious wiring, tricking the processor, or a lot of extra external hardware. Charlieplexing is perhaps the most notorious of these methods, and checks two of those three boxes. This library for the Teensy 4.0 checks all three, but it can also drive a truly staggering 32,000 LEDs at one time.

The TriantaduoWS2811 library is able to drive 32 channels of LEDs from a Teensy 4.0 using only three pins and minimal processor resources. It uses the FlexIO and DMA subsystems of the i.MX RT1062, the particular ARM processor on the Teensy, to drive four external shift registers. Together, the system is able to achieve 30 frames per second on with 1,000 LEDs per channel, for a total of 32,000 LEDs. Whoah.

[Ward] aka [wramsdell] wondered what one would do with all of the horsepower of a Teensy microcontroller when he first saw its specifications, and was able to build this project to take advantage of its features. What’s surprising, though, is that it doesn’t use nearly everything the processor is capable of, so you can do other tasks at the same time as driving that giant LED display.