Posts with «arduino» label

Drink Water on Schedule or Else Flood Your Desk

How much water have you had to drink today? We would venture to guess that the answer is somewhere between ‘absolutely none’ and ‘not not nearly enough’. You can go ahead and blame poor work/life balance — that’s our plan, anyway — and just try to do better. All this working from home means the bathroom situation is now ideal, so why not drink as much water as you can?

But how? Well, you’re human, so you’ll need to make it as easy as possible to drink the water throughout the day. You could fill up one big jug and hoist it to your mouth all day long (or use a straw), but facing that amount of water all at once can be intimidating. The problem with using a regular-sized vessel is that you have to get up to refill it several times per day. When hyper-focus is winning the work/life tug-of-war, you can’t always just stop and go to the kitchen. What you need is an automatic water dispenser, and you need it right there on the desk.

[Javier Rengel]’s water pomodoro makes it as easy as setting your cup down in front of this machine and leaving it there between sips. As long as the IR sensor detects your cup, it will dispense water every hour. This means that if you don’t drink enough water throughout the day, you’re going to have it all over the desk at some point. [Javier] simply connected an Arduino UNO to a water pump and IR sensor pair and repurposed the milk dispenser from a coffee machine. Check it out in action after the break.

Of course, if you aren’t intimidated by the big jug approach, you could keep tabs on your intake with the right kind of straw.

The HackadayPrize2021 is Sponsored by:

Understanding Custom Signal Protocols with Old Nintendos

For retro gaming, there’s really no substitute for original hardware. As it ages, though, a lot of us need to find something passable since antique hardware won’t last forever. If a console isn’t working properly an emulator can get us some of the way there, but using an original controller is still preferred even when using emulators. To that end, [All Parts Combined] shows us how to build custom interfaces between original Nintendo controllers and a PC.

The build starts by mapping out the controller behavior. Buttons on a SNES controller don’t correspond directly to pins, rather a clock latches all of the button presses at a particular moment all at once during each timing event and sends that information to the console. To implement this protocol an Adafruit Trinket is used, and a thorough explanation of the code is given in the video linked below. From there it was a simple matter of building the device itself, for which [All Parts Combined] scavenged controller ports from broken Super Nintendos and housed everything into a tidy box where it can be attached via USB to his PC.

While it might seem like a lot of work to get a custom Nintendo controller interface running just because he had lost his Mega Man cartridge, this build goes a long way to understanding a custom controller protocol. Plus, there’s a lot more utility here than just playing Mega Man; a method like this could easily be used to interface other controllers as well. We’ve even seen the reverse process where USB devices were made to work on a Nintendo 64.

From Printer to Vinyl Cutter

Some might look at a cheap inkjet printer and see a clunky device that costs more to replace the ink than to buy a new one. [Abhishek Verma] saw an old inkjet printer and instead saw a smooth gantry and feed mechanism, the perfect platform to build his own DIY vinyl cutter.

The printer was carefully disassembled. The feed mechanism was reworked to be driven by a stepper motor with some 3D printed adapter plates. A solenoid-based push/pull mechanism for the cutting blade was added with a 3D printed housing along with a relay module. An Arduino Uno takes in commands from a computer with the help of a CNC GRBL shield.

What we love about this build is the ingenuity and reuse of parts inside the old printer. For example, the old PCB was cut and connectors were re-used. From the outside, it’s hard to believe that HP didn’t manufacture this as a vinyl cutter.

If you don’t have a printer on hand, you can always use your CNC as a vinyl cutter. But if you don’t have a CNC, [Abhishek] shares all the STL files for his cutter as well as the schematic. Video after the break.

Quick and Simple Morse Decoder

[Rostislav Persion] wrote a simple Morse Code decoder to run on his Arduino and display the text on an LCD shield. This is probably the simplest decoder possible, and thus its logic is pretty straightforward to follow. Simplicity comes at a price — changing the speed requires changing constants in the code. We would like to see this hooked up to a proper Morse code key, and see how fast [Rostislav] could drive it before it conks out.

In an earlier era of Morse code decoders, one tough part was dealing with the idiosyncrasies of each sender. Every operator’s style, or “fist”, has subtle variations in the timings of the dots, dashes, and the pauses between these elements, the letters, and the words. In fact, trained operators can recognize each other because of this, much like we can often recognize who is speaking on the phone just by hearing their voice. The other difficulty these decoders faced was detecting the signal in low signal-to-noise ratio environments — pulling the signal out of the noise.

A Morse decoder built today is more likely to be used to decode machine-generated signals, for example, debugging information or telemetry. This would more than likely be sent at fixed, known speeds over directly connected links with very high S/N ratios (a wire, perhaps). In these situations, a simple decoder like [Rostislav]’s is completely sufficient.

We wrote about a couple of Morse code algorithms back in 2014, the MorseDetector and the Magic Morse algorithm. While Morse code operators usually rank their skills by speed — the faster the better — this Morse code project for very low power transmitters turns that notion on its head by using speeds more suitably measured in minutes per word (77 MPW for that project). Have you used Morse code in any of your projects before? Let us know in the comments below.

Jigsaw Puzzle Lights Up With Each Piece

Putting the last piece of a project together and finally finishing it up is a satisfying feeling. When the last piece of a puzzle like that is a literal puzzle, though, it’s even better. [Nadieh] has been working on this jigsaw puzzle that displays a fireworks-like effect whenever a piece is placed correctly, using a lot of familiar electronics and some unique, well-polished design.

The puzzle is a hexagonal shape and based on a hexagonally symmetric spirograph, with the puzzle board placed into an enclosure which houses all of the electronics. Each puzzle piece has a piece of copper embedded in a unique location so when it is placed on the board, the device can tell if it was placed properly or not. If it was, an array of color LEDs mounted beneath a translucent diffuser creates a lighting effect that branches across the entire board like an explosion. The large number of pieces requires a multiplexer for the microcontroller, an ATtiny3216.

This project came out of a FabAcademy, so the documentation is incredibly thorough. In fact, everything on this project is open sourced and available on the project page from the code to the files required for cutting out the puzzle pieces and the enclosure. It’s an impressive build with a polish we would expect from a commercial product, and reminds us of an electrified jigsaw puzzle we saw in a previous build.

Thanks to [henk] for the tip!

Tiny Operating System For Tiny Computer

Before the World Wide Web became ubiquitous as the de facto way to access electronic information, there were many other ways of retrieving information online. One of the most successful of these was Minitel, a French videotex service that lasted from 1980 all the way until 2012. But just because the service has been deactivated doesn’t mean its hardware can’t be used for modern builds like this Arduino-based operating system. (Google Translate from French)

Called ZARDOS, the operating system is built to run on an Arduino MEGA although a smaller version is available for the Uno. The Arduino is connected by a serial cable to the Minitel terminal. It can take input from a keyboard and PS/2 mouse and displays video on the terminal screen with the same cable. There is functionality built-in for accessing data on a cartridge system based on SD cards which greatly expands the limited capabilities of the Atmel chip as well, and there is also support for a speaker and a Videotex printer.

Even though the build uses a modern microcontroller, it gives us flashbacks to pre-WWW days with its retro terminal. All of the code is available on the project site for anyone looking to build an Arduino-based operating system, although it will take a little bit of hardware hacking to build a Minitel terminal like this. Either way, it’s a great way to revive some antique French hardware similar to a build we’ve seen which converts one into a Linux terminal.

Thanks to [troisieme_type] for the tip!

Miata Sci-Fi Digital Dash

One of the hardest, but sometimes best, things you can do for a project is to walk away. [Jroobi] had spent hundreds of hours crafting the digital dash for his MX5 Miata (video, embedded below) and after spending far too long chasing down I2C bugs, he made the difficult decision to step away for a while. However, as of May 2021, [Jroobi] returned to the project and found a power supply was under-specified and was causing brownouts that resulted in crashes.

All in all, it’s an incredible work of engineering. Everything from the massive codebase that describes all the different states to the tasteful graphic design is masterfully done. The Star-Trek-inspired theme and attention to detail really show in the different modes on the tachometer. The dynamic soft RPM limit based on engine temperature is particularly ingenious.

Under the hood of this custom dash are two Ardunios running the show. The center media console offers more controls with a generous touch screen while the instrument cluster shows most of the data. They talk over I2C to each other and communicate with other parts in the car, such as the RGB cabin lighting and the TEIN electronic suspension dampeners. Fuel and temperature levels come in as voltage levels which can be read via an ADC. The gear position is calculated based on RPMs and speed given the wheel size and the transmission in the vehicle.

It is a phenomenal labor of love and if you’re inspired to further upgrade your Miata you might want to see how to put carbs on the engine or RGB light rings in the instruments.

Can the Solenoid Engine Power a Car?

[Emiel] aka [The Practical Engineer] makes all kinds of fun projects in his fully-featured shop, and one of his tangents has been building a series of solenoid engines. These engines mimic the function of an internal combustion engine, with each solenoid acting as a piston. The only problem with [Emiel]’s concept engines, though, was that he never actually put them into a vehicle to prove their effectiveness. This build finally proves that they can work at powering a vehicle.

The project starts with a new engine. [Emiel] chose a V4 design using four solenoids and an Arduino-based controller. After some trouble getting it to operate properly, he scavenged a small circuit board he built in his V8 solenoid engine to help with timing. With that installed, the solenoids click away and spin the crankshaft at a single constant speed. The vehicle itself was mostly 3D printed, with two aluminum tubes as support structures to mount the engine. Even the wheels were 3D printed with a special rubber coating applied to them. With a small drive train assembled, it’s off to the races for this tiny prototype.

While the small car doesn’t have steering and only goes at a constant speed, the proof of concept that these tiny electric engines actually work is a welcomed addition to [Emiel]’s collection of videos on these curious engines. Of course they’re not as efficient as driving the wheels directly with an electric motor, but we all know there’s no fun in that. If you haven’t seen his most intricate build, the V8 is certainly worth checking out, and also shows off the timing circuitry he repurposed for this car.

Big Spinning Disk Makes a Small Color Video Display

Believe it or not, the Mickey Mouse clip used for this demonstration is actually in the public domain.

The earliest televisions used a spinning disk technology called the Nipkow disk, which is exactly what [Science ‘n’ Stuff] recreated with their Arduino-based mechanical color television (video link, also embedded below.) The device reads video and audio from an SD card, and displays the video using a precisely-timed RGB LED visible through a perforated spinning disk. The persistence of vision effect results in a video that is small, relative to the size of the disk, but perfectly watchable. A twist is that the video is in color!

A Nipkow disk is a fairly simple and electromechanical device that relies on timing; something a modern microcontroller and RGB LED is perfectly capable of delivering. In this device, the holes in the disk create 32 vertical scanlines with 96 “pixels” making up each of those lines. Spinning disk technology was always limited to being monochromatic, but in this implementation, each “pixel” is given its own unique color by adjusting the RGB LED accordingly.

The first video shows off the device and demonstrates it working; note that it may look like there are multiple little screens, but the center one can be thought of as the “true” display with the others essentially being artifacts due to light leakage. If you’re interested in the nuts and bolts of exactly how a Nipkow disk works, then the second video is what you’ll be more interested in, because it goes through all the details of exactly how everything functions.

Another neat thing about Nipkow disks is that image acquisition is really not much more complex than image display.

[via Arduino Blog]

 

Learn Arduino with “Arduino Workshop, 2nd Edition: A Hands-on Introduction with 65 Projects”

After eight years and much feedback from various readers, I’m proud to offer the second edition of my first book “Arduino Workshop”, from No Starch Press. This is a revised update to this very popular book which is aimed at any person who wants to make electronic devices using the Arduino platform – but has no experience in electronics, programming or microcontrollers.

The reader doesn’t need to buy or read any other book first to get started, from the beginning they are introduced to the basic concepts, required software installation and then introduced to various topics from blinking an LED to controlling devices remotely via a cellular phone.

Contents include:

Chapter 1: Getting Started
Chapter 2: Exploring the Arduino Board and the IDE
Chapter 3: First Steps
Chapter 4: Building Blocks
Chapter 5: Working with Functions
Chapter 6: Numbers, Variables, and Arithmetic
Chapter 7: Expanding Your Arduino
Chapter 8: LED Numeric Displays and Matrices
Chapter 9: Liquid Crystal Displays
Chapter 10: Creating your own Arduino Libraries
Chapter 11: Numeric Keypads
Chapter 12: Accepting User Input with Touchscreens
Chapter 13: Meet the Arduino Family
Chapter 14: Motors and Movement
Chapter 15: Using GPS with Your Arduino
Chapter 16: Wireless Data
Chapter 17: Infrared Remote Control
Chapter 18: Reading RFID Tags
Chapter 19: Data Buses
Chapter 20: Real-time Clocks
Chapter 21: The Internet
Chapter 22: Cellular Communications

You can also review the entire book index from here.

Once the reader has progressed through “Arduino Workshop”, I have found that many people use it as a reference guide for various topics, and saves them time and effort. Instead of searching randomly for various videos, web pages or whatnot – this book offers solid, tried-and-tested information that can be relied on without worry.

Readers of the first edition will also be introduced to new chapters in this edition, such as learning how to create your own Arduino libraries, introduction to the new v2.0 IDE, using new types of LED displays, remote control of devices with LoRA wireless shields, an updated cellular chapter that uses contemporary 3G wireless, and more.

The book is printed using a convenient lie-flat technology, so you can have the book open to your side and not worry about the pages flapping about and losing your position while working on your projects. All the required code (or Arduino “sketches”) are included in the book, however you can also download them along with a list of parts and supplier information from the book’s website.

The Arduino platform in my opinion is still the easiest and most approachable way of learning about electronics and microcontrollers, and opens up a whole new world of creativity or even the pathway to a career in technology, and a copy of “Arduino Workshop” is the best guide to this world.

You can learn more about the book and order from the No Starch Press online store, amazon, kindle, or your preferred bookseller. Orders from No Starch Press also include a free electronic copy so you can get started immediately.

And whatever you do, have fun and make something!

Tronixstuff 23 Jun 00:51