We recently got a kitten for our apartment and he loves to randomly hide from us by getting into the boxes under our bed, where we would usually have to randomly tear apart our bedrooms until we found him. A solution to this problem is to use radio transceivers to log which general hiding place he is, simplifying our search.
This project explores the concepts of using radio transceivers as proximity sensors, using a variable resistor set a range, and using IFFFT and Google Sheets to process the logged data stream.
HardwarenRF24l01 Radio Transceiver
The nRF24L01 is a 2.4 GHz radio transeiver that communicate on 126 channels and can communicate with 6 other nRF24L01 simultaneously. The nRF24L01 processes the signal through the SPI bus and runs on 3.3 V with a maximum power consumption of 60mW.
Particle Photon
The Particle Photon is a micro controller can connect to the particle cloud service though a WiFi connection. The IoT project called for multiple Particle Photons to be used in the project, but as long as there is one Photon within the network, the nRF24L01s can be configured to pass information to the Photon.
Variable Resistor
The radio transmitter Photon sends a message to to the receiver Photons with radio transceiver. The message sent is not important (in our code it is "HELLO WORLD"). The receiver Photon uses a radio.available() function to check for activity on the channel. If there is activity, the receiver photon will publish RECEIVED and an ID that the Google Spreadsheet can process it.
Setting up the Data Processing
Go to IFFT and create an account. Once that has been done go to the Services tab and click on particle.
IFFT will want your Particle username and password so that the two accounts can be linked.
Once the accounts have been linked, go to the my applets tab, then click the particle link, and select the applet "save data from Spark Core in Google Spreadsheet"
Set the if(event name) to chart, and set the set the Photon to the transmitter Photon.
The data should come up as seen below on the Google Sheet. The data sent to the sheet can be adjusted with the applet settings wizard.
From this the logical statement =IF($C1=X, 1, 0), where X is the data value that was published by the photon (in out project it was 1 and 2). This logical statement will produce a 1 if the data published matches the photon name that is specified and a 0 if it does not
The processed data is then summed by the function =SUM(H1:H2000), where H is the column that the logical statement is sent located.
This data can now be sent to a pie chart that shows where how much time the cat spends in different locations. to do this go to the insert tab and click chart, select the chart type as pie, and select the data column (F1:F2 for our example) and the label cells (E1:E2 for our example).
Comments