Posts with «arduino hacks» label

Custom Dog Door Prevents Culinary Atrocities

Riley, an 8 lb pug, has more beauty than brains, and a palate as unrefined as crude oil. While we hate criticizing others’ interests and tastes, his penchant for eating cat poop needed to stop. After a thorough exploration of a variety of options, including cat food additives that make its excrement taste worse (HOW? WHY? Clearly taste wasn’t the issue!), automatic litter boxes that stow the secretions, and pet doors that authenticate access to the room with the litter box, [Science Buddies] eventually settled on a solution that was amenable to all members of the family.

The trick was in creating a door mechanism with a blacklist of sorts rather than a whitelist. As the cat didn’t like to push the door open itself, the solution needed to have the pet door open by default. A magnet on Riley’s collar would trip a sensor attached to an Arduino that would control servos to swing the door shut immediately if he attempted to access the defecated delights. Of course safety was a consideration with the door swinging in Riley’s face.

We’ve covered a few pet screeners, including one for the same purpose that used IR sensors (but a much bigger dog also named Riley), and a flock of solutions for chickens. We’ve also seen [Science Buddies] in previous posts, so they’re not on the tips line blacklist.

Arduino Turned Into Something Kinda Like A Pager

Video may have killed the radio star, but cell phones and smart phones all but killed the pager. They still exist, of course, but only in very niche applications. [João Santos] wanted a pager-like experience for himself, though, so he enlisted an Arduino and got to work. Watch a video of the system working below.

The build uses an Arduino Uno to drive a simple HD44780 LCD display with 16 characters each across two lines of text. It’s hooked up to a Wemos D1, which uses its WiFi connection to get online. To this end, it’s capable of talking to a web application which allows users to enter text messages. It receives these messages, passes them to the Arduino Uno over I2C, and then the Uno shuttles the message to the display. It’s overkill, but [João] just found it quicker to get everything up and running via this route.

Those who want to message [João] via the system can head to a website that runs on the OutSystems platform. There, they can enter their name and message, and it will be sent to the pager-like device for display.

It’s a fun little thing, and it makes us wonder if pagers could make a comeback. Maybe simple devices could work in a similar way to Sidewalk or Apple AirTags, communicating via a low-power network made up of smartphones in the local area. We’ve seen something similar done with LoRa. If you happen to whip up something along those lines, don’t hesitate to let us know!

Hack a Day 17 Mar 06:00

Don’t Panic: a Cooperative Bomb Defusing Game

[Heath Paddock] wanted to confound his friends with a game that mimics an escape room in a box. About six months after starting, he had this glorious thing completed. It’s a hardware version of a game called Keep Talking and Nobody Explodes where players have five minutes to defuse a suitcase bomb. This implementation requires at least two players, one with the box-bomb itself, and one who holds all the knowledge but can’t see the box-bomb to defuse it.

The wiring of the Mastermind module.

[Heath]’s version has twice as many modules as the original game, each hand-wired one driven by an Arduino. One of the modules is an LED maze. There are two green anchor LEDs in one of six configurations, and and blue and a red LED.

The object is to move the blue LED next to the red one without touching any walls. Of course, the box-holder can’t see the walls and must describe the configuration of the anchor LEDs to their partner in order to get started.

All of the modules are quite different, which likely makes for an extremely fun and challenging five minutes. [Heath] reports that getting inter-module communication down was a long road. Eventually, [Heath] settled on a mesh network configuration and connected everything in a big loop. Be sure to check out the walk-through video after the break.

This isn’t the first time we’ve seen a hardware implementation of this game. Here’s one that uses a Raspberry Pi.

Arduino, Virtually

While simulating an Arduino isn’t a new idea, a recent project by [LRusso] provides an open source JavaScript simulator that runs in your browser. You can try it out live or host it yourself if you prefer.

The simulator looks much like the standard IDE, so there isn’t much to learn. You can select from several targets, including a UNO R3, a MEGA 1280, a MEGA 2560, or a NANO V3. At the bottom of the screen, you’ll see the correct number of digital pins, analog pins, and the serial monitor. The code is relatively new, and we noticed that the digital and output pins seem to work only for outputs. There is no way to modify any of the values from the user interface. You can, however, enter things into the serial monitor.

You can run a canned demo that uses digital and analog output. There is also another sample that uses the serial port. Unlike some other simulators, you can’t really add much external circuitry but, for some purposes, that isn’t a problem.

If you are looking for more, there is Simulide, which is also free. Falstad can do mixed signal simulations with Arduino code. There’s also Wokwi, which we’ve covered a few times before.

Hack a Day 17 Jan 19:30

Remote-Control Kinetic Sand Table Uses a Single Arduino

There’s nothing fun about a Sisyphean task unless you’re watching one being carried out by someone or something else. In that case, it can be mesmerizing like this Arduino-driven kinetic sand table.

What you can’t see. Image via [thang010146] on YouTube
Like many of these builds, it all started with an ordinary coffee table from the hacker’s favorite furnitüre store. [NewsonsElectronics] opened it up and added a 3mm-thick board to hold the sand and another to hold the rails and magnets.

After designing some pieces to connect the rails and pulleys together, [NewsonsElectronics] let the laser cutter loose on some more 3mm stock. A pair of stepper motors connected to a CNC shield do all of the work, driving around a stack of magnets that causes the ball bearing to trudge beautifully through the sand.

Be sure to check out the videos after the break. The first is a nice demonstration, and the second is the actual build video. In the third video, [NewsonsElectronics] explains how they could write the world’s smallest GRBL code to swing this with a single Arduino. Hint: it involves removing unnecessary data from the g-code generated by Sandify.

Don’t have a laser cutter? Here’s a sand table built from 3D printer parts.

CH32 RISC-V MCUs Get Official Arduino Support

Like many of you, we’ve been keeping a close eye on the CH32 family of RISC-V microcontrollers from WCH Electronics. You can get the CH32V003, featuring 2 kB RAM and 16 kB of flash for under fifteen cents, and the higher-end models include impressive features like onboard Ethernet. But while the hardware is definitely interesting, the software side of things has been a little rocky compared to what we’ve come to expect from modern MCUs.

Things should start looking up a bit though with the release of an Arduino core for the CH32 direct from WCH themselves. It’s been tested on Windows, Linux, and Mac, and supports the CH32V00x, CH32V10x, CH32V20x, CH32V30x, and CH32X035 chips. Getting it installed is as easy as adding the URL to the Arduino IDE’s Boards Manager interface, though as the video below shows, running it on Linux does require an extra step or two.

So far, we’ve seen several projects, like this temperature sensor or this holiday gizmo that use [cnlohr]’s open-source toolchain. But there’s no question that plenty of hobbyists out there feel more comfortable in the Arduino environment, and if those folks are now able to pick up a CH32 and do something cool, that means more people jumping on board, more libraries developed, more demo code written…you get the idea.

Just like the ESP8266’s popularity exploded when it was added to the Arduino IDE, we’ve got high hopes for the CH32 family in the coming months.

A High-End Studio Multiplexer Surrenders To An Arduino

The equipment used in professional radio and TV studios is both extremely high quality and very expensive indeed, and thus out of the reach of an experimenter. Happily as studios are refurbished there’s a steady supply of second-hand equipment which can be surprisingly cheap, but as [Nathan] found out with a Quartz audio router, comes with no control software. What’s to be done with what’s essentially a piece of junk? Remove its brain and replace it with one that can be controlled, of course!

On the PCB alongside a bank of switch matrices is an FPGA which does the heavy lifting. That’s “heavy” in a limited sense, because all it does is handle the chip select lines for the matrices and write data to their registers. This is a task that can be handled by a microcontroller, so in goes an Arduino Nano, which along with a few other board modifications delivers a serial-controlled studio router.

The interesting part for us in this project comes from a look at the date codes on the board, they’re from the early 2000s. This is (roughly) contemporary with the ATmega chip on the Arduino, so we’re curious as to why the designers saw fit to use an FPGA when the microcontrollers of the day were clearly up to the task for much less outlay. We suspect a touch of millennium-era price inflation, but we can’t be sure.

Meanwhile, old broadcast kit has featured here before.

Hack a Day 28 Dec 06:00

VU Meter Built With Neat Graphical VFD Display

VFD displays are beloved for their eerie glow that sits somewhere just off what you’d call blue. [mircemk] used one of these displays to create an old-school VU meter that looks straight out of a 1970s laboratory. 

The build uses an Arduino Nano as the brains of the operation, which uses its analog inputs to process incoming audio into decibel levels for display on a VU meter. It’s then charged with driving a GP1287 VFD display. Unlike some VFDs that have preset segments that can be illuminated or switched off, this is a fully graphical dot matrix display that can be driven as desired. Thus, when it’s not acting as a bar graph VU meter, it can also emulate old-school moving-needle meters. Though, it bears noting, the slow updates the Arduino makes to the display means it’s kind of like those dodgy skeumorphic music apps of the 16-bit era; i.e. it’s quite visually jerky.

Overall, it’s a neat project that demonstrates how to work with audio, microcontrollers, and displays all in one. We’ve featured other projects from [mircemk] before, too, almost all of which appear in the same blue and grey project boxes. Video after the break.

Hack a Day 22 Dec 00:00

Arduino Measures Remaining Battery Power With Zero Components, No I/O Pin

[Trent M. Wyatt]’s CPUVolt library provides a fast way to measure voltage using no external components, and no I/O pin. It only applies to certain microcontrollers, but he provides example Arduino code showing how handy this can be for battery-powered projects.

The usual way to measure VCC is simple, but has shortcomings.

The classical way to measure a system’s voltage is to connect one of your MCU’s ADC pins to a voltage divider made from a couple resistors. A simple calculation yields a reading of the system’s voltage, but this approach has two disadvantages: one is that it constantly consumes power, and the other is that it ties up a pin that you might want to use for something else.

There are ways to mitigate these issues, but it would be best to avoid them entirely. Microchip application note 2447 describes a method of doing exactly that, and that’s precisely what [Trent]’s Arduino library implements.

What happens in this method is one selects Vbg (a fixed internal voltage reference that is temperature-independent) as Vin, and selects Vcc as the ADC’s voltage reference. This is essentially backwards from how the ADC is normally used, but it requires no external hookup and is only a bit of calculation away from determining Vcc in millivolts. There is some non-linearity in the results, but for the purposes of measuring battery power in a system or deciding when to send a “low battery” signal, it’s an attractive solution.

Being an Arduino library, CPUVolt makes this idea very easy to use, but the concept and method is actually something we have seen before. If you’re interested in the low-level details, then check out our earlier coverage which goes into some detail on exactly what is going on, using an ATtiny84.

1D LED PONG, Arduino-Style

Maybe it’s just us, but isn’t it kind of amazing that in a world of pretty darn realistic games, PONG is still thrilling to play? This 1D implementation by [newsonator] is about as exciting as it gets.

It works like you’d probably expect — the light moves back and forth between the two players. Keep it in the green and you have a nice, gentle volley going. Let it hit your red LED and you’ve lost a point. But if you can push your button while your yellow LED is lit, the light speeds up tremendously until the next button press in the green.

Our only wish is that subsequent yellow-light button presses would make it speed up even more. But there are really just the two speeds with the current programming.

Inside the cool laser-cut box is an Arduino Uno and a 9V battery, plus a current-limiting resistor and the all-important buzzer. We like how [newsonator] wired up the LEDs to the Arduino by soldering them to a row of header pins and sticking that into the Arduino so it can be used in other projects down the line. We also like how [newsonator] shoved a couple of dowels through the box to ultimately support the two buttons.

Check out the intro video after the break for the overall details. The build is done over a few different short videos which follow.

Although this is pretty small, it isn’t quite the minimum viable.

 

Hack a Day 16 Dec 00:00