Posts with «arduino hacks» label

Hacking An Arduino NFC Reader With WebUSB

When [gdarchen] wanted to read some NFC tags, he went through several iterations. First, he tried an Electron application, and then a client-server architecture. But his final iteration was to make a standalone reader with an Arduino and use WebUSB to connect to the application on the PC.

This sounds easy, but there were quite a few tricks required to make it work. He had to hack the board to get the NFC reader’s interrupt connected correctly because he was using a Leonardo board. But the biggest problem was enabling WebUSB support. There’s a library, but you have to change over your Arduino to use USB 2.1. It turns out that’s not hard, but there’s a caveat: Once you make this change you will need the WebUSB library in all your programs or Windows will refuse to recognize the Arduino and you won’t be able to easily reprogram it.

Once you fix those things, the rest is pretty easy. The PC side uses node.js. If you back up a level in the GitHub repository, you can see the earlier non-Arduino versions of the code, as well.

If you want to understand all the logic that went into the design, the author also included a slide show that discusses the three versions and their pros and cons. He did mention that he wanted a short-range solution so barcodes and QR codes were out. He also decided against RFID but didn’t really say why.

NFC business cards are a thing. You can also use them to catch some public transportation.

Need Hackable Melodies? Here’s The TETRIS Theme and More

[Robson Couto] started to get interested in musical projects and as a side effect created downloadable code with simple notation for a good variety of themes, songs, and melodies. They are all for the Arduino and use only the built-in tone() function, but don’t let that distract you. If you look past that, you’ll see that each sketch is a melody that consists of single notes and durations; easily adapted to other purposes or simply used as-is. After all, [Robson] wanted the source of each tune to be easily understood, easily modified, and to have no external dependencies.

All that may sound a bit like MIDI, but MIDI has much more in common with hardware events than music notation because it includes (among other things) note starts and note ends as separate elements. Converting MIDI into a more usable format was a big part of a project that fed Bach music to a neural network and got surprisingly good results.

When doing music projects, sometimes having a recognizable melody represented very simply as notes and durations with only one note at a time can be an awfully handy resource, and you can find them on GitHub. There’s a brief video of the Tetris theme (actual name: Korobeiniki) being played after the break.

Hack a Day 25 Dec 18:00

Arduino Polygraph Shows How It’s Done

Sometimes, a project comes along that makes a good reference design for anyone doing similar work. In this particular case, it’s a DIY USB polygraph-like machine by [Juangg] using an Arduino and sensors on the hardware side, and a Python front end for data visualization. It’s even complete with 3D printed enclosure and sensor elements.

[Juangg] designed it to use three sensors: a pulse sensor, a breath sensor, and one to measure Galvanic Skin Response (GSR). The pulse sensor uses a piezo element pressed against a fingertip to detect changes in pressure resulting from blood flow. It can be picky about placement, but finding sweet spot can yield remarkably good readings. The breath sensor works on a similar principle but uses a 3D printed fixture to hold the sensor between a strap and the subject’s chest, so that breathing in and out can be detected. The GSR sensor is a voltage divider used to measure small changes in skin conductivity. How well does it all work? That depends on what one is looking to get out of it, but the documentation and design files are available from the project page and the GitHub repository if anyone wants a reference for similar work.

The polygraph may have a mixed reputation, but it makes a good project that demonstrates just how messy biometrics can be from an engineering perspective. And in case you missed it, here’s a reminder that Wonder Woman and the polygraph have much more in common than you might realize.

Minimalist Mate Maker Keeps You Caffeinated

Americans love their coffee. The Brits adore their tea. In South America, the number one way to get through the day is with yerba mate, a tea made from the yerba plant. It is typically shared in a social setting, with one person preparing the beverage for everyone to enjoy. Although caffeine certainly deserves a ceremony, it never needs one. Hit the streets and you’ll see people everywhere with a thermos under one arm, keeping water hot and ready to refill the cup of mate in their hand.

The Stanley vacuum thermos is quite a popular choice for drinkers on the go, but the Argentinian government recently placed new restrictions foreign imports. [Roni Bandini] decided to build a minimum viable mate machine so he always has perfectly hot water on tap.

An Arduino Nano heats the water and displays the rising temperature on an LCD screen. When the temperature is just right, the display asks for your cup. An ultrasonic sensor detects the cup and dispenses a certain amount of water determined in the sketch. Yerba leaves can be used a few times before losing their flavor, so the machine keeps track and lets him know when it’s time to replace them. You can sip on a brief demo after the break.

Let’s say you don’t have perfectly-prepared mate, and it always comes out too hot. That’s better than too cold, but still not ideal. Why not make a temperature-sensing coaster that alerts you when it has cooled to perfection?

Programming Arduinos With Voice Commands

Programming is a valuable skill, though one that can be daunting to learn. Throw hardware in the mix, and things ratchet up another level again. However, there are many projects that have sought to reduce the level of difficulty for newcomers. HeyTeddy is a new project that allows users to program an Arduino with voice commands, and the help of on-screen tutorials.

It’s a system that initially sounds cumbersome, but through smart design, is actually quite streamlined. Users can talk to the system, which uses an Amazon Alexa device for natural language voice recognition. This enables HeyTeddy to respond to questions like “how do I use a flex sensor?” as well as direct commands, such as “Set pin 10 to 250”.

The demo video does a great job of demonstrating the system. While the system is not suited to professional development tasks, its has value as an educational tool for beginners. The system is able to guide users through both hardware setup on a breadboard, as well as guide them through tests when things don’t work. Once their experience level builds, code can be exported to the Arduino IDE for direct editing.

It’s a great tool that has plenty of promise to bring many more users into the hardware hacking fold. It’s out of the workshop of [MAKInteract], whose work we’ve seen before. Video after the break.

Hack a Day 20 Dec 09:00

Interactive Core Memory Shield Helps Explains The Past

[Andy Geppert] sends in his incredibly clever interactive core memory shield. 

In a great display of one hacker’s work being the base for another’s, [Andy] started out with [Jussi Kilpelainen]’s core memory shield for Arduino.  As he was playing with the shield he had a desire to “see” the core memory flipping and got the idea to add an LED matrix aligned behind the individual cores.

The first iteration worked, but it only showed the state that the Arduino believed the core memory to be in. What he really wanted was a live read on the actual state. He realized that an Adafruit Featherwing 8×8 matrix display also fits behind the core memory. Now the LEDs update based on the read state of the core memory. This allows him to flip the individual bits with a magnetic stylus and see the result. Very cool.

You can see a video of it working after the break.

Inject Keystrokes Any Way You Like With This Bluetooth Keystroke Injector

[Amirreza Nasiri] sends in this cool USB keystroke injector.

The device consists of an Arduino, a Bluetooth module, and an SD card. When it’s plugged into the target computer the device loads the selected payload from the SD card, compromising the system. Then it does its unique trick which is to switch the injector over to Bluetooth mode. Now the attacker has much more control, albeit local, over the system.

While we would never even be tempted to plug this device into a real computer, we like some of the additional features, like how an added dip switch can be used to select from up to eight different payloads depending on the required attack. The addition of a photo diode is also interesting, and makes us dream of all sorts of impractical movie hacker scenarios. [Amirreza] says it’s to trigger when the person leaves the room and turns the lights off.

[Amirreza] has all the code and design files on the GitHub. There are also a few payload examples, which should be fun to hack on. After all, one of life’s pleasures is to find new ways to mess with your friends.

Arduino Does Multitouch

A lot of consumer gadgets use touch sensors now. It is a cheap and reliable way to replace a variety of knobs and switches on everything from headphones to automobiles. However, creating a custom touch controller for a one-off project can be daunting. A recent ACM paper shows how just about any capacitive sensor can work as a multitouch sensor with nothing more than an Arduino although a PC running processing interprets the data for higher-level functions.

The key is that the Arduino excites the grid using PWM and then examines the signal coming out of the grid. Finger poking changes the response quite a bit and the Arduino can sense it using the analog to digital converters onboard. You can find the actual software kit online. The tutorial document is probably more interesting than the ACM paper if you only want to use the kit.

The optimum drive frequency is 10 MHz. The examples rely on harmonics of a lower frequency PWM signal to get there. The analog conversion, of course, isn’t that fast but since your finger touch rate is relatively slow, they treat the signal as an amplitude-modulated input which is very easy to decode.

The sensors can be conductive ink, thread, or copper strips. There are several example applications, including a 3D printed bunny you can pet, a control panel on a sleeve, and an interactive greeting card.

The sensor forms an image and OpenCV detects the actual touch configuration. It appears you can use the raw data from the Arduino, too, but it might be a little harder.

We imagine aluminum foil would work with this technique. If you get to the point of laying out a PCB, this might come in handy.

This Arduino Keeps Its Eyes On You

[Will] wanted to build some animatronic eyes that didn’t require high-precision 3D printing. He wound up with a forgiving design that uses an Arduino and six servo motors. You can see the video of the eyes moving around in the video below.

The bill of materials is pretty simple and features an Arduino, a driver board, and a joystick. The 3D printing parts are easy to print with no supports, and will work with PLA. Other than opening up holes there wasn’t much post-processing required, though he did sand the actual eyeballs which sounds painful.

The result is a nice tight package to hold six motors, and the response time of the eye motion is very impressive. This would be great as part of a prop or even a robot in place of the conventional googly eyes.

While the joystick is nice, we’d like to see an ultrasonic sensor connected so the eyes track you as you walk across the room. Maybe they could be mounted behind an old portrait for next Halloween. Then again, perhaps a skull would be even better. If you want a refresher about servos, start with a laser turret tutorial.

Simulate City Blocks With Circuit Blocks In A LEGO Box

Have you ever looked around your city’s layout and thought you could do better? Maybe you’ve always wanted to see how she’d run on nuclear or wind power, or just play around with civic amenities and see how your choices affect the citizens.

[Robbe Nagel] made this physical-digital simulator for a Creative Programming class within an industrial design program. We don’t have all the details, but as [Robbe] explains in the video after the break, each block has a resistor on the bottom, and each cubbyhole has a pair of contacts ready to mate with it. An Arduino nestled safely in the LEGO bunker below reads the different resistance values to determine what block was placed where.

[Robbe] wrote a program that evaluates various layouts and provides statistics for things like population, overall health, education level, pollution, etc. As you can see after the break, these values change as soon as blocks are added or removed. Part of what makes this simulator so cool is that it could be used for serious purposes, or it could be totally gamified.

It’s no secret that we like LEGO, especially as an enclosure material. Dress it up or dress it down, just don’t leave any pieces on the floor.

Via r/Arduino