Bluetooth + GSR Sensor + Node-RED
by ibellacc in Circuits > Sensors
3519 Views, 29 Favorites, 0 Comments
Bluetooth + GSR Sensor + Node-RED
I did this project to help me log data about myself while I'm setting up a sound installation in the United States/Mexico political fence in Tijuana, Mexico.
This project is for me to experiment new ways of recording and analyzing my work process and see if there is any correlation between the work I'm installing and the data I'm collecting. For this project, I decided to record gsr data from a space known by me to be difficult to fully process. The gsr sensor, along with a lightblue bean, help me move along the fence while wirelessly gathering data.
MATERIALS
Hardware
- Windows or OSX computer
- Lightblue bean (bluetooth)
- GSR sensor
Software
- Node-RED
- Bean Loader App
Extra
- Wires
- Soldering iron
- Solder
- Bag
Soldering GSR Sensor to LightBlue Bean
1. Solder a AA battery holder to the bean like is showed in the diagram.
2. Solder the gsr sensor to the bean like is showed in the diagram.
GND - GND
VCC - VCC
SIG - A0
The sensor needs from 3.3 to 5v.
The length of the wires would depend on how far you want the lightblue bean from the gsr sensor.
Lightblue Bean + Node-red
In order for the computer to get the data from the bean and save it in your computer you need node-red.
- Install node-red
- Install bean nodes
Once you have it all installed:
- run node-red through your terminal using the command "node-red"
- you can then access through your browser the Node-RED editor at http://localhost:1880
Once you are in the Node-Red editor:
- Go to Import -> Clipboard on the top right corner
- In the clipboard text box paste the code that is in the file "node-red_clipboard"
- Afterwards you will get a series of bean nodes like the ones that appear in the node-red editor image. If the editor cannot find the "Bean Serial" node then replace it with the "Serial" node.
- Once you have the bean nodes like the ones in the image, double click the "Serial" node and add the Serial Port and Name of your bean so it communicates with the right bean.
- In order to save the data you need to point to what folder the data is going to be saved at. To do this double click the "serial-data" node and write the filename and name.
For more help, take a look at this tutorial.
Downloads
Program Your Bean With Arduino IDE
In order for the bean to read and send the data to the computer, you need to add the code to the bean.
First you need to install the Bean Loader app, if you have a mac these are the steps and the way to upload code to the bean.
Once you have it install and ready, upload the code that is in the file "bean_code" to the bean.
Downloads
Final Steps
Deploy in node-red
Once your bean has the code, make sure node-red is running and you are in the node-red editor and click "Deploy" and you should get a window saying that it was successful.
Once you do this, you will find your saved data in the file you have selected by double clicking on the "serial-data" node.
Enclosure for LightBlue Bean and sensor
I decided to put the battery holder and LightBlue Bean inside a small bag that I will have around my neck. This way I'm able to easily move around with the gsr sensor while setting up the installation. I covered the bean and the sensor with electric tape.