doc:appunti:hardware:raspberry_explorer
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
doc:appunti:hardware:raspberry_explorer [2018/10/12 16:33] – [PMS5003 Sensor] niccolo | doc:appunti:hardware:raspberry_explorer [2018/10/26 08:59] – [Other Sensors] 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 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 460: | Line 486: | ||
- | ===== GY-273 QMC5883L | + | ===== GY-273 QMC5883L |
- | The **GY-273 magnetometer** is based upon the **QMC5883L** chip, which is compatible with the HMC5883L one. | + | The **GY-273 magnetometer** is based upon the **QMC5883L** chip, which is similar to the HMC5883L one. |
- | ^ PMS5003 Pin ^ Color ^ Raspberry Pi ^ | + | ^ PMS5003 Pin ^ Color ^ Raspberry Pi |
- | | 1 VCC | Red | PIN 1 - 3.3V | | + | | 1 VCC | Red | PIN 1 - 3.3V |
- | | 2 GND | Black | PIN 9 - GND | + | | 2 GND | Black | PIN 9 - GND | |
- | | 3 SCL | Yellow | + | | 3 SCL | Yellow |
- | | 4 SDA | Green | PIN 3 - SDA | + | | 4 SDA | Green | PIN 3 - SDA | |
- | | 5 DRDY | Violet | + | | 5 DRDY | |
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: | 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: | ||
Line 485: | Line 511: | ||
70: -- -- -- -- -- -- -- -- | 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 502: | 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.txt · Last modified: 2018/11/26 08:42 by niccolo