Posts with «arduino hacks» label

Plasma Globe Reveals Your Next Clue

If you like solving puzzles out in the real world, you’ve probably been to an escape room before, or are at least familiar with its concept of getting (voluntarily) locked inside a place and searching for clues that will eventually lead to a key or door lock combination that gets you out again. And while there are plenty of analog options available to implement this, the chances are you will come across more and more electronics-infused puzzles nowadays, especially if it fits the escape room’s theme itself. [Alastair Aitchison] likes to create such puzzles and recently discovered how he can utilize a USB powered plasma globe as a momentary switch in one of his installations.

The concept is pretty straightforward, [Alastair] noticed the plasma globe will draw significantly more current when it’s being touched compared to its idle state, which he measures using an INA219 current shunt connected to an Arduino. As a demo setup in his video, he uses two globes that will trigger a linear actuator when touched at the same time, making it an ideal multiplayer installation. Whether the amount of fingers, their position on the globe, or movement make enough of a reliable difference in the current consumption to implement a more-dimensional switch is unfortunately not clear, but definitely something worth experimenting with.

In case you’re planning to build your own escape room and are going for the Mad Scientist Laboratory theme, you’ll obviously need at least one of those plasma globes sparking in a corner anyway, so this will definitely come in handy — maybe even accompanied by something slightly larger? And for all other themes, you can always resort to an RFID-based solution instead.

Dead Bug Arduino Is Lively And Shield-Compatible

Microcontroller demo boards such as the Arduino UNO are ubiquitous on Hackaday as the brains of many a project which inevitably does something impressive or unusual. Sometime someone builds a particularly tiny demo board, or an impressively large one. In the case of the board featured here, the Arduino is a gorgeous labor of love which can’t really be called a board since there is no PCB. Instead of the traditional fiberglass, [Jiří Praus] formed brass bars into the circuitry and held it together with solder.

This kind of dedication to a project leaves an impression. His notes show he saw the barest way to operate an ATMega328, built it, tested, and moved on to the power supply to make it self-sustaining, then onto the communication circuit, and finally the lights. The video below shows a fully-functional Arduino happily running the blink program. He plans to encase the brass portion in resin to toughen it up and presumably keep every bump from causing a short circuit. The components are in the same position due to a custom jig which means a standard shield will fit right into place.

The Arduino started far less flashy yet nearly as fragile, and it has grown. And shrunk.

Hack a Day 09 Jun 21:00

Drag And Drop Files On Select Arduino Boards

Historically, getting files on to a microcontroller device was a fraught process. You might have found yourself placing image data manually into arrays in code, or perhaps repeatedly swapping SD cards in and out. For select Arduino boards, that’s no longer a problem – thanks to the new TinyUSB library from Adafruit (Youtube link, embedded below).

The library is available on Github, and is compatible with SAMD21 and SAMD51 boards, as well as Nordic’s NRF52840. It allows the Arduino board to appear as a USB drive, and files can simply be dragged and dropped into place. The library can set up to use SPI flash, SD cards, or even internal chip memory as the storage medium.

Potential applications include images, audio files, fonts, or even configuration files. Future plans include porting the TinyUSB library to the ESP32-S2 as well. Being able to drag a settings file straight on to a board could make getting WiFi boards online much less of a hassle.

We’ve seen other nifty USB libraries before, VUSB is a great option if you need USB on your AVR microcontroller. Video after the break.

Hack a Day 30 May 03:00

Make Physics Fun with a Trebuchet

What goes up must come down. And what goes way, way up can come down way, way too fast to survive the sudden stop. That’s why [Tom Stanton] built an altitude recording projectile into an oversized golf ball with parachute-controlled descent. Oh, and there’s a trebuchet too.

That’s a lot to unpack, but suffice it to say, all this stems from [Tom]’s obvious appreciation for physics. Where most of us would be satisfied with tossing a ball into the air and estimating the height to solve the classic kinematic equations from Physics 101, [Tom] decided that more extreme means were needed.

Having a compound trebuchet close at hand, a few simple mods were all it took to launch projectiles more or less straight up. The first payload was to be rocket-shaped, but that proved difficult to launch. So [Tom] 3D-printed an upsized golf ball and packed it with electronics to record the details of its brief ballistic flight. Aside from an altimeter, there’s a small servo controlled by an Arduino and an accelerometer. The servo retracts a pin holding the two halves of the ball together, allowing a parachute to deploy and return the package safely to Earth. The video below shows some pretty exciting launches, the best of which reached over 60 meters high.

The skies in the field behind [Tom]’s house are an exciting place. Between flying supercapacitors, reaction wheel drones, and low-altitude ISS flybys, there’s always something going on up there.

Stator Library Makes Your Arduino Code Easier To Read

The readability of your code can make the difference between your project being a joy to work on, or an absolute headache. This goes double when collaborating with others. Having easily parsed code reduces your cognitive load and makes solving problems easier. To try and help with this, [PTS93] developed the Stator library to make certain common tasks simpler to read.

The aim of the library is to get rid of piles of state tracking variables and endless if/else statements – hence the name. It’s designed primarily for the Arduino IDE but doesn’t have any dependencies on the API, so can be used in other C++ environments. It comes with a variety of neat tools for common jobs, such as reading an analog sensor with hysteresis around a trigger point, as well as easy ways to track state changes across multiple variables. By using basic English terms instead of condition checks and mathematical operators, it can make things more readable and easier to follow.

The power of the Arduino platform has always been in its easy to use libraries that make everything easier, from interfacing LCDs to working with Amazon Dash buttons.

Ardunio’s Pluggable Discovery Programs With Any Protocol

The first Arduino was serial, and over the decade and a half, this has been the default way to upload code to an Arduino board. In 2008, support for in-circuit programmers was added, and later port detection was added. The latest version of the Arduino IDE adds something new: pluggable discovery. Now any protocol is supported by the Arduino IDE.

This feature is the brainchild of [Paul Stoffregen], creator of the Teensy. If you’ve ever used a Teensy, you’ll remember the Teensyduino application used to upload code to the board. The Teensy uses HID protocol instead of serial for uploading. After working to improve the integration between the Teensy and Arduino IDE, [Paul] stated extending the DiscoveryManager. After some discussion with the Arduino developers, this feature was then added to Arduino 1.8.9, released a month or so ago.

There are some issues with Pluggable Discovery, most importantly that it doesn’t yet exist in the Arduino Command Line Interface (yeah, that exists too). If you’re looking to contribute to Open Source, that would be a nice project to pick up.

With the right JSON, and configuration, it is now theoretically possible to extend the Arduino IDE to any sort of protocol. This means (again, theoretically), it’s possible to update the firmware in your DIY MIDI synth over SysEx message, or a parallel port, maybe. Someone is going to upload to an Arduino board over PCIe, eventually.

Arduino Leonardo Gets A Lockable Bootloader

Security is something that’s far too often overlooked in embedded devices. One of the main risks is that if the device doesn’t verify the authenticity of incoming firmware updates. [Walter Schreppers] was working on a USB password storage device, so security was paramount. Thus, it was necessary to develop a secure bootloader.

[Walter]’s device was based upon the Arduino Leonardo. Starting with the Caterina bootloader, modifications were made to enable the device to be locked and unlocked for programming. This can be done in a variety of ways, depending on how things are setup. Unlocking can be by using a secret serial string, an onboard jumper, and [Walter] even suspects a SHA1 challenge/response could be used if you were so inclined.

It’s never too soon to start thinking about security in your projects. After all, we must stave off the cyberpunk future in which leather-clad youths flick all your lights on and off before burning your house down in the night by overclocking the water heater. Naturally, we’ve got a primer to get you going in the right direction. Happy hacking!

Insert Coin (Cell) To Play LedCade

In this era of 4K UHD game console graphics and controllers packed full of buttons, triggers, and joysticks, it’s good to occasionally take a step back from the leading edge. Take a breath and remind ourselves that we don’t always need all those pixels and buttons to have some fun. The LedCade is a μ (micro) arcade game cabinet built by [bobricius] for just this kind of minimalist gaming.

Using just three buttons for input and an 8×8 LED matrix for output, the LedCade can nevertheless play ten different games representing classic genres of retro arcade gaming. And in a brilliant implementation of classic hardware hacking humor, a player starts their game by inserting not a monetary coin but a CR2032 coin cell battery.

Behind the screen is a piezo speaker for appropriately vintage game sounds, and an ATmega328 with Arduino code orchestrating the fun. [bobricius] is well practiced at integrating all of these components as a result of developing an earlier project, the single board game console. This time around, the printed circuit board goes beyond being the backbone, the PCB sheet is broken apart and reformed as the enclosure. With classic arcade cabinet proportions, at a far smaller scale.

If single player minimalist gaming isn’t your thing, check out this head-to-head gaming action on 8×8 LED arrays. Or if you prefer your minimalist gaming hardware to be paper-thin, put all the parts on a flexible circuit as the Arduflexboy does.

The HackadayPrize2019 is Sponsored by:

Simple, Self-Contained LoRa Repeater In About an Hour

[Dave Akerman]’s interest in high-altitude projects means he is no stranger to long-range wireless communications, for which LoRa is amazingly useful. LoRa is a method of transmitting at relatively low data rates with low power over long distances.

Despite LoRa’s long range, sometimes the transmissions of a device (like a balloon’s landed payload) cannot be received directly because it is too far away, or hidden behind buildings and geography. In these cases a useful solution is [Dave]’s self-contained LoRa repeater. The repeater hardware is simple, and [Dave] says that if one has the parts on hand, it can be built in about an hour.

The device simply re-transmits any telemetry packets it receives, and all that takes is an Arduino Mini Pro and a small LoRa module. A tiny DC-DC converter, battery, and battery charger rounds out the bill of materials to create a small and self-contained unit that can be raised up on a mast, flown on a kite, or carried by a drone.

The repeater’s frequency and other settings can even be reprogrammed (using a small windows program) for maximum flexibility, making the little device invaluable when going hunting for landed payloads like the one [Dave] used to re-create a famous NASA image using a plastic model and a high-altitude balloon. Check out the details on the GitHub repository for the project and start mashing “add to cart” for parts at your favorite reseller.

A Physical Knob For Browser Tabs

If you’re like most of us, you have about twenty browser tabs open right now. What if there were a way to move through those tabs with a physical interface? That’s what [Zoe] did, and it’s happening with the best laptop ever made.

The hardware for this build is simply an Arduino and a rotary encoder, no problem there. The firmware on the Arduino simply reads the encoder and sends a bit or two of data over the serial port. This build gets interesting when you connect it to a Firefox extension that allows you to get data from a USB or serial port, and there’s a nice API to access tabs. Put all of this together, and you have a knob that will scroll through all your open tabs.

This build gets really good when you consider there’s also a 3D printed mount, meant to attach to a Thinkpad X220, the greatest laptop ever made. At the flick of a knob, you can scroll through all your tabs. It’s handy if you’re reading three or four or five documents simultaneously, or if you’re just editing video and trying to go through your notes at the same time. A great invention, and we’re waiting for this to become a standard device on keyboards and mice. Check out the video below.