doc:appunti:hardware:raspberry_explorer
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| doc:appunti:hardware:raspberry_explorer [2018/10/10 00:12] – [Removing Some Packages] niccolo | doc:appunti:hardware:raspberry_explorer [2018/11/26 09:42] (current) – [Time Syncronization with GPS and NTP] niccolo | ||
|---|---|---|---|
| Line 42: | Line 42: | ||
| {{ .: | {{ .: | ||
| The camera mounted in our kit is based on the **OV5647 sensor**, capable of 2592x1944 pixels (**5 Mpixels**). The camera has a **wide viewing angle** of 175°. The camera requires a **manual focus adjust**, turning the lens mount clockwise or counerclockwise. The focus resulted a bit critical: trying to focus to infinity it resulted that the mere rotation of 1/16 of a turn, can **mess-out the focus** very badly. Also the quality of the pictures is **not exceptional**, | The camera mounted in our kit is based on the **OV5647 sensor**, capable of 2592x1944 pixels (**5 Mpixels**). The camera has a **wide viewing angle** of 175°. The camera requires a **manual focus adjust**, turning the lens mount clockwise or counerclockwise. The focus resulted a bit critical: trying to focus to infinity it resulted that the mere rotation of 1/16 of a turn, can **mess-out the focus** very badly. Also the quality of the pictures is **not exceptional**, | ||
| + | |||
| + | ===== Other Sensors ===== | ||
| + | |||
| + | {{.: | ||
| + | |||
| + | {{.: | ||
| + | |||
| + | * **GPS u-blox NEO-6** | ||
| + | * **GY-521: MPU-6050 Accelerometer and Gyroscope** | ||
| + | * **GY-273: QMC5883L 3-Axis Magnetic Sensor** | ||
| + | * **GYBMEP: BME280 pressure, humidity and temperature sensor** | ||
| ===== Software Setup ===== | ===== Software Setup ===== | ||
| Line 87: | Line 98: | ||
| * Serial port hardware enabled (Yes) | * Serial port hardware enabled (Yes) | ||
| * Advanced Options | * Advanced Options | ||
| - | * **Memory Split** | + | * **Memory Split** |
| The files changed by that configuration are (among others): | The files changed by that configuration are (among others): | ||
| Line 226: | Line 237: | ||
| I use **gpxlogger** (from the **gpsd-clients** Debian package) to acquire track logs from the GPS. It seems that the program has a bug handling the **%%-f%% option**, sometimes it crashes with the error //free(): invalid next size (fast)//. I opened [[https:// | I use **gpxlogger** (from the **gpsd-clients** Debian package) to acquire track logs from the GPS. It seems that the program has a bug handling the **%%-f%% option**, sometimes it crashes with the error //free(): invalid next size (fast)//. I opened [[https:// | ||
| + | |||
| + | ===== GPS u-blox NEO-6 ===== | ||
| + | |||
| + | {{.: | ||
| + | {{.: | ||
| + | |||
| + | |||
| + | A cheap alternative to the Adafruit Ultimate GPS HAT is the **u-blox NEO-6 GPS** module. It has a serial interface and a pin to carry the PPS signal. | ||
| + | |||
| + | ^ u-blox | ||
| + | | 1 VCC | PIN 2 - 5V | | ||
| + | | 2 GND | PIN 6 - GND | | ||
| + | | 3 TXD | PIN 10 - GPIO#15 UART0_RXD | ||
| + | | 4 RXD | PIN 8 - GPIO#14 UART0_TXD | ||
| + | | 5 PPS | PIN 7 - GPIO# | ||
| ===== Time Syncronization with GPS and NTP ===== | ===== Time Syncronization with GPS and NTP ===== | ||
| Line 254: | Line 280: | ||
| </ | </ | ||
| - | At the next reboot you should read the following kernel logs via **dmesg**: | + | At the next reboot |
| < | < | ||
| Line 458: | Line 484: | ||
| Beware that if the sleep time is lower than three times the sensor settling time (default 40 x 3 = 120 seconds), **the sensor fan will not be stopped** between each read, so be prepared for a shorter life of the sensor. | Beware that if the sleep time is lower than three times the sensor settling time (default 40 x 3 = 120 seconds), **the sensor fan will not be stopped** between each read, so be prepared for a shorter life of the sensor. | ||
| + | |||
| + | |||
| + | ===== GY-273 QMC5883L 3-Axis Magnetic Sensor ===== | ||
| + | |||
| + | The **GY-273 magnetometer** is based upon the **QMC5883L** chip, which is similar to the HMC5883L one. | ||
| + | |||
| + | ^ PMS5003 Pin ^ Color ^ Raspberry Pi ^ | ||
| + | | 1 VCC | Red | PIN 1 - 3.3V | | ||
| + | | 2 GND | Black | PIN 9 - GND | | ||
| + | | 3 SCL | Yellow | ||
| + | | 4 SDA | Green | PIN 3 - SDA | | ||
| + | | 5 DRDY | | Not Connected | ||
| + | |||
| + | Connect the device, enable the I2C bus using **raspi-config** and install the **i2c-tools** package. You should see the device at address 0x0d of the bus: | ||
| + | |||
| + | < | ||
| + | i2cdetect -y 1 | ||
| + | | ||
| + | 00: -- -- -- -- -- -- -- -- -- -- 0d -- -- | ||
| + | 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
| + | 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
| + | 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
| + | 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
| + | 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
| + | 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
| + | 70: -- -- -- -- -- -- -- -- | ||
| + | </ | ||
| + | |||
| + | GitHub and Pypi.org has a [[https:// | ||
| + | |||
| + | So I wrote my own Python module, named **py_qmc5883l** which is available on **[[https:// | ||
| + | |||
| + | < | ||
| + | apt-get install python-smbus | ||
| + | cd / | ||
| + | git clone https:// | ||
| + | mkdir / | ||
| + | cd py-qmc5883l | ||
| + | python setup.py install | ||
| + | </ | ||
| + | |||
| + | Now you can access the magnetic sensor with a simple Python program: | ||
| + | |||
| + | <code python> | ||
| + | import py_qmc5883l | ||
| + | sensor = py_qmc5883l.QMC5883L() | ||
| + | m = sensor.get_magnet() | ||
| + | print(m) | ||
| + | </ | ||
| + | |||
| ===== Web References ===== | ===== Web References ===== | ||
| Line 475: | Line 551: | ||
| * [[https:// | * [[https:// | ||
| * [[http:// | * [[http:// | ||
| + | |||
| + | === QMC5883L 3-Axis Magnetic Sensor === | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | |||
| + | === Other Sensors === | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | |||
doc/appunti/hardware/raspberry_explorer.1539123168.txt.gz · Last modified: by niccolo
