-
Notifications
You must be signed in to change notification settings - Fork 8
Sensors
All schematics are made with www.draw.io.
- use flexible conductors for all wires which are reaching out of the box. To avoid conductor breaks.
- install the Pi serial patch, to increase the baudrate to 250000.
- redesign for the serial protocol. That can increase serial speed.
- serial protocol values not as characters instead use simple integer values.
- Currently the values are requested every time you want them. The request includes a request char sequence.
- The Python program is not able to run in less then 10 millisecond intervals. The problem is not fixed yet.
The python script main.py is located in SmartChair/sensors/pi_python/main.py!
The following command shows all available flags.
sudo python3 main.py --help
If you want to start the program with pressure sensor (every two seconds )evaluation, then type:
sudo python3 main.py --pressure 2.0
When you want to push Messages to rabbitMQ, then type:
sudo python3 main.py --pressure 2.0 --rabbitMQ
Without the --rabbitMQ flag, all messages will be printed in the console.
All valid parameters can be requested if you type:
sudo python3 main.py --help
Component diagram - Architecture team_sensors
Sequence diagram - RaspberryPi <-> Arduino Nano
Sequence diagram - RaspberryPi <-> Accelerator_sensor
Required Hardware
- Raspberry Pi Datasheet - Raspyberry Pi 3
- Arduino Nano Datasheet - Arduino Nano
Required Sensors
- Pressure Datasheet - Pressure_sensor Interlink FSR406
- Pressure Datasheet - Pressure_sensor Interlink FSR402
- Distance Datasheet - Distance Sharp GP2Y0A21YK0F
- Temperature Datasheet - Temperature TSIC306
- Accelerator Datasheet - Neuftech GY-521 MPU-6050
- Microphone Datasheet - Microphon renkforce CM568
For the second I2C address we need to connect the AD0 pin to 3.3V. The Raspberry Pi board has a pull up resistor to make AD0 default low or high.