USB Datalogging With Arduino Using V-USB

Adding USB functionality to your Arduino projects used to be a pain, but thankfully, the V-USB project came along and gave your ATMEGA328 the ability to control the USB lines directly and mimic simple (low-speed) USB peripherals. [Ray] shows an implementation of the V-USB project by logging the status of the Arduino’s I/O pins to an open Excel spreadsheet

V-USB (Virtual USB) is especially useful for those of us who build standalone Arduino projects with the ATMEGA328. Unlike the Arduino Leonardo and its ATMEGA32U4, the ATMEGA328 does not have a built-in USB controller. The circuit required to tie into the USB lines is made up of just a few basic components, and [Ray] provides a reference schematic and BOM to get you started. The Arduino is programmed to mimic a keyboard, so the datalogging is achieved by allowing the Arduino to ‘type’ the data into an open Excel spreadsheet. In this example, the status of 8 digital pins and all 6 Analog Input pins are logged.

For those of you who prefer the PIC microcontroller and are in a similar position of not having a built-in USB controller, there is the 16FUSB project to help you out.

Magic Morse Arduino Trainer

cover_IMG408

Magic Morse is a mathematical algorithm that [Ray Burnette] wrote a few years ago to make it easy to send and receive Morse code. When he first wrote it, he designed it for a PIC, but since then he has re-written it to use as a training program for the Arduino platform.

It can run on the Uno, Nano, Pro Micro, or even home-brew Arduino boards. He’s demonstrating the program with a Nokia 5110 LCD, but has also included code for the typical 2×16 LCD displays. The Magic Morse algorithm is copyrighted, but he has released the Arduino code as open source in an effort to get people using Morse code once again — it is pretty awesome.

So how does it work? The algorithm assigns weights to the “dits” and “dahs” as received — when there is a longer pause, the algorithm creates a pointer which calls the character out of an array stored in the EEPROM. He’s included an example of this in Excel on his page.

Now you have no excuses about learning Morse code! Oh and if you don’t have a fancy telegraph key (the switch), [Ray’s] also published a handy method of making your own Morse code key out of popsicle sticks and magnets.

A Light-Up Dress For A New Year’s Dance Party

wearableLedress

Don’t let the above picture’s lack of blinking colors fool you, the light-up dress [Sam] fashioned for his girlfriend is rather eye-catching; we’d just rather talk about it than edit the gifs he’s provided. [Sam’s] been a busy guy. His last project was a Raspberry Pi digital photo frame, which we featured just over a week ago, but wearable hacks allow him to combine his favored hobbies of sewing and electronics.

If you’re looking to get started with wearable electronics, then this project provides a great entry point. The bulk of the build is what you’d expect: some individually-addressable RGB LEDs, the ever-popular FLORA board from Adafruit, and a simple battery holder. [Sam] decided to only use around 40 of the LEDs, but the strips come 60 to a meter, so he simply tucked the extra away inside the dress and set his desired limits in the software, which will allow him to preserve the entire strip for future projects. If you’ve ever attempted a wearable hack, you’re probably familiar with how delicate the connections can be and how easily the slightest bend in the wiring can leave you stranded. Most opt for a conductive thread solution, but [Sam] tried something different and used 30 AWG wire, which was thin enough to be sewn into the fabric. As an added bonus, the 30 AWG wire is insulated, which permits him to run the wires close to (or perhaps over) each other while avoiding shorts. [Sam’s] guide is detailed and approachable, so head over to his project page if you think you’ve caught wearables fever, and check out his GitHub for the source code.

MBox: A Child’s MP3 Player

mobx

For young children, music is a wonderful and exciting thing — but do you really want them playing with your phone, or worse yet, an iPod? [Arons] decided to make the MBox, an Arduino powered MP3 player.

He was inspired by hörbert, a very similar wooden MP3 player for children. Apparently it’s a great product, but it also costs 239€. We don’t blame him for wanting to make his own.

The MBox follows the same exterior design as hörbert — though we must admit, he could have spiced it up a bit! It uses an Arduino Uno at its core with a Freaduino MP3 music shield, capable of playing all the typical formats like MP3, MIDI, WAV, and even Ogg Vorbis. To amplify the sound he’s using a Mono Audio Amp Breakout board from SparkFun which drives an 8Ω loudspeaker. A mini USB power brick provides the juice, and a 12-digit keypad provides the ability to select music — each number plays from a different directory on the SD card.

[Arons’] daughter loves it, and he probably only spent a fifth of what the real hörbert costs!

[Thanks for the tip Renzo!]

Android+Arduino – Face Following RC Car

androidRCcar_01_14

To some of us, hacking an RC Car to simply follow a black line or avoid obstacles is too easy, and we’re sure [Shazin] would agree with that, since he created an RC Car that follows your face!

The first step to this project was to take control of the RC Car, but instead of hijacking the transmitter, [Shazin] decided to control the car directly. This isn’t any high-end RC Car though, so forget about PWM control. Instead, a single IC (RX-2) was found to handle both the RF Receiver and H-Bridges. After a bit of probing, the 4 control lines (forward/back and left/right) were identified and connected to an Arduino.

[Shazin] paired the Arduino with a USB Host Shield and connected it up with his Android phone through the ADB (Android Debug Bridge). He then made some modifications to the OpenCV Android Face Detection app to send commands to the Arduino based on ‘where’ the Face is detected; if the face is in the right half of the screen, turn right, if not, turn left and go forward.

This is a really interesting project with a lot of potential; we’re just hoping [Shazin] doesn’t have any evil plans for this device like strapping it to a Tank Drone that locks on to targets!

Continue reading “Android+Arduino – Face Following RC Car”

An Arduino Library For The PS4

PS4 Controller

Looking to interface your Arduino with the PS4 controller? [Kristian] has updated his USB host library with support for the controller. The library makes it easy to read most of the inputs from the controller. Currently the buttons and joysticks work, and support for the light sensor, rumble, and touchpad is on the way.

To get this working, you will need the USB Host Shield for the Arduino and a Bluetooth dongle. Once you have the hardware setup, you can use the library to pair with the controller. When connected, simple function calls will let you read the state of the device.

While this does require some additional hardware to connect, all of the code is open source. If you’re looking to experiment with the PS4 controller yourself, [Kristian]’s work could be a helpful starting point. Of course, all of the source is available on Github, and the example sketch shows how easy it is to roll the PS4 controller into your own Arduino project.

Software Half Duplex UART For AVRs

If you have worked with very low cost microcontroller in the past, such as the ATtiny series from AVR, you’ve probably been stuck without a UART peripheral. The usual answer to this problem is to implement the UART in software. It’s not fast, but it works.

Lets say you’re even more limited on resources, and only have a single pin for UART. [Ralph] created a software library and a small circuit that enables half duplex UART using only one pin. With the above circuit, and a 62 byte Arduino compatible library, you can add UART to the tiniest of ATtinys.

In this circuit, the Tx/Rx pin is on the AVR, and the Tx and Rx pins are another device. The circuit relies on the idle state of UART being a logic high signal. When the Tx pin is idle, the transistor stays on. This allows the Tx/Rx pin to pull Rx low when the AVR sends a 0. When the Tx pin sends a 0, the Tx/Rx pin gets pulled low through the diode.

It’s a clever hack, and could definitely help add communication to your next tiny project.