logo-mobile

ROHM

ROHM
Menu
  • Arduino –
  • Raspberry Pi –
  • Trending –
  • Others –
  • About –
  • Contact –

Arduino

DIY Halloween Zombie Mask using ROHM Arduino Sensor Kit

Rahul Iyer
Published by Rahul Iyer at October 31, 2016
Categories
  • Arduino
Tags
  • Arduino
  • arduino sensors
  • halloween
arduino sensors

arduino sensors

Today, we will be creating a super easy Halloween zombie mask using the ROHM Sensor Evaluation Kit! We will be using ROHM Proximity/Ambient Light Sensor (PS/ALS) Sensor. The sensor will detect anything that moves in front of the mask and will light up in red to scare away your uninvited guests!

A guide to how to setup the sensor shield and connect to Arduino was covered in the previous article. If you haven’t already, please refer back to ROHM Sensor Evaluation Kit Overview!

 

 

Quick overview of ROHM Sensor Evaluation Kit

The Sensor Evaluation Kit comes with the Sensor Shield and 8 different ROHM sensors: an accelerometer, a barometric pressure sensor, a geomagnetic sensor, an ambient-light/proximity sensor, a color sensor, a hall-effect sensor, a temperature sensor, and an ultraviolet light sensor.  

arduino sensors

The website, http://www.rohm.com/web/global/sensor-shield-support, provides detailed documentation about the sensor shield and each of the sensors, along with links to downloadable Arduino libraries for the individual sensors. The user-manual for the kit, which comes in the box and can also be found on the website, and it provides instructions on using the sensor shield with the sensors.

arduino sensors

Figure 1. ROHM Sensor Shield (top right) with 8 different compatible sensors / @CoreStaff

 

Let’s make a Halloween zombie mask using the Proximity/Ambient Light Sensor!

So Halloween is just around the corner and I decided to make this scary Halloween mask!

arduino sensors

Figure 2. The Halloween zombie mask connected to ROHM sensor shield

 

Remember when I said that the sensor shield is great for prototyping sensor projects?  This project is a great demonstration of just that!  I want to make a Halloween decoration for my front door that lights up to scare people who walk near it.  The mask, a hacked light-up Halloween mask, will detect people using a proximity sensor, and will be based on the Arduino Uno!  First, however, I need to prototype my creation, and for this I’ll use the sensor shield with the Proximity/Ambient Light Sensor (PS/ALS module).  

Hardware Parts:

  • Scary Halloween mask with light-up LED eyes (I got mine from a local Target store)
  • 220Ω resistor (limit current through LEDs)
  • Jumper wires
  • Breadboard
  • ROHM Sensor Shield with Proximity/Ambient Light Sensor (PS/ALS) Sensor module
  • Arduino Uno
  • USB cable to connect computer to Arduino Uno

Software

  • Arduino IDE
  • ROHM ALS/Proximity Sensor (RPR-0521RS) Library

This project lights up an LED whenever an object is too close to the proximity sensor.

  • Mount the Sensor Shield to the Arduino’s female headers
  • Mount the PS/ALS Sensor module to any of the I2C header sections on the Sensor Shield
  • Upload this sketch to the Arduino:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#define byte uint8_t
 
#include <Wire.h>
 
#include <RPR-0521RS.h>
 
RPR0521RS rpr0521rs;
 
int led_pin = 12;
 
void setup() {
 
 byte rc;
 
 Serial.begin(9600);
 
 while (!Serial);
 
 
 
 Wire.begin();
 
 
 
 rc = rpr0521rs.init();
 
 pinMode(led_pin, OUTPUT);
 
}
 
void loop() {
 
 byte rc;
 
 unsigned short ps_val;
 
 float als_val;
 
 byte near_far;
 
 
 
 rc = rpr0521rs.get_psalsval(&ps_val, &als_val);
 
 if (rc == 0) {
 
   
 
   near_far = rpr0521rs.check_near_far(ps_val);
 
   if (near_far == RPR0521RS_NEAR_VAL) {
 
     digitalWrite(led_pin, HIGH);
 
   } else {
 
     digitalWrite(led_pin, LOW);
 
   }
 
 }
 
 delay(500);
 
}

 

The mask that I bought had LED strips around the eyes that lit up when a switch inside the mask was turned on.  The LED strips were connected to a battery case also inside the mask.  

arduino sensors

Figure 3. The power and ground wires for the LED strips came connected to a 4.5V battery case.

 

Since I decided to power the LEDs directly from the digital output pin of the Arduino, I removed the battery unit and desoldered its JST female connectors.

I then made a custom splitter that would allow me to connect the LED strips to a breadboard.  The splitter joined the positive and negative pins on each female connector together, and had two wires (one for positive voltage and one for ground) that I could then attach to a breadboard.

 

arduino sensors

Figure 4. The custom splitter to connect the LED strips to a breadboard

 

Finally, connect the positive and ground wires to digital pin 12 and to ground respectively.  Remember to use a 220Ω resistor to limit the current to the LEDs!  

arduino sensors

Figure 5. The breadboard connections

 

You are now ready to test your project!  Play with the value of “RPR0521RS_NEAR_THRESH” in the “RPR-0521RS.h” library file to change the threshold distance at which the proximity distance triggers.  

 

Once you are satisfied with the Sensor Shield prototype, you can finalize the project by mounting the proximity sensor to the front of the mask and drawing connections from the pins on the proximity sensor to the I2C inputs on the Sensor Shield.  

Place the mask by your front door and let your visitors enjoy a spooky and cool Halloween decoration! Have a happy and safe Halloween!  🙂

Rahul Iyer
Rahul Iyer
Studying Electrical Engineering at UCLA, Rahul loves to work on electronics and robotics projects as a hobby. He is especially enthusiastic about electric vehicle technology and assistive robotics.

Check us out on Social Media

  • Facebook
  • Twitter

Recommended Posts

  • Arduino Sensors – ROHM Sensor Evaluation Kit OverviewArduino Sensors – ROHM Sensor Evaluation Kit Overview
  • Make an LED Arduino Christmas Tree with ROHM Sensor KitMake an LED Arduino Christmas Tree with ROHM Sensor Kit
  • Smart Garden System using Arduino Create + ROHM Sensor Evaluation KitSmart Garden System using Arduino Create + ROHM Sensor Evaluation Kit
  • How To MacGyver A Laser Tripwire Using ArduinoHow To MacGyver A Laser Tripwire Using Arduino
  • Arduino Robot RF Explorer – Mechanics – Part 1Arduino Robot RF Explorer – Mechanics – Part 1
  • 3D Cases for ROHM Sensor Evaluation Kit and RohmMultiSensor Library Update3D Cases for ROHM Sensor Evaluation Kit and RohmMultiSensor Library Update
Receive update on new postsPrivacy Policy

Recommended Tutorials

  • How to integrate an RFID module with Raspberry Pi How to integrate an RFID module with Raspberry Pi
  • How to Use the NRF24l01+ Module with Arduino How to Use the NRF24l01+ Module with Arduino
  • How to Run Arduino Sketches on Raspberry Pi How to Run Arduino Sketches on Raspberry Pi
  • Setting Up Raspberry Pi as a Home Media Server Setting Up Raspberry Pi as a Home Media Server

Recommended Trends

  • SewBot Is Revolutionizing the Clothing Manufacturing Industry SewBot Is Revolutionizing the Clothing Manufacturing Industry
  • All About The Sumo Robot Competition And Technology All About The Sumo Robot Competition And Technology
  • 5 Interesting Tips to Calculating the Forward Kinematics of a Robot 5 Interesting Tips to Calculating the Forward Kinematics of a Robot
  • Go Inside the Drones That Are Changing Food Delivery Go Inside the Drones That Are Changing Food Delivery
Menu
  • Arduino –
    Arduino Beginner’s Guide
  • Raspberry Pi –
    Raspberry Pi Beginner's Guide
  • Trending –
    Updates on New Technologies
  • Others –
    Interviews / Events / Others

Check us out on Social Media

  • Facebook
  • Twitter
  • About
  • Company
  • Privacy Policy
  • Terms of Service
  • Contact
  • Japanese
  • 简体中文
  • 繁體中文
Don’t Forget to Follow Us!
© Copyright 2016-2023. Device Plus - Powered by ROHM
© 2023 Device Plus. All Rights Reserved. Muffin group

istanbul escort istanbul escort istanbul escort