Posts with «arduino mega» label

Pinball Machine Needs No Wizard

Ever since he was a young boy, [Tyler] has played the silver ball. And like us, he’s had a lifelong fascination with the intricate electromechanical beasts that surround them. In his recently-completed senior year of college, [Tyler] assembled a mechatronics dream team of [Kevin, Cody, and Omar] to help turn those visions into self-playing pinball reality.

You can indeed play the machine manually, and the Arduino Mega will keep track of your score just like a regular cabinet. If you need to scratch an itch, ignore a phone call, or just plain want to watch a pinball machine play itself, it can switch back and forth on the fly. The USB camera mounted over the playfield tracks the ball as it speeds around. Whenever it enters the flipper vectors, the appropriate flipper will engage automatically to bat the ball away.

Our favorite part of this build (aside from the fact that it can play itself) is the pachinko multi-ball feature that manages to squeeze in a second game and a second level. This project is wide open, and even if you’re not interested in replicating it, [Tyler] sprinkled a ton of good info and links to more throughout the build logs. Take a tour after the break while we have it set on free play.

[Tyler]’s machine uses actual pinball machine parts, which could quickly ramp up the cost. If you roll your own targets and get creative with solenoid sourcing, building a pinball machine doesn’t have to be a drain on your wallet.

Model Rocket Launcher Is So Serious, It Has a Briefcase

What could be more thrilling than launching a complex rocket that you built yourself? For starters, launching it with literally anything better than the stock ignition system would be a step in the right direction. How about a briefcase full of fantastically fun overkill?

[FastEddy59] is in the middle of building a model rocket complete with a Thrust Vector Control (TVC) system to help with stabilization. Much to our delight, he’s designed an equally ambitious controller to spice up the launch sequence with security codes and a physical key. And what’s a launch controller without a giant emergency stop button to shut down everything? Incomplete, if you ask us.

Under the carbon fiber-wrapped acrylic hood, there’s an Arduino MEGA engine and an NRF24 LoRa module for transmission to the rocket. There’s even a DHT11 temperature sensor to verify that launch conditions are ideal. It’s still a work in progress with plenty of features to come, like fancier labels and plenty of launch-appropriate sound files for the hidden speaker. There’s a lot to this case, and [FastEddy59]’s video brief is ready and waiting on the pad after the break.

[FastEddy59] plans to hold the first launch in a few months, and we sincerely hope he outfits the rocket with a camera.

Z80 Computer Is Both Arduino And Shield

There have been plenty of Z80 computer builds here on Hackaday, but what sets them apart is what you do with them. [Andrew] writes in with his Z80 single-board computer made from scratch, using the Arduino standard headers for its I/O. In turn, since he needed an easy way to program the flash memory which holds the software to run on the Z80, he used an Arduino Mega as a debugger, making the SBC an Arduino shield itself.

Using such a common header pinout for the Z80 computer allows it to be used with a variety of readily-available Arduino shields. This compatibility is achieved with an analog-digital converter and a 3.3 V regulator, mimicking the pins found in an Arduino Uno. The code, available on GitHub, includes an extensive explanation and walkthrough over the process in which the Mega takes over the bus from the Z80 to function as a fully-featured debugger. Programs can be loaded through embedding an assembly listing into the Mega’s sketch, or, once the debugger is up you can also upload a compiled hex file through the serial connection.

This isn’t the first time [Andrew] has been featured here, and his past projects are just as interesting. If you need to translate a Soviet-era calculator’s buttons into English, hack a metallurgical microscope or even investigate what’s that Clacking Clanking Scraping Sound, he’s the one you should call.

Plucky Kalimba Plays Itself

[Gurpreet] fell in love with the peaceful, floaty theme from the Avatar series and bought a kalimba so he could hear it resonate through his fingertips. He soon realized that although it’s nice to play the kalimba, it would be a lot cooler if it played itself. Then he could relax and enjoy the music without wearing out his thumbs.

After doing a bit of experimentation with printing tine-plucking extensions for the servo horns, [Gurpreet] decided to start the design process by mounting the servos on a printed base. The servos are slotted into place by their mounting tabs and secured with hot glue. We think this was a good choice — it’s functional and it looks cool, like a heat sink.

[Gurpreet]’s future plans include more servos to pluck the rest of the tines, and figuring out how feed it MIDI and play it real time. For the demo after the break, [Gurpreet] says he lapel mic’d the kalimba from the back and cut out the servo noise with Audacity, but ultimately wants to figure out how to quiet them directly. He’s going to try lubing the gears and making a sound-dampening enclosure with foam, but if you have any other ideas, let him know down below.

We don’t see too many kalimba projects around here, but here’s one connected to a Teensy-based looper.

Via [r/arduino]

Bad Apple!! Via The Arduino Mega

The Arduino Mega is a useful tool for the maker. Generally, once one has come up with plans for blinking LEDs that require more IO than is available on the Arduino Uno, one graduates to the Mega and goes for broke. However, it’s not typically what we’d consider as our first choice for video work. [Stephane] begs to differ, and coded this Bad Apple!! demo for the Arduino Mega 2560.

For those unfamiliar, video on the Arduino is actually somewhat of a solved problem – merely requiring a pair of resistors and some nifty code. The real meat of this hack is the video storage itself. It’s been done before, but by streaming data off an SD card or serial link. [Stephane] was determined to store everything on the Arduino itself, and thus the hack begun. Video data is stored as 1 bit per pixel, as it’s a simple black and white video as per the original inspiration. LZ77 compression was used to cram the data down without requiring too much RAM, which is a limited resource on the Mega. It’s video only, as the Mega is tapped out handling 3 minutes and 39 seconds of video storage, but future work may include syncing with a second Arduino to deliver the soundtrack.

It’s a hack that shows off [Stephane]’s ability to get impressive performance out of limited platforms. We’ve seen this before, with his excellent Star Fox port to the Arduboy. Video after the break.

Check the weather on this Arduino-controlled split-flap display

Split-flap displays show information using characters changed by an electric motor. While they’ve largely been replaced by more modern means, hobbyists like “gabbapeople” have been keeping this this technique alive, in this case as a four-character weather display.

The device is built using laser-cut plexiglass, and uses four individual servos to actuate the character flaps. Control is accomplished using an Arduino Mega programmed in the XOD visual programming environment, along with the requisite driver modules. Weather data is pulled from the AccuWeather API. 

You can see it flapping away in the video below, displaying the weather in abbreviations such as “ICLO” for intermittent clouds, as well as the temperature in degrees Celsius.

An Arduino “Whack-a-Button” Reaction Game

After Instructables user R0RSHACH’s son won a place at the World Scout Jamboree in 2019, the maker decided to create a fairground-style game for fundraising. 

The resulting device is akin to a Whack-a-Mole or Batak game that can be found at high-end gyms, and features eight large light-up buttons per player on a wooden frame.

When activated, an Arduino Mega turns on the button-lights in sequence to test how long it takes participants to push each one. While it can be made in a single-player version, the two-player game looks like a lot more fun, allowing participants to compete on opposing boards. 

Code and instructions are available here, and you can see it demonstrated in the videos below.

Reviving an Electron Microscope with Arduino

We don’t know about you, but when our friends ask us if we want to help them fix something, they’re usually talking about their computer, phone, or car. So far it’s never been about helping them rebuild an old electron microscope. But that’s exactly the request [Benjamin Blundell] got when a friend from a local hackerspace asked if he could take a look at a vintage Cambridge Stereoscan 200 they had found abandoned in a shed. Clearly we’re hanging out with the wrong group of people.

As you might imagine, the microscope was in desperate need of some love after spending time in considerably less than ideal conditions. While some of the hackerspace members started tackling the hardware side of the machine, [Benjamin] was tasked with finding a way to recover the contents of the scope’s ROM. While he’s still working on verification, the dumps he’s made so far of the various ROMs living inside the Stereoscan 200 have been promising and he believes he’s on the right track.

The microscope uses a mix of Texas Instruments 25L32 and 2516 chips, which [Benjamin] had to carefully pry out after making sure to document everything so he knew what went where. A few of the chips weren’t keen on being pulled from their home of 30-odd years, so there were a few broken pins, but on the whole the operation was a success.

Each chip was placed in a breadboard and wired up to an Arduino Mega, as it has enough digital pins to connect without needing a shift register. With the wiring fairly straightforward, [Benjamin] just needed to write up some code to read the contents of the chip, which he has graciously provided anyone else who might be working on a similar project. At this point he hasn’t found anything identifiable in his ROM dumps to prove that they’ve been made successfully, all he really knows right now is that he has something. At least it’s a start.

More and more of these older electron microscopes are getting a second lease on life thanks to dedicated hackers in their home labs. Makes you wonder if there’s ever going to be a piece of hardware the hacker community won’t bend to their will.

RGB Disk Goes Interactive with Bluetooth; Shows Impressive Plastic Work

[smash_hand] had a clear goal: a big, featureless, white plastic disk with RGB LEDs concealed around its edge. So what is it? A big ornament that could glow any color or trippy mixture of colors one desires. It’s an object whose sole purpose is to be a frame for soft, glowing light patterns to admire. The disk can be controlled with a simple smartphone app that communicates over Bluetooth, allowing anyone (or in theory anything) to play with the display.

The disk is made from 1/4″ clear plastic, which [smash_hand] describes as plexiglass, but might be acrylic or polycarbonate. [smash_hands] describes some trial and error in the process of cutting the circle; it was saw-cut with some 3-in-1 oil as cutting fluid first, then the final shape cut with a bandsaw.

The saw left the edge very rough, so it was polished with glass polishing compound. This restores the optical properties required for the edge-lighting technique. The back of the disc was sanded then painted white, and the RGB LEDs spaced evenly around the edge, pointing inwards.

The physical build is almost always the difficult part in a project like this — achieving good diffusion of LEDs is a topic we talk about often. [smash_hands] did an impressive job and there are never any “hot spots” where an LED sticks out to your eye. With this taken care of, the electronics came together with much less effort. An Arduino with an HC-05 Bluetooth adapter took care of driving the LEDs and wireless communications, respectively. A wooden frame later, and the whole thing is ready to go.

[smash_hands] provides details like a wiring diagram as well as the smartphone app for anyone who is interested. There’s the Arduino program as well, but interestingly it’s only available in assembly or as a raw .hex file. A video of the disk in action is embedded below.

Making LED lighting interactive comes in many different shapes and forms, and as the disk above shows, shifting color patterns can be pleasantly relaxing.

Debugging with Serial Print at 5333333 Baud

Debugging with printf is something [StorePeter] has always found super handy, and as a result he’s always been interested in tweaking the process for improvements. This kind of debugging usually has microcontrollers sending messages over a serial port, but in embedded development there isn’t always a hardware UART, or it might already be in use. His preferred method of avoiding those problems is to use a USB to Serial adapter and bit-bang the serial on the microcontroller side. It was during this process that it occurred to [StorePeter] that there was a lot of streamlining he could be doing, and thanks to serial terminal programs that support arbitrary baud rates, he’s reliably sending debug messages over serial at 5.3 Mbit/sec, or 5333333 Baud. His code is available for download from his site, and works perfectly in the Arduino IDE.

The whole thing consists of some simple, easily ported code to implement a bare minimum bit-banged serial communication. This is output only, no feedback, and timing consists of just sending bits as quickly as the CPU can handle, leaving it up to the USB Serial adapter and rest of the world to handle whatever that speed turns out to be. On a 16 MHz AVR, transmitting one bit can be done in three instructions, which comes out to about 5333333 baud or roughly 5.3 Mbit/sec. Set a terminal program to 5333333 baud, and you can get a “Hello world” in about 20 microseconds compared to 1 millisecond at 115200 baud.

He’s got additional tips on using serial print debugging as a process, and he’s done a followup where he stress-tests the reliability of a 5.3 MBit/sec serial stream from an ATMega2560 at 16 MHz in his 3D printer, and found no missed packets. That certainly covers using printf as a debugger, so how about a method of using the debugger as printf?