This project involves:
- Developing a firmware running on the BlueRadios Sensor bug BR-BUTTON-S3A-LP that can be purchased from Amazon: [url removed, login to view]
- Developing an Android app running on all Android phones that support Bluetooth 4.0 (including Bluetooth Low Energy)
- Both compiled and source codes are needed at the end of project.
A) Requirements for the firmware running on the SensorBug:
1. SensorBug should be able to communicate with the Android app. So, it needs to be able to be found and connected to the Android app using BLE (Bluetooth Low Energy).
2. SensorBug has two switches (SW1 and SW2), two LEDS (LED1 and LED2), one CPU (CC2540/41)and one 3-axis accelerometer (ACC).
3. ACC can provide data that after processing will reveal the SensorBug Roll, Pitch, and Yaw data (see [url removed, login to view]) for the definition of Roll, Pitch, and Yaw (we will call it RPY data herein after in this document)
4. To extract the RPY data, a function (ReadACC) will be called. This function should contain the necessary filters to eliminate the noise and extract reliable data (such as averaging multiple data that are taken consequently for a short period of time for each reading). For example, every time such function is called, the CPU reads the first RPY data (R1,P1, Y1), waits for t1 milisecons, reads the second RPY data (R2, P2, Y2), and do this for n1 times. Then calculates the averages of R1~Rn1, P1~Pn1, Y1~Yn1. These averages will be the output of the reading function.
5. SensorBug can be turned ON or OFF by pressing SW1 and SW2 at the same time for t2 seconds
6. Upon being turned ON the LED1 should flash one time for t3 seconds to let the user know that it is being turned ON.
7. Upon being turned OFF the LED1 and LED2 should flash one time for t4 seconds simultaneously to let the user know that it is being turned OFF.
8. After the device is turned on, CPU stays in low power mode and waits for the user to do a short click on SW1. When the short click is detected, CPU calls ReadACC function and saves the results in memory as the REST data (or R0, P0, Y0). CPU also turns LED1 on for t4 seconds to let the user know that it has successfully recorded the REST data. From now on, the CPU goes to sleep mode, wakes up every t5 seconds, reads the RPY data, calculate the difference between the measured RPY and the REST data (R0, P0, Y0) as Rd, Pd, Yd, and then calls a function named as IsInComfortZone. Then goes back to sleep mode again.
9. IsInComfortZone function works as follows: It receives Rd, Pd, Yd data as input. Runs an algorithm on them to decide whether the SensorBug has been tilted outside the Comfort zone or not. If it decides that the SensorBug is still in comfort Zone then the function just returns 0 and does nothing else. But If it detects that the SensorBug is now outside the Comfort zone it turns the LED2 ON for t6 seconds and then returns 1.
B) Requirements for the Android app:
- Android app should provide all the necessary functions needed for reliable communication with the SensorBug through a BLE link.
The Sensor bug should work in three modes: Normal mode, Configuration mode, and Debug mode
- Normal mode: In this mode the sensor bug has no communication with the android phone and works as a standalone device. This is the default mode and the average power consumption should be less than 1mA (excluding the LEDs power consumption).
- Configuration mode: To enter and exit this mode the user should double click the SW2 switch. In this mode the user can adjust SensorBug parameters (such as t1~t6, n1) as well as the parameters of the algorithm that is being run by the IsInComfortZone function, through the app that is being run on the Android phone.
The Android App will provide a simple UI as below:
Rmin < Roll < Rmax
Pmin < Pitch < Pmax
Ymin < Yaw < Ymax
* User should be able to adjust Rmin, Rmax, Pmin, Pmax, Ymin, Ymax values in 1 degree resolution from -90 degree to +90 degree.
* User should be provided logical operators AND, OR for the above conditions
- The setting parameters sent to the SensorBug in Configuration mode should not be lost when the SensorBug is powered off.
- Debug mode: To enter and exit this mode the user should keep SW2 pressed and then does a single click on SW1. In this mode the SensorBug sends its accelerometer raw data to the Android phone after each reading along with a time stamp using BLE (Bluetooth Low Energy). The Android App logs this data in a file with .CSV format as well as showing them on a graph in real time for all three axis.
18 freelancers estão ofertando em média $577 para esse trabalho
Software design & development Relevant Skills and Experience I am good in Bluetooth Low Energy (BLE), Software Development Proposed Milestones $500 USD - Cost