Music Activated LED Hat

Do you have kids learning music? This project is certainly cool way of introducing them to make projects with wearable electronics.

Adafruit has a nice example of lighting LEDs triggered with voice called Ampli-Tie. There are some variations of it on different kinds of clothing. Here I used it for a hat for my daughter who is learning piano.

We took an old hat, cut holes, put metal rivets from Hobby Lobby for LEDs. Adafruit Gemma was used here and everything was soldered with wires. Finally stitches were used to hold the circuit in place.

RainBerryZ and RainBerry3 Outdoor Cases for Raspberry Pi Camera

After a long hiatus, I was able to create two more versions of original weatherproof case for taking Raspberry Pi camera outdoor, RainBerry for Raspberry Pi Zero W and Raspberry Pi 3.

They are available on PinShape and 3DExport.

  • RainBerryZ for Raspberry Pi Zero W – Get it from PinShapeZero
  • RainBerry3 for Raspberry Pi Zero 3 or 2 – Get it from PinShape3

Also available on 3DExport, Pi 3 and Pi Zero.

If you do not have 3D printer like me, you can order them from 3DHubs, Shapeways, Sculpteo, i.materialise, MakeXZY or your local public library.

Here are some snapshots of RaspberryZ.

small-camera-pi-zero1

Placing screws in the seal holes before assembling in the case. seal-assy

Than place the seal ring of camera opening followed by place glass cover. Finally put the camera seal and then tighten the screws. Put the seal around the side grove and cut it to fit all sides.

IMG_2394

Top case with rubber seal of glass and camera seal holder assembled.IMG_2395

After assembly of camera

IMG_2396

Fully ready to roll !

IMG_2397

IMG_5425

Image from the camera, please ignore the mesh screen in the window.

cam1

Here are RainBerry3 Snapshots. Case is slightly big to accommodate the bluetooth and maintain square shape.

small-camera-Pi-3-1

small-camera-Pi-3 v30-v6

Top case with glass, O ring and o ring assembled in the side groves. IMG_5430

After camera is assembled with M1.6 Size, 4MM. I found it is much easier to use them than M2 Size, 5MM ones which fit tighter.

IMG_5432

Ready to roll !

IMG_5433

Finally all 3 cameras. Hurrah !

IMG_2402

It uses same screws and mounts as RainBerry earlier version.

  • Parts from McMaster.com
    4-40 Thread, 3/4″ Phillips flat head, total 4 (91771A113) for case
    4-40 Thread, 3/16″, total 4 (91772A105) for Pi
    M2 Size, 5MM, total 4 (92000A012) for Pi camera. You can also use M2 if tight.
    M1.6 Size, 4MM, total 4 (92000A002) for seal
    O-Ring, 13mm id, 1.5mm (5233T39) for seal
    O-Ring, 1.5mm, 1ft length (1187N11) for case and Shrink wrap (6855K14) for USB cable
  • Glass piece 17.9mm x 1.2mm, from tinydeal.com (HLD-242646) or dx.com (SKU: 10640)
  • Swivel mount from Videosecu with 1/4 inch threads

Thank you for your all support and number of requests for new versions.

Get them from links below and get it printed.

  • RainBerryZ for Raspberry Pi Zero W – Get it from PinShapeZero
  • RainBerry3 for Raspberry Pi Zero 3 or 2 – Get it from PinShape3

Raspberry Pi NoIR Camera with IR Cut Switch

Raspberry Pi NoIR camera is same as Raspberry Pi camera, except it has no IR filter. I was exploring an option of using IR cut filter switch with Pi NoIR camera. This is commonly done in security cameras, where IR cut filter is used to take pictures during daylight and removed during nighttime with switch. There is a nice video showing operation of it in Dropcam.

I used a simple IR cut filter switch from Aliexpress.com. This switch works well and tested it by simply reversing the power supply. I took pictures of the same object with and without IR cut filter. If you want to use automatic polarity switching using Raspberry Pi there is a help topic available here.

How I Designed a Compact Weatherproof Raspberry Pi Camera Case

Motivated by the video, Militarizing Your Backyard with Python, I was tinkering with Raspberry Pi for Squirrel recognition to protect my garden bustling with sweet peas and tomatoes. As a step towards the goal, I started first programming Raspberry Pi A+ with OpenCV and then emailing me the face of any person intruding in my backyard. However I found no suitable Pi case in the market which is compact, weatherproof and has elegant look. Fake security camera case sold on Amazon was quite cheap but broke easily. It made me to think towards designing a compact case which can be used outside to monitor the backyard garden and get alerts.

Design

I sat down and sketched the general shape of case on back of a scratch paper. Here is how my sketch looked. I chose to stick with Square shape, though Pi A+ is a rectangular shape.

Sketch

Sizing the Case

With no experience in designing plastic parts meant watching tutorials from YouTube and learning from the iterations. It took one month for me to become familiar with tools. I broke down the design work several intermediate goals, beginning with obtaining the dimensions of Pi A+, Pi Camera, WiFi adapter and micro USB power cord. Vernier with LCD display manufactured by General Tools was very handy for this work. Ubiquitously available CAD models of Pi and Pi camera also helped to verify the clearances in the design by importing them and assembling with the designed case. Many thanks to the effort by several community members of GrabCAD.

Render

Next step was to size and fit all the parts in the given space. Mounting Pi A+ with SD card and WiFi adapter in the case was easy. Mounting the Pi camera above Pi in as small as possible was a little difficult. I chose to mount camera directly on the top case since the data cable of Pi is flexible.

CameraFeatures

Weatherproofing method of cellphone or electronic case is pretty standard and based on using a weatherproof seal around the case. It was not difficult to split the case into two parts and then add the groove for holding the seal. Similarly seal of the glass is hold together by the seal holder attached to the case. It compresses the seal and hold it in the place.

Designing of screw bosses was a totally new area for me. I could not find any reliable information source and resorted to plastic part design guidelines from several plastic manufactures and handbooks. I am providing the details of the one from the book, Injection Mold Design Engineering by Davide Kazmer. Suggested size of d was 88% of D.

wp

I used FDM method for 3D printing in ABS plastic due to limitations of escape holes of SLS printing. This is how the camera looks after final design, 3D printing and assembly.

image1-v2

Weatherproofing Test

I tested camera in rain for more than 2 hours and no water entered in it. Here is the picture of it in rain.

thumb_IMG_7898_1024

After the test in thunderstorm, I opened the camera to see no water in case.

after-waterproof

3D Model and BOM

You can view the 3D model and 3D print it from Pinshape or 3dexport.com. If you do not have the 3D printer then try finding a 3D printer on makexyz.com in your area and use it to print.

Models also available for new versions of Pi3 as described in this recent post and can be downloaded from Pinshape links, Pi 3 and ZeroW.

Camera Parts

  • Parts from McMaster.com
    4-40 Thread, 3/4″ Phillips flat head, total 4 (91771A113) for case
    4-40 Thread, 3/16″, total 4 (91772A105) for Pi
    M2 Size, 5MM, total 4 (92000A012) for Pi camera
    M1.6 Size, 4MM, total 4 (92000A002) for seal
    O-Ring, 13mm id, 1.5mm (5233T39) for seal
    O-Ring, 1.5mm, 1ft length (1187N11) for case and Shrink wrap (6855K14) for USB cable
  • Glass piece 17.9mm x 1.2mm, from tinydeal.com (HLD-242646) or dx.com (SKU: 10640)
  • Swivel mount from Videosecu with 1/4 inch threads

Here is the timelapse video recorded with this camera.

Raspberry Pi Camera: Face Recognition and Email Alert

Though Open CV installation is highly time consuming process on a Raspberry Pi A+, it has multiple uses when it comes to image recognition. Framework created by Tony in his face recognition treasure box project is modified here for a camera which sends messages whenever it finds someone is in the backyard.

How it works?

Camera records images constantly and then passes it to the Open CV for face recognition. Once it recognizes a face in the image, it sends alert to the email address with the image in the attachment. You can modify this code further to include any other object recognition such as cat etc.

 

You can download the code which uses OpenCV 2.4.9 from here. Before you use it, you need to generate a password for the app from Gmail.

Gmail provides the following guidelines to generate the app password for emailing directly from Raspberry Pi. Use “other” option to generate the password for the app to login to Gmail and send an email.

Timelapse with Raspberry Pi and RainBerry

Raspberry Pi is quite useful in recording timelapse videos. Personally I liked Raspberry Pi A+ version due to small form factor and low power consumption. With advent of RainBerry case it is easy to mount the Pi camera outdoor and record the time lapse video.

With just one raspivid command you can start recording the images at a set period and then stitch images to a desired video format with mencoder.

I mounted RainBerry in my backyard and recorded timelapse of 24 hrs period. Recording images at 1 minute time interval created this video. When recording video over such a long period best way is to login to Pi over vnc, start a screen session, start time lapse and detach screen. To stop login to pi, restore screen and stop timelapse.

Get your RainBerry case from Pinshape to create timelapse for either 3D print, city traffic, garden, sky or nature.

image-outdoor3

Video below is over a shorter period of 1hr approximately focusing on the sky with 1 minute image recording.

Delicious Liquid Nitrogen Science

Today I planned to visit the newly opened “The Village Workshop” in Northville, MI for 3D printing some parts. It is really awesome facility to have in the neighborhood for every maker.

While waiting for 3D printing assistance at the entrance, I bumped into a demonstration by Willie from Kold Ice Cream. Both me and my daughter were stunned to see fumes of liquid nitrogen on the table.

IMG_5641

Willie was dropping liquid nitrogen on the hands, serving snacks dipped in it which was more fun to see exhaling cold fumes. He offered us a neat explanation behind cold nitrogen boiling at room temperature with boiling point of -196 deg C and turning into vapors. Though it is dangerous to leave your fingers for longer period in the liquid nitrogen, Willie seems fine dropping liquid nitrogen on hands and his shirt.

He showed me and my daughter some cool stuff, like starting fire and then extinguishing with nitrogen fumes and liquid. Too much liquid nitrogen around the flame stops it due to lack of oxygen nearby.

Most important part for my daughter was the liquid nitrogen ice cream preparation. It turned out that it was best ice-cream she ever tasted.

IMG_5649

Delicious science study was really cool for all the kids visiting the workshop today. I hope it attracts them to creative developments in STEM field.