Neopixel Rain Forecaster Incorporated Umbrella Stand

2,149

21

1

About: Flow happens when you let go.

Dear Instructablers.

This will be my 3rd attempt at mastering an Instructable, Only hope I'm getting better at presenting my ideas.

Over the last month I've been developing an umbrella stand as 'winter is coming' and there is nothing more frustrating than being 'caught with your trousers down' as an Englishman when it comes to not taking an Umbrella out with you.

I also get kind of annoyed that 'phones sell themselves on the fact they can do everything! I like the idea of de-monopolising our phones from a task or too!

This birthed the smart umbrella stand! an object that's meant to seamlessly inform it's user of future weather conditions! The stand, which is capable of housing your umbrella, also informs you about the chance of rain thoughout the day. Using a Neopixel it changes 24 pixels as the hours of the day differ in their probability of precipitation!

This Instructable will introduce concepts of data requesting, data manipulation, serial communication between the Pi across to an Arduino, and how those figures can be represented by RGB LED's

The break down of the Instructable is as follows:

1 Electronics (Components, Circuitry and Wiring)

2 Coding (Data requests from the Cloud, Processing and Parsing)

3 Packaging (Creating a functional product)

Step 1: Shopping List

Electrical Components

  1. Raspberry Pi Zero W
  2. Arduino Nano
  3. Neopixel Ring 24
  4. Wire
  5. Assortment Nylon M2 Nuts and Bolts
  6. USB OTG Cable - Micro USB to Mini USB - M/M

Housing

  1. Oak Plank 150mm x 500mm x 20mm
  2. 3D Printed Umbrella Holder Parts _ http://rover.ebay.com/rover/1/710-53481-19255-0/1...
  3. Wood Off-Cuts
  4. 3D Printed Parts

Tools

  1. Soldering Iron & Solder
  2. Clamps
  3. Screw Driver
  4. Bench Saw

Step 2: Circuit Design

In this step we will connect the electrical components together.

Step 2.1

The first thing to do in this step is to solder or wire the Arduino Nano (or Arduino Uno) to the Neopixel Ring.

Step 2.2

The next step is to connect the Nano/Uno to the Pi Zero through a USB Cable.

(USB OTG Cable - Micro USB to Mini USB - M/M - USB)

Please note your Pi Zero should already be setup so you can program it in a headless mode. If not, follow this (https://desertbot.io/blog/headless-pi-zero-w-wifi-...

Step 2.21

Programs Installed on Pi Zero

Python 3 - (https://www.raspberrypi.org/documentation/usage/python/)

Check you have the following packages installed

  1. Numpy
  2. Time
  3. Serial
  4. Requests
  5. Pandas

On your Arduino IDE please install the following library

  1. Neopixel Adafruit Libary

Step 2.3

Test the Pi and Arduino by uploading a code to the pi to test the Neopixel Ring

Download the Neopixel Adafruit Library

Upload the Example Neopixel Test Sketch

Step 3: Setting Up Weather Data API

In this step you must sign up to a weather data collection and publishing service.

This is where we will collect our forthcoming precipitation data.

In this instructable I am using a service provided by Dark Sky.

You need to visit https://darksky.net/dev/register and create an account.

You can read more information on the service at https://darksky.net/dev/docs.

The main benefit of the service is that it allows you 1000 data calls for free per day and publishes data on an hourly time stamp for up to 48 hours.

After you have registered you should have been give a secret key that grants you access to the Dark Sky API.

In the Python code section will we use this API key to request data in the form of a JSON.

Step 4: Latitude and Longitude Finder on Map Get Coordinates

In this step we will find the latitude and longitude for the location we want the weather data to be from.

Use https://www.latlong.net/

Enter the name of a location to obtain the longitude and latitude.

Step 5: RGB Colour Mixing and Schemes

Part of the project will be to consider a colour scheme.

One LED Neopixel consist of three diodes each able to produce one spectrum of either red, blue or green light.

A Neopixel LED is capable of combining these lights at differing intensities to produce a wide colour scheme as the previous example sketch should have highlighted.

The function of the 24 Neopixel's is to inform the user of the likelihood of precipitation at a denoted time within 24 hours.

So a key aspect of the project is to create a colour scheme from RGB Values.

I will leave this up to you! (Later in the Instructable we will introduce the precipitation data)

On to the next step.

Step 6: Python Code Development on Jupyter Notebook

To develop the python script you must install and run Jupyter Notebook.

Note in the following steps the code can be found attached. (1_Arduino Sketch & 1_Python Script)

There are many ways to install this program on many different operating systems but you can follow the link to help get you started.

https://medium.com/@neuralnets/beginners-quick-gui...

In the next step we will compile the code

Step 7: Uploading Your Arduino Sketch

We are now ready to upload our Arduino Sketch

Make sure you have the correct Arduino board and the correct COM port selected.

Open the sketch on the Pi in the Arduino IDE and click upload.

Step 6.1

Test the code and circuit by opening the serial monitor on the band you specified (9800) and send a test string.

For example send ( R000G250B200P1 )

This should light LED P1 on the Neopixel Ring

On too the next step.

Step 8: Compiling the Python Script

In this section we will take the python code we'd developed and simplify it down.

Step 7.1

First copy the file into a text editor (notepad++) and move all the imports to the top of the file.

You can also remove as many of the print functions as you like or add some in.

Step 7.2

Setting up the COM Port

I found this a little frustrating and can't remember how I got a solution to work but it does work!

There are a number of methods online so ill leave it up to you to figure it out.(sorry)

https://pyserial.readthedocs.io/en/latest/pyserial...

After this is set up the interface between both Pi and Arduino should be changing the colour of the Neopixel LED's in relation to its precipitation probability value.

If all good! then on to the next step.

Step 9: Scheduling Our Python Script With Crontab

You can read this tutorial about Cron jobs (https://www.raspberrypi.org/documentation/linux/us... )

Before you add your python script to Cron make sure everything is working with both codes as editing the python code after is not so simple

You want to schedule the script to run on startup and then every 15 mins.

The link (https://crontab-generator.org/) can help you generate the code.

After you have scheduled the task that is it for the electrics and the coding, we can now look at packaging out tech.

Step 10: 3D CAD Modelling & Files

After watching the video you should be able to understand how I wanted the holder to be designed.

You can find all the 3D printable STL files above or they can be found at the follow GrabCAD URL

You may also be Interested in the 3D Printed parts which can be found on Ebay

You can really package the Neopixel tech how you like, its up to you.

In this next section will look at how I constructed the shell and fixed everything together.

Step 11: Creating the Oak Stand

Basically we are creating a wooden frame to hold our 3D printed parts.

I drew some inspiration from this video. It'll help you understand the build process too

These are the steps I took to create the the frame with a table saw.

Step 11,1

The oak plank i used came from some left over flooring so the first step was to saw off the tongue and groove.

Step 11.2

Cut a 5 mm deep by 8 mm wide groove on the Inside face of the plank. Check the printed top fits into the groove at the required depth.

Step 11.3

Do the same process from the bottom printed part leaving a little to trim back once glued.

Step 11.4

Mark the wood so you can identify the grain direction and cut equally to the required lengths. (set a jig up to aid precision and speed) (mark after into order of grain).

You should now have 4 pieces of oak! exactly the same size! with groves notched into one side.

Step 11.5

Cutting the corners off at 45 degrees. Set the saw to 45 degrees and make sure you don't cut into the front face my more than 1mm.

Step 11.6

Create a type of biscuit joint between the corner by cutting a saws width joint at 45 degrees to the inside face at a depth of 4 mm.

you can now cut wood inserts for them and assemble the unit. remember to keep the grain running in order.

Step 11.7

Attach electronic components to 3D pinted parts.

Glue oak and 3D parts together and use clamps to hold together while glue sets.

Step 11.8

Trim top and bottom to desired dimensions.

Step 11.9

Lightly sand the top and sides, wipe with a wet cloth and repeat a couple of times. you then may wish to apply a finish to protect the oak, you can do this as desired.

Select an umbrella and plug the stand In

See the finished stand in the next step.

Step 12: The Finished Umbrella Stand

Please also tell me if you think things can be improved.

And if you like what you've seen then feel free too help with my next project with a small donation. Please follow the links below.

https://paypal.me/Toppy007

Peace & Enjoy

Share

    Recommendations

    • Make it Glow Contest 2018

      Make it Glow Contest 2018
    • Optics Contest

      Optics Contest
    • Plastics Contest

      Plastics Contest

    Discussions

    0
    None
    jmdushi

    23 days ago

    I love it, a beautiful piece of furniture.