Posts with «arduino» label

Automated Chess Board Plays You

If you’ve ever played chess or even checkers, you’ve probably thought about making a board that lets a computer play you without having to enter your moves and look at the board on a screen. [Greg06] not only thought about it, but he built it.

The board looks great and uses foamboard which makes it easy to reproduce. Each piece has a small magnet within and an electromagnet on an XY motion system can selectively pick up and move pieces. In addition, a reed switch under each square can tell if a square is occupied or not.

This system is pretty simple, but it is effective. After all, you know the position of the pieces at the start. So if a bishop leaves a square and a new square gets a piece, you can assume it is the bishop. There is no need to actually distinguish the pieces.

An LCD and some buttons act as a chess clock, and note if a move is illegal. The Arduino has a pretty basic chess algorithm known as Micro Max that runs on the Arduino, but we wondered if you couldn’t connect to a remote computer to get more sophisticated gameplay or even interface to the Internet to play remote humans, something we’ve seen before. You could even adapt it for other input methods.

Hack a Day 05 Mar 00:00

Split Flap Display Tells Us The Word

LED and LCD displays are a technological marvel. They’ve brought the price of televisions and monitors down to unheard-of levels since the days of CRTs, but this upside arguably comes with an aesthetic cost. When everything is covered in bland computer screens, the world tends to look a lot more monotonous. Not so several decades ago when there were many sharply contrasting ways of displaying information. One example of this different time comes to us by way of this split-flap display that [Erich] has been recreating.

Split-flap displays work by printing letters or numbers on a series of flaps that are attached to a spindle with a stepper motor. Each step of the motor turns the display by one character. They can be noisy and do require a large amount of maintenance compared to modern displays, but have some advantages as well. [Erich]’s version is built out of new acrylic and MDF, and uses an Arduino as the control board. A 3D printer and CNC machine keep the tolerances tight enough for the display to work smoothly and also enable him to expand the display as needed since each character display is fairly modular.

Right now, [Erich]’s display has 20 characters on two different rows and definitely brings us back to the bygone era where displays of this style would have been prominent in airports and train stations. This display uses a lot of the basics from another split flap display that we featured a few years ago but has some improvements. And, if you’d prefer restorations of old displays rather than modern incarnations, we have you covered there as well.

Thanks to [Bob] for the tip!

Pressure Gauge Built In A Vacuum

Necessity might be the mother of all invention, but we often find that inventions around here are just as often driven by expensive off-the-shelf parts and a lack of willingness to spend top dollar for them. More often than not, we find people building their own tools or parts as if these high prices are a challenge instead of simply shrugging and ordering them from a supplier. The latest in those accepting the challenge of building their own parts is [Advanced Tinkering] who needed a specialty pressure gauge for a vacuum chamber.

In this specific case, the sensor itself is not too highly priced but the controller for it was the deal-breaker, so with a trusty Arduino in hand a custom gauge was fashioned once the sensor was acquired. This one uses an external analog-to-digital converter to interface with the sensor with 16-bit resolution, along with some circuitry to bring the ~8 V output of the sensor down to the 5 V required by the microcontroller. [Advanced Tinkering] wanted a custom live readout as well, so a 3D printed enclosure was built that includes both an LCD readout of the pressure and a screen with a graph of the pressure over time.

For anyone else making sensitive pressure measurements in a vacuum chamber, [Advanced Tinkering] made the project code available on a GitHub page. It’s a great solution to an otherwise overpriced part provided you have the time to build something custom. If you’re looking for something a little less delicate, though, take a look at this no-battery pressure sensor meant to ride along on a bicycle wheel.

Hack a Day 23 Feb 16:30

Unique Clock is All Hands, No Dial, and Does the Worm

Back in the old days, we didn’t have fancy digital clocks. No, we had good analog clocks with a big hand and a little hand, and if you wanted to know the time you had to look at the clock and figure out which number each hand was pointing at, or kind of pointing at. It wasn’t easy, and we liked it that way.

So now, along comes an analog clock that’s nothing but the hands — no dial, no numbers, just hands. How is such a thing possible? The clue is in the clock’s name: AKUROBATTO, and in the video below, which shows the acrobatic movements of the clock’s hands as it does its thing. Serial improbable-clock maker [ekaggrat singh kalsi] clearly put a lot of thought into this mechanism, which consists of the hands and a separate base. The hands are joined together at one end and powered by small stepper motors. The base has two docking areas, where servo-driven claws can grasp the hand assembly, either at the center pivot or at the tip of either hand. With a little bit of shuffling around at transition points, the hands sweep out the hours and minutes in a surprisingly readable way.

For as cool as the design of AKUROBATTO is, the internals are really something else. There are custom-built slip rings to send power to the motors and the Arduinos controlling them, sensors to determine the position of each hand, and custom gearboxes for the steppers. And the locking mechanisms on the base are worth studying too — getting that right couldn’t have been easy.

All in all, an impressive build. Whether displaying the time on a phosphorescent screen or a field of sequins, it seems like [ekaggrat] has a thing for unique clocks.

Hack a Day 17 Feb 21:00

Sending MIDI Wirelessly With The nRF24L01

MIDI is a standard known by musicians and instruments all over the world. The basic twist on regular serial has helped studios around the world to work more efficiently. [Kevin] wanted to try sending MIDI data wirelessly, but rather than the typical Bluetooth solution, decided to use the humble nRF24L01 instead.

The circuitry used is simple: [Kevin] simply wired up two Arduino Unos with nRF24L01 radio modules, which communicate over SPI. Alternatively, an even quicker solution is to use a Keywish Arduino RF Nano, which packs a nRF24L01 on board. One Arduino can then be hooked up to a MIDI OUT port on an instrument, and it will send out MIDI signals wirelessly. The second Arduino can then be plugged into a MIDI IN port and repeat out what it receives over the air.

The real work was in the firmware, which takes MIDI data and packages it in a suitable form to send out over the nRF24L01. The system can operate in a one-to-one mode, emulating a single MIDI cable, or a multicast mode, where one sender transmits information to many receivers.

It’s a neat hack and one we could imagine would be useful in some fun performance situations. We’ve seen others do work on wireless MIDI interfaces for Eurorack hardware, too. Video after the break.

You Can Send MIDI Over I2C If You Really Need To

The Musical Instrument Digital Interface has a great acronym that is both nice to say and cleanly descriptive. The standard for talking to musical instruments relies on a serial signal at 31250 bps, which makes it easy to transmit using any old microcontroller UART with a settable baud rate. However, [Kevin] has dived into explore the utility of sending MIDI signals over I2C instead.

With a bit of hacking at the Arduino MIDI library, [Kevin] was able to get the microcontroller outputting MIDI data over the I2C interface, and developed a useful generic I2C MIDI transport for the platform. His first tests involved using this technique in concert with Gravity dual UART modules. After he successfully got one running, [Kevin] realised that four could be hooked up to a single Arduino, giving it 8 serial UARTS, or, in another way of thinking, 8 MIDI outputs.

At its greatest level of development, [Kevin] shows off his I2C MIDI chops by getting a single Raspberry Pi Pico delivering MIDI signals to 8 Arduinos, all over I2C. All the Arduinos are daisy-chained with their 5V and I2C lines wired together, and the system basically swaps out traditional MIDI channels for I2C addresses instead.

There’s not a whole lot of obvious killer applications for this, but if you want to send MIDI data to a bunch of microcontrollers, you might find it easier daisy-chaining I2C rather than hopping around with a serial line in the classic MIDI-IN/MIDI-THRU fashion.

We’ve seen [Kevin]’s work before too, like the wonderful Lo-Fi Orchestra. Video after the break.

Hack a Day 16 Feb 06:00

Weather Station Predicts Air Quality

Measuring air quality at any particular location isn’t too complicated. Just a sensor or two and a small microcontroller is generally all that’s needed. Predicting the upcoming air quality is a little more complicated, though, since so many factors determine how safe it will be to breathe the air outside. Luckily, though, we don’t need to know all of these factors and their complex interactions in order to predict air quality. We can train a computer to do that for us as [kutluhan_aktar] demonstrates with a machine learning-capable air quality meter.

The build is based around an Arduino Nano 33 BLE which is connected to a small weather station outside. It specifically monitors ozone concentration as a benchmark for overall air quality but also uses an anemometer and a BMP180 precision pressure and temperature sensor to assist in training the algorithm. The weather data is sent over Bluetooth to a Raspberry Pi which is running TensorFlow. Once the neural network was trained, the model was sent back to the Arduino which is now capable of using it to make much more accurate predictions of future air quality.

The build goes into quite a bit of detail on setting up the models, training them, and then using them on the Arduino. It’s an impressive build capped off with a fun 3D-printed case that resembles an old windmill. Using machine learning to help predict the weather is starting to become more commonplace as well, as we have seen before with this weather station that can predict rainfall intensity.

IR Translator Makes Truly Universal Remote

Universal remotes are a handy tool to have around if you have many devices that would all otherwise have their own remote controls. Merging them all into a single device leads to less clutter and less frustration, but they are often not truly “universal” as some of them may not support every infrared device that has ever been built. If you’re in a situation like that it’s possible to build a truly universal remote instead, provided you have a microcontroller and a few infrared LEDs on hand.

This was the situation that [Matt] found himself in when his Amazon Fire TV equipment control feature didn’t support his model of speakers. To get around this he programmed an Arduino to essentially translate the IR codes from the remote and output a compatible set of codes to the speakers.This requires both an IR photodiode and an IR LED but little else other than the codes for the remote and the equipment in question. With that all set up and programmed into the Aruino, [Matt]’s remote is one step closer to being truly “universal”.

While [Matt] was able to make use of existing codes in the Arduino library, it is also possible to capture the codes required manually by pointing a remote at a photodiode and programming a microcontroller to capture the codes that you need. [Matt] used a Raspberry Pi to do this when debugging this project, but we’ve also seen this method used with a similar build which uses an ESP8266 to control an air conditioner via its infrared remote control capabilities.

HDD Centrifuge Puts COVID-19 Testing Lab in a Backpack

Throughout this two-year global COVID-19 nightmare, one thing that has been sorely lacking is access to testing. “Flu-like symptoms” covers a lot of ground, and knowing if a sore throat is just a sore throat or something more is important enough that we’ve collectively plowed billions into testing. Unfortunately, the testing infrastructure remains unevenly distributed, which is a problem this backpack SARS-CoV-2 testing lab aims to address.

The portable lab, developed by [E. Emily Lin] and colleagues at the Queen Mary University of London, uses a technique called LAMP, for loop-mediated isothermal amplification. LAMP probably deserves an article of its own to explain the process, but suffice it to say that like PCR, LAMP amplifies nucleic acid sequences, but does so without the need for expensive thermal cycling equipment. The kit contains a microcentrifuge that’s fashioned from an e-waste hard drive, a 3D printed rotor, and an Arduino to drive the motor and control the speed. The centrifuge is designed to run on any 12 VDC source, meaning the lab can be powered by a car battery or solar panel if necessary. Readout relies on the trusty Mark I eyeball and a pH-indicating buffer that changes color depending on how much SARS-CoV-2 virus was in the sample.

Granted, the method used here still requires more skill to perform than a simple “spit on a stick” rapid antigen test, and it’s somewhat more subjective than the “gold standard” quantitative polymerase chain reaction (qPCR) assay. But the method is easily learned, and the kit’s portability, simple design, and low-cost construction could make it an important tool in attacking this pandemic, or the next one.

Thanks to [Christian Himmler] for the tip.

1960s Stereo Console Gets an Upgrade

Faced with an old console stereo from the 1960s that was barely functional, [Sherman Banks] aka W4ATL decided to upgrade its guts while keeping its appearance as close to the original as possible. This stereo set is a piece of mahogany furniture containing an AM/FM stereo receiver and an automatic turntable from JCPenny’s Penncrest line. As best [Sherman] can determine, it is most likely a 1965 model. The old electronics were getting more and more difficult to repair and the tuner was drifting off-station every 15 minutes. He didn’t want to throw it away, so he decided to replace all the innards.

The first thing was to tear out the old electronics while retaining the chassis proper. The new heart of the entertainment center is a modern Denon AV stereo receiver. This unit can be controlled over Ethernet, has a radio tuner, inputs for SiriusXM and a turntable, and supports Bluetooth streaming. [Sherman] next replaced the 1965 turntable, and then turned his attention to connecting up the controls and indicators.

The potentiometers were replaced with equivalent ones of lower resistance, the neon stereo indicator was replaced with an LED, but the linear tuning dial proved to be a nearly two month challenge and resulted in a cool hack. In brief, he connected an optical rotary encoder to the tuning knob and used a stepper motor with a linear actuator to control the dial indicator. All this is controlled from an Arduino Mega 2560 with three shields for I/O and LAN. But there was still one remaining issue — without vacuum tubes to warm up, the radio would play immediately after power-on. [Sherman] fixed that by programming the Arduino to slowly ramp up the volume at the same rate as the original tube receiver. And finally, he installs a small HDMI monitor in the corner to display auxiliary information and metadata from the Denon receiver.

Check out the videos below the break. We wrote about a couple of similar conversions in the past: this one from 2018 was also a Penncrest, and from last year this COVID isolation project that emphasized the addition of a new liquor cabinet.