Capacitance Measurement With The Arduino Uno

CapTestBoard1

Have you ever found the need to measure the capacitance of a capacitor? No multimeter handy (for shame)? Well, as it turns out you can actually measure capacitance using your Arduino Uno, with no external components, and only ~20 lines of code.

[Jonathan Nethercott] does an excellent job explaining a capacitance test circuit which uses a reference capacitor to calculate the unknown capacitance. He further explains that, with the Arduino Uno, you can remove the reference capacitor from the circuit, and simply use the stray capacitance present in the board and microcontroller, which can be calculated. This results in the test circuit being as simple as plugging in your capacitor to pins A0 and A2. Continue reading “Capacitance Measurement With The Arduino Uno”

Body Of A Trinket, Soul Of A Digispark

TrinketDigispark

Adafruit’s Trinket and digiStump’s Digispark board are rather close cousins. Both use an ATtiny85 microcontroller, both have USB functionality, and both play nice with the Arduino IDE. [Ray] is a fan of both boards, but he likes the Trinket hardware a bit better. He also prefers the Digispark libraries and ecosystem. As such, he did the only logical thing: he turned his Trinket into a Digispark. Step 1 was to get rid of that pesky reset button. Trinket uses Pin 1/PB5 for reset, while Digispark retains it as an I/O pin. [Ray] removed and gutted the reset button, but elected to leave its metal shell on the board.

The next step was where things can get a bit dicey: flashing the Trinket with the Digispark firmware and fuses. [Ray] is quick to note that once flashed to Digispark firmware, the Trinket can’t restore itself back to stock. A high voltage programmer (aka device programmer) will be needed. The flashing process itself is quite a bit easier than a standard Trinket firmware flash. [Ray] uses the firmware upload tool from the Micronucleus project. Micronucleus has a 60 second polling period, which any Trinket veteran will tell you is a wonderful thing. No more pressing the button and hoping you start the download before everything times out! Once the Trinket is running Digispark firmware, it’s now open to a whole new set of libraries and software.

Final Key : A Mooltipass-like Device

Since the Hackaday community started working on our offline password keeper, Mooltipass, we’ve received several similar projects in our tips line. The Final Key may be the most professional looking one yet. Similarly to the Mooltipass, it is based on an Atmel ATMega32U4 but only includes one button and one LED, all enclosed in a 3D printed case.

The Final Key is connected to the host computer via USB and is enumerated as a composite Communication Device / HID Keyboard, requiring windows-based devices to install drivers. AES-256 encrypted passwords are stored on the device and can only be accessed once the button has been pressed and the correct 256 bit password has been presented through the command line interface. Credentials management and access is also done through the latter. Unfortunately, the Arduino source code can’t be found on [cyberstalker]’s website, so if you see interesting features that you would like to be integrated in Mooltipass you may send us a message to our Google Group.

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!]