Posts with «arduino» label

A SuperCap UPS

If you treat your Pi as a wearable or a tablet, you will already have a battery. If you treat your Pi as a desktop you will already have a plug-in power supply, but how about if you live where mains power is unreliable? Like [jwhart1], you may consider building an uninterruptible power supply into a USB cable. UPSs became a staple of office workers when one-too-many IT headaches were traced back to power outages. The idea is that a battery will keep your computer running while the power gets its legs back. In the case of a commercial UPS, most generate an AC waveform which your computer’s power supply converts it back to DC, but if you can create the right DC voltage right to the board, you skip the inverting and converting steps.

Cheap batteries develop a memory if they’re drained often, but if you have enough space consider supercapacitors which can take that abuse. They have a lower energy density rating than lithium batteries, but that should not be an issue for short power losses. According to [jwhart1], this quick-and-dirty approach will power a full-sized Pi, keyboard, and mouse for over a minute. If power is restored, you get to keep on trucking. If your power doesn’t come back, you have time to save your work and shut down. Spending an afternoon on a power cable could save a weekend’s worth of work, not a bad time-gamble.

We see what a supercap UPS looks like, but what about one built into a lightbulb or a feature-rich programmable UPS?

Arduino and industrial distance sensor communicate via RS-485

After obtaining an industrial distance sensor, TUENHIDIY decided to use it as the basis for an interesting visual indicator.

The device communicates with an Arduino Uno via an RS-485 module, and outputs distance values in the form of a 9 x 14 pixel display made out of discreet LEDs soldered onto an LoL Shield.

As shown in the video be low, it does a good job of sensing how far an object is from it on a table, and the 126 LEDs provide a nice brilliant display. 

Code for the build can be found on GitHub if you’d like to make something similar. Seeing as though the sensor used here will set you back close to $1,000, you may want to also consider alternatives like an HC-SR04 ultrasonic module instead! 

Test your limit switches with this automated rig

When you buy—or even salvage—limit switches for electronics projects, you expect them to work again and again, producing normally open (NO) and normally closed (NC) signals as needed. Generally, they do work quite well, but if you want to test this functionality for extra assurance, you might want to check out this project by Mr Innovative.

The automated device spins a NEMA17 stepper motor however many times you choose with a rotary encoder, registering the NO and NC signals that are sent to its Arduino Nano controller in response. The unit then gives a pass or fail output via a small OLED screen to let you know if things are operating properly.

Simulate Climate With An Arduino

There are usually two ways to go about any task: the easy way and the hard way. Sometimes we might not know there are two options, but once we see someone else’s solution we might feel differently. When running a greenhouse or small farm, for example, we might decide to set up dozens of sensors to measure temperature, humidity, soil moisture, dew point, sunlight, or any number of other variables. That’s the hard way. The easy way is to use the Arduino-powered Norman climate simulator from [934Virginia].

Rather than relying on an array of sensors, any of which could fail or provide erroneous data for any number of reasons, Norman relies on a simple input of data about the current location – target coordinates, specified date ranges, and minimum/maximum values for temperature and humidity – in order to learn and predict the weather conditions in that location. It makes extensive use of the Dusk2Dawn library, and models other atmospheric conditions using mathematical modeling methods in order to make relatively accurate estimates of the climate it is installed in. There are some simulations on the project’s Plotly page which show its successes as well.

Presumably anyone using this device could run a greenhouse relatively well on only $10 worth of electronics rather than relying on a suite of sensors and input data, which is helpful for anyone strapped for cash (especially in developing areas of the world). The project is named after Norman Borlaug, a famous soil scientist and someone worth reading about. The first (and possibly only) sensor we might want to add to this project is a soil moisture sensor, since yearly estimates won’t tell us whether it has just rained or not.

Images courtesy of Wikimedia Commons.

Hack a Day 03 Aug 06:00

A Farewell To YouTube Sub Counters Set To Break With API Change

Of all the things you never would have guessed you’d need just ten years ago, a YouTube subscriber counter would probably rank highly. You would have guessed that the little hits of dopamine accompanying each tick upward of a number would be so addictive?

As it turns out, lots of people wanted to keep a running total of their online fans, and a bewilderingly varied ecosystem of subscriber counters has cropped up. All of them rely on the API that YouTube exposes for such purposes, which as [Brian Lough] points out is about to change and break every subscription counter ever made. In the YouTube sub counter space, [Brian] is both an enabler – he built an Arduino wrapper to fetch YT sub counts easily – and a serial builder of displays for other YouTubers. The video below shows a collection of his work, many based on RGB LED matrix display, like the one used in his Tetris-themed sub counter. They’re all well-built, nice to look at, and sadly, destined for obsolescence sometime in August when the API changes.

The details of the API changes were made public in April, and for the subs count it amounts to rounding the count and displaying large counts as, for instance, 510k as opposed to 510,023. We’re confident that [Brian] and other display builders will be able to salvage some of their counters with code changes, but others will probably require hardware changes. Thanks, YouTube.

Hack a Day 02 Aug 03:00

Filling water bottles automatically with Arduino

If you need to fill a bunch of water bottles, you could do so using your hands and a sink… or you could automate the task like YouTuber Easy HomeMade Projects.

The build is controlled by an Arduino, spinning a carousel of six bottles under a fill hose with a stepper motor and timing belt. When in position, the system’s water pump is activated, filling each bottle for a set length of time.

For alignment, the device is rotated into a starting point sensed with a small switch, and the process is started with a small pushbutton. It then cycles through six positions, beeping to indicate when each is done.

This monitor will let you know if your CPAP mask comes off at night

If you wear a CPAP (Continuous Positive Airway Pressure) mask to treat obstructive sleep apnea, you may wake up to find that you’ve flung the mask off during the night or adjusted it to the point that there’s a large air leak. To help with this problem, Bin Sun has developed a CPAP monitor that measures air pressure via an MPXV7002DP sensor—often also used to determine the airspeed of RC models.

The device is controlled by an Arduino Nano, and when it detects improper pressure readings in alarm mode, it activates a small buzzer, displaying a “check mask” message. It can also be set up to run in manometer mode in order to observe pressure changes. 

More information—including required parts, print files, and code to make it run—can be found here.

Arduino Blog 01 Aug 19:37

A Look At The Basics of Building an Arduino Watch

Miniaturization has made smart watches possible, even for the DIY maker to tinker with. For those just getting to grips with basic digital electronics, it can be daunting, however. For those just starting out, [陳亮] put together a handy guide to building the core of an Arduino-based watch.

The writeup starts at the beginning, going over the basic hardware requirements for a smart watch. This involves considering size, packaging and power draw, as well as the user interface. The build settles on an Arduino Pro Micro, as it uses the ATmega32U4 which eliminates secondary USB-to-serial chips, helping cut down on power consumption. A square IPS LCD display is used to display an analog-style watch face, and time is kept by a DS3231 real-time clock. A pair of small vibration sensors are used to wake the watch when the user moves their wrist to check the time.

While it doesn’t cover the final assembly into a watch-like form factor, it’s a handy guide on what it takes to build a working watch for those who are still getting their feet wet with hardware. Once you’ve got that down, it’s time to contemplate how you’ll build the sleek exterior. Naturally, a good maker has that covered, too.

Hack a Day 01 Aug 16:00

This display reminds makerspace members to wear hearing protection

While members of the Oshman Engineering Design Kitchen makerspace at Rice University generally do a good job with wearing proper eye protection and gloves, hearing safety has lagged behind. In order to make it obvious when students need to apply the protective equipment, the “Ring the Decibels” team there has come up with an excellent sound display, laser cut out of wood and acrylic.

Their system uses an analog sound sensor to detect noise passing data on to an Arduino Uno. In response, the Uno controls two LED strips, one of which indicates levels in the form of a VU meter, while the second strip flashes red under an acrylic headphones cutout when dangerous levels are present. 

Build details are available here, and you can check out the demo below to see how it works! 

Mover3D is a 3D-printed moving light for your desk

LEDs are fun, and RGB(W)s adds a new element to things, but what if you want a light that can also move by itself? The Mover3D does just that as a pan/tilt system controlled by the DMX512 communication protocol. You simply feed instructions in via any standard lighting console, and it dances around under your commands.

The 3D-printed device uses an Arduino Uno inside the fixture’s base to send signals to an RGBW LED, as well as control a pair of servo motors that pan and tilt the light turret. While light output is limited for now, a second version featuring a 14,000 lumen output with stepper motors and slip rings for 360° rotation is in the works, and should be quite impressive when it’s done! 

Setup and programming instructions can be found in the project’s write-up, and needed print files are up on Thingiverse.