Rainstick

by rabbitcreek in Circuits > Microcontrollers

108 Views, 0 Favorites, 0 Comments

Rainstick

IMG_2734.jpeg
IMG_2751.jpeg
rainstickMov

Often the combination of microcontrollers and Neopixels results in a overstimulation that doesn't mix well with a more refined home environment that should provide a respite from screen scratching. But, for those of us that like building devices that magnify the subtleties of natural wonders and put them on display we want to make these outputs unique and interesting. In this case I returned to the fun of a rainstick...a device that warns you of approaching rain. Its different in practice from the weather forecast which everyone has on their phone and now even text messages...this is sort of like a old man in the corner who only occasionally speaks to warn you of impending rain. In this case I was making it for a friend who has a rather beautiful house that would not tolerate the insolence of a carnival display....the result is a 3D printable array that can be infinitely extendable depending on height and relies on a crack to internally reflect the baffled output. Only a smidgen of the display can be seen directly. The unit relies on an active wifi connection and power cord through the bottom of the unit. Programming of credentials as well as location is done through an iPhone setup which is activated through a button on the bottom on initial use or changing locations. It is very cheap to build and also provides current temperature and a roving subtle color array when not active.

Supplies

IMG_2716.jpeg
IMG_2724.jpeg

This is a truly simple build and requires only a couple cheap supplies.

  1. Xiao ESP32C6 $5
  2. Silicone Sheath NeoPixel LED strip 60LED's $25
  3. PushButton $.05
  4. 3D Printer with PLA /TPU


Print Your Parts

seattleSean v32.png
seattleSean v3.png
seattleSean v345.png
seattleSean v3333.png

The main body is printed in Bambu PLA-Matte. The Rainstick can be of any arbitrary length and the sections are designed to fit within a Bambu P1S. The sections have mating ends and are glued together. The base end has the section that contains the space for the Xiao board and the reset switch and extra room to accommodate the wiring of the Neopixel end. The two covers at the ends are printed in TPU. The red band effect is done by stopping the printer and changing TPU colors. The two mounting points are printed separately and glued to the back of the rainstick.

Build It

IMG_2725.jpeg
IMG_2715.jpeg
IMG_2851.jpeg
IMG_2723.jpeg
IMG_2712.jpeg

I built this rainstick to accommodate 1 M of Neopixels and the software is set for 150 lights. The rainstick is built of joining sections to be printed in a 250 x 250 bed of a bambu P1S. The sections are joined with either epoxy or Superglue depending on your preference. They must be lined up on a very flat surface prior to joining. The Neopixel strip I used has a silicone diffuser layer on it that enables further defocussing of the intense LED light. The entire strip is loaded into the slot after the epoxy is set. The end of the strip must be wired to join it to the Xiao in the next step. The two support features are superglued to the back of the unit. They are your standard screw head insert for hanging from a variety of supports.

Wire It

IMG_2740.jpeg

The wiring for this device is very easy. The only outside connection is to the Xiao through the USB-C connector which provides all power. The amount of power to the strip is dependent on how many bulbs are involved. For this unit I used a 5v 2 amp power supply which is adequate. The power to the lights is taken off the USB connection point on the Xiao board. GND to GND. The reset button is connected to both GND and GPIO D10. Data for the lights is D9.

Programming

Seans Rainstick.png
IMG_2857.jpeg

The basics of the program relies on setting up a page on your iPhone from a wifi network from the Xiao. This allows you to input your wifi credentials as well as vary your location to get weather reports from open weather map. You also must input your openweathermap API Key. About every ten minutes the machine will look up the current weather and if it's going to rain will activate the display of small rain drops dropping from the top of the display. The bottom of the display will slowly fill up with liquid until full and then resets itself. In between it will alternate with the display of the current temp or a roving background of various FastLED color palettes. The display for temp first displays the 10's place and then the 1's place and all the segments have physics and drop and bounce from the top of the display. They all slowly drain out the bottom. The program itself is over 1500 lines and was done with Cursor.

Downloads

Using It

IMG_2730.jpeg
IMG_2748.jpeg

After finishing the assembly and wiring the Xiao to the Neopixels epoxy the Xiao into its slot to hold it in place. The small reset button is also epoxied into its location adjacent to the Xiao. While plugging in the USB-C hold the reset button down to activate the credentials Wifi on the Xiao. Turn your iPhone wifi to the ESP connection and then use the standard safari location: 192.168.4.1 and fill out your wifi credentials, openweathermap api key (you obtain this by signing up at their website) and the your Zip code location. The software saves your credentials in permanent memory and starts the rainstick. The background Palettes are from standard FastLED sources and can be varied in the software. We chose soft blues and dark greens to go with rain in Seattle.