In this project, we will see using Vibration Tilt Switch Sensor and limit switch to activate Audio Speaker Hexabitz Module and RGB Led Hexabitz Module. When door moves, the Modules will give alarm.
1. RGB Led Hexabitz Module(H01R01)
2. Audio Speaker Module (H07R3)
3. Hexabitz Dual In-series Coin Cell Battery Holders Module (H04R20)
4. FTDI USB to UART Serial cable
5. SW-520D Vibration Tilt Switch Sensor
6. Limit switch
Vibration Tilt Switch Sensor:
Tilt sensors are essential components in security alarm systems today. Standalone tilt sensors sense tilt angle or movement. Tilt sensors can be implemented using mercury and roller ball technology, and can be mounted using mechanical threading, magnets, or adhesives, depending on what type of surface they are being mounted to.
Recent technological advancements in the manufacturing of tilt sensors have improved accuracy, reduced cost, and increased lifetime. The type SW-520D is a commonly available roller-ball type tilt sensor consists of two conductive elements (poles) and a conductive free mass (rolling ball), encapsulated in the same case. When the tilt sensor is oriented so that that end is downwards, the mass rolls onto the poles and shorts them, acting as a switch stroke.
Limit switch is a switch operated by the motion of a machine part or presence of an object.
- CLI Connection
2. Connect the FTDI USB to UART Serial cable to the USB hub.
3. Solder a header connector to one of the power ports of H01R00 module.
4. Connect the red wire of the FTDI cable to H07R31 module power port top side.
5. Connect the black wire of the FTDI cable to module power port bottom side.
6. Connect the yellow wire of the FTDI cable to module port P2 top side.
7. Connect the orange wire of the FTDI cable to module port P2 bottom side.
8. You should see a single red indicator LED blink on the modules.
9. Press enter in the Commands window, you should see BOS CLI welcome message. You can use backspace if you misspell a letter.
10. Type status to view a report on module ports, firmware, etc.
11. Solder two pins to port P5 of the H01R00 module then connect a limit switch with jumper wire.
12. Type add-button momentary-no p5.
13. Type status again and you will see the added button.
- Command Snippets
1. Type the following commands each on a separate line followed by pressing enter:
Now open the door and you should see the result on RGB led Hexabitz module.
Type snip, to view the list of Command Snippets, then you can type del-snip 1 to delete Snippet 1. Snippets and button settings are stored permanently. If you power cycle the module, they are still there.
You can also activate and deactivate (pause) a Snippet without deleting it.
- Array Exploration:
We plan our array design by aligning modules side-by-side.
Then we solder the modules together.
I connect to H07R31 module and type explore, the modules start discovering each other and building their array topology.
Type all.ping, both module will ping.
1. Type #2.ping to ping the remote module.
2. The array topology is stored permanently. If you power cycle, the modules keep their topology and show multiple blinks.
3. Type default array to remove the topology and restore native firmware when you decided start a new project.
- Add the tilt sensor:
1. Solder two pins to port P3 of the H07R3 module then connect a tilt sensor with jumper wire.
2. Type add-button momentary-nc p3.
3. Type status and you will see the added button.
4. Type the following commands each on a separate line followed by pressing enter:
You can use potentiometer to adjust audio level.
Now open and close the door and you can see and hear the result (^_^)
- Prepare Battery Holder
To power the system we used (Hexabitz Coin Cell Battery Holders Module (H04R20)). Its contain 2 x CR2032 coin lithium batteries in series.
Note that it's better to write Command Snippets using power from USB cable connection without batteries (to avoid power confusion and reset states). Once done, you can insert the batteries and then remove the USB cable.