Posts with «arduino» label

Learn Sailing Mechanics Without Leaving Dry Land

The ancient art of sailing can be very intimidating for the uninitiated given the shifty nature of wind. To help understand the interaction of wind direction and board orientation, [KifS] designed a hands-on sailing demonstrator that lets students grasp the basics before setting foot on a real sailboat.

The demonstrator uses a potentiometer as a tiller to control a model sailboat’s angle, while another stepper motor adjusts the position of a fan to simulate changing wind directions. With an Arduino Uno controlling everything, this setup affords students the opportunity to learn about sail positioning and adjusting to shifting winds in an interactive way, without the pressures and variables of being on the water.

[KifS]’s creation isn’t just about static demonstrations. It features four modes that progressively challenge learners—from simply getting a feel for the tiller, to adjusting sails with dynamic wind changes, even adding a game element that introduces random wind movements demanding quick adjustments. [KifS] mentions there are potentials aspects that can be refined, like more realistic sail response and usability, but it already achieved the main project goals.

There are a myriad of potential ways to add new tech to the ancient art of sailing. We’ve seen a DIY autopilot system, full sensor arrays, and an open source chart plotter. It’s even been proven you can have a wind powered land vehicle that travels faster than the wind.

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

Darkroom Robot Automates Away the Tedium of Film Developing

Anyone who has ever processed real analog film in a darkroom probably remembers two things: the awkward fumbling in absolute darkness while trying to get the film loaded into the developing reel, and the tedium of getting the timing for each solution just right. This automatic film-developing machine can’t help much with the former, but it more than makes up for that by taking care of the latter.

For those who haven’t experienced the pleasures of the darkroom — and we mean that sincerely; watching images appear before your eyes is straight magic — film processing is divided into two phases: developing the exposed film from the camera, and making prints from the film. [kauzerei]’s machine automates development and centers around a modified developing tank and a set of vessels for the various solutions needed for different film processes. Pumps and solenoid valves control the flow of solutions in and out of the developing tank, while a servo mounted on the tank’s cover gently rotates the reel to keep the film exposed to fresh solutions; proper agitation is the secret sauce of film developing.

The developing machine has a lot of other nice features that really should help with getting consistent results. The developing tank sits on a strain gauge, to ensure the proper amount of each solution is added. To avoid splotches that can come from using plain tap water, rinse water is filtered using a household drinking water pitcher. The entire rig can be submerged in a heated water bath for a consistent temperature during processing. And, with four solution reservoirs, the machine is adaptable to multiple processes. [kauzerei] lists black and white and C41 color negative processes, but we’d imagine it would be easy to support a color slide process like E6 too.

This looks like a great build, and while it’s not the first darkroom bot we’ve seen — we even featured one made from Lego Technics once upon a time — this one has us itching to get back into the darkroom again.

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.

Arduino Auto-Glockenspiel Looks Proper in Copper

What is it about solenoids that makes people want to make music with them? Whatever it is, we hope that solenoids never stop inspiring people to make instruments like [CamsLab]’s copper pipe auto-glockenspiel.

At first, [CamsLab] thought of striking glasses of water, but didn’t like the temporary vibe of a setup like that. They also considered striking piano keys, but thought better of it when considering the extra clicking sound that the solenoids would make, plus it seemed needlessly complicated to execute. So [CamsLab] settled on copper pipes.

That in itself was a challenge as [CamsLab] had to figure out just the right lengths to cut each pipe in order to produce the desired pitch. Fortunately, they started with a modest 15-pipe glockenspiel as a proof of concept. However, the most challenging aspect of this project was figuring out how to mount the pipes so that they are close enough to the solenoids but not too close, and weren’t going to move over time. [CamsLab] settled on fishing line to suspend them with a 3D-printed frame mounted on extruded aluminium. The end result looks and sounds great, as you can hear in the video after the break.

Of course, there’s more than one way to auto-glockenspiel. You could always use servos.