Introduction: Cyberpunk Multi-Sensor for Security.
I decided to make a security multisensor after we were robbed while living in the jungle of Ecuador. We now live in another city but I wanted way to receive notifications for any activity in our home. I've seen a lot sensors connected that weren't attractive and I wanted to make something that was not only functional but also was interesting in our home. The LEDs can be configured to respond to the temperature or motion alerts. This project includes Digital temperature and humidity monitoring, passive infrared motion detection, and loud noise detection for windows breaking, dogs barking, etc. I've included all of the 3-D files needed to complete this project identical to mine.
Step 1: Materials Needed
This is where you can purchase all the components needed.
Addressable LEDs for around clear lens.
WEMOS D1 R1
Ws2811 Led Chips
RGB leds loose
Wood for housing
Step 2: Building the Enclosure
Start by cutting five pieces of wood to form the wooden box enclosure. The outside dimensions are not important, but what is important are the inside surface areas. (The outside dimensions will change based off of the thickness of the wood material that you are using.) You will need three pieces that are cut 15 cm tall by 10 cm wide and two pieces of wood that are 10 cm x 10 cm.
Again this is the inside face, review the picture I’ve included.
(I didn’t have a tablesaw so I paid a local woodworker to cut them for me.)
I would suggest drawing a rectangle 15 cm x 10 cm on the face of your wood and then using the tablesaw set your blade to a 45° angle.
Use the tablesaw to follow your traced lines that you’ve drawn on each wooden piece.
After you wood is cut you may begin to connect them using nails of wood screws.
Step 3: 3D Components
Here is the link for all created 3-D components.
They were all printed at 100% density at .2mm layer height.
The stand for the LED fiber optic system is printed at 100% density. This gives you the ability to flex the material to insert the chips after they have been soldered. It’s very difficult to solder the connections that close together. The cats are made to slip directly over the top of the LED leaving only the base exposed. It may be necessary for you to take a small drillbit to clean The holes so the clear filament can be inserted into it and light can pass through easily
Step 4: Soldering Connections
I used some common three strand wire do you connect the WS 2811 chips together. Additionally I had to solder the eight Millimeter RGB LEDs on top of those chips. Addressable LED strands pulls a lot of power so I did some additional soldering by adding a power and a ground wire directly to the power input on the Wemos board. I used a multimeter to determine which was the positive and which was the negative and for each.
Since I’m using a 10 amp 5 V power supply I will have more than enough amperage to drive all sensors LEDs and much more if needed.
Step 5: Sensor Setup
For initial set upset up I first began by applying LED strip around the outside of the clear filament window that I designed. I used hot glue to attach the LEDs to the window. I also soldered additional data and power lines on the end of those LEDs because that is what is connected to the fiber optics. I’ve included a wiring diagram so you can see how everything is connected.
From there I just started hot gluing things where they seem to fit best.
I used some loose jumper wires to connect everything to the Wemos.
Step 6: Assembly of Multi-sensor
Using half-inch drill bit I cut a hole below where the fiber optic LED bridge would be. Through that hole I forced a micro USB wire for connecting to the Wemos as well as the power supply wire from the 10 amp power supply. The LED window was connected in the place using hot glue and I use nails to tack all the wood together. It can be very difficult to connect all the jumper wires and keep everything looking clean and orderly. Take your time as you connect wires and you can even twist them to make them appear to have more order.
For the fiber optic setup you’ll need to take some of the clear filament off of the role. This is what will be used to carry the light from the eight Millimeter LEDs. Use a pair of snips to cut the filament and then push the strait cut end of the filament into the top of the 3-D printed LED cap. Run the clear film it to a corner of the housing and cut it to fit the enclosure.
Step 7: Code and Setup.
After the sensor is totally assembled you can connect it to your computer for programming.
For my initial set up a used this code from bruh automation. This was connecting then multisensor to home assistant.
Multisensor GitHub Repo - https://github.com/bruhautomation/ESP...
But then I started using Blynk to control each sensor and have it pushed directly to my phone.
SuperChart is the Blynk option I used to push the data to my iPhone for security monitoring.
SuperChart is used to visualise live and historical data. You can use it for sensor data, for binary event logging and more.
To use SuperChart widget you would need to push the data from the hardware with the desired interval by using timers.
Here is a basic example for data pushing.
Switch between time ranges and Live mode
Tap time ranges at the bottom of the widget to change time ranges Tap Legend Elements to show or hide datastreams
Tap'n'hold to view timestamp and corresponding values Quick swipe from left to right to reveal previous data
Then you can then scroll data back and forward within the given time range. Full Screen Mode
Press this button to open Full Screen view in landscape orientation.
Simply rotate the phone back to portrait mode. Chart should rotate automagically.
In full screen view you will see X (time) and multiple Y scales.
Full Screen Mode can be disabled from widget Settings.
Menu Button Menu button will open additional functions:
Export to CSV Erase Data on the server
Chart Title Title Font Size You have a choice of 3 font sizes Title Alignment Choose chart title alignment. This setting also affects Title and Legend position on the Widget. Show x-axis (time) Select it if you want to show the time label at the bottom of your chart. Time ranges picker Allows you to select required periods (15m, 30m, 1h, 3h, ...) and resolution for your chart. Resolution defines how precise your data is. Right now chart supports 2 types of resolution standard and high. Resolution also depends on the selected period. For example, standard resolution for 1d means you'll get 24 points per day (1 per hour), with high resolution you'll get for 1d 1440 points per day (1 per minute). Datastreams Add datastreams (read below how to configure datastreams)
Widget supports up to 4 Datastreams.
Press Datastream Settings Icon to open Datastream Settings.
Choose available types of Chart:
Line Area Bar Binary (anchor LINK to binary)
Choose solid colors or gradients
Source and input:
You can use 3 types of Data source:
1. Virtual Pin
Choose the desired Device and Virtual Pin to read the data from.
SuperChart can aggregate data from multiple devices using built-in aggregation functions.
For example, if you have 10 Temperature sensors sending temperature with the given period,
you can plot average value from 10 sensors on the widget.
To use Tags:
Add Tag to every device you want to aggregate data from. Push data to the same Virtual Pin on every device. (e.g. Blynk.virtualWrite (V0, temperature);) Choose Tag as a source in SuperChart Widget and use the pin where the data is coming to (e.g V0)
SUM will summarize all incoming values to the specified Virtual Pin across all devices tagged with the chosen tag AVG will plot average value MED will find a median value MIN will plot minimum value MAX will plot maximum value
☝️ IMPORTANT: Tags are not working in Live Mode.
Device Selector If you add Device Selector Widget to your project, you can use it as a source for SuperChart. In this case, when you change the device in Device Selector, chart will be updated accordingly
There are 4 modes of how to scale data along the Y axis
Data will be auto-scaled based on min and max values of the given time period. This is nice option to start with. Min/Max
When this mode is selected, Y scale will be set to the values you choose.
For example, if your hardware sends data with values varying from -100 to 100, you can set the chart
to this values and data will be rendered correctly.
You may also want to visualize the data within some specific range.
Let's say incoming data has values in the range of 0-55, but you would like to see only values in the range 30-50.
You can set it up and if values are out of Y scale you configured, chart will be cropped
% of Height This option allows you to auto-scale incoming data on the widget and position it the way you want. In this mode, you set up the percentage of widget height on the screen, from 0% to 100%.
If you set 0-100%, in fact it's a full auto-scale. No matter in which range the data is coming,
it will be always scaled to the whole height of the widget.
If you set it to 0-25%, then this chart will only be rendered on 1/4 of the widget height.
This setting is very valuable for Binary Chart or for visualizing a few datastreams on the same chart in a different way.
Delta While data stays within the given Delta value, chart will be auto-scaled within this range. If delta exceeds the range, chart will be auto-scaled to min/max values of the given period.
Here you can specify a suffix that will be shown during the Tap'n'hold.
Defines the formatting of the graph value when you Tap'n'hold the graph. Possible options are: #, #.#, #.##, etc.
Connect Missing Data Points
If this switch is ON, then SuperChart will connect all the dots even if there was no data.
If it's set to OFF, then you will see gaps in case there was no data.
Binary Chart Settings
This type of chart is useful to plot binary data, for example when unit was ON or OFF, or when motion was detected or when certain threshold was reached.
You need to specify a FLIP point, which is the point where incoming data will be turned into TRUE or FALSE state.
For example, you send the data in the range of 0 to 1023. If you set 512 as a FLIP point, then everything above 512 (excluding 512) will be recorded as TRUE, any value below 512 (including 512) will be FALSE.
Another example, if you send 0 and 1 and set 0 as a FLIP point, then 1 will be TRUE, 0 will be FALSE
Here you can specify how TRUE/FALSE should be shown in Tap'n'Hold mode.
For example, you can set to TRUE to "Equipment ON" label, FALSE to "Equipment OFF".
Step 8: Wrapping Up...
My vision for this project was to create a complete module where I could add additional components to and change it to make it into a multipurpose security sensor. Based off of the code that is loaded to the microcontroller this unit can be used for multiple sensor layouts. I really appreciate you taking time to read my Instructable!
Participated in the
3 years ago
I like the idea of this kind of modular build that gets bigger and evolves over time! Awesome work!
Reply 3 years ago
Thanks so much! I hope it can help some people get inspired.