With this new enclosure, I have created a new sensor board that brings all my sensors together in one location as well as setting up 10 pins on the board for bringing together like wires for communication back to the Pi. Due to the need of the mast needing 5V, I am using 2 separate voltages on the opposite rails. The rail on the left is 5v and the one on the right is 3.3v
There are 3 sections that I’m going to cover:
- Battery Circuit – for monitoring of the battery charge
- Sensors – The wiring of the sensors within the enclosure as well as the communication back from the mast
- Sensor board to RPi communication
Battery Circuit Wiring:
- GND from Powerboost to GND on board
- Low Battery indicator from Power boost to voltage divider on board. Resistors: R1 = 2.2kΩ, R2 = 5.1kΩ (If you’re not familiar with how this works, LBI goes to rail containing one side of R1, Other side of R1 goes to rail that contains one side of R2 as well as read wire. Other side of R2 goes to ground. This is used to cut down voltages. The powerboost is outputting 5V, but the MCP30008 ADC can only handle 3.3v which is why the divider circuit)
- Voltage divider read wire to CH0 on MCP3008
- MCP3008 wiring
- Vdd & Vref to pin 10 on board (3.3V power rail)
- AGND & DGND to pin 9 on board (3.3v ground rail)
- CLK to pin 5 on board
- Dout to pin 6 on board
- Din to pin 7 on board
- CS to pin 8 on board
Sensor Wiring
- BMP180
- Vin to pin 1 on board (5V power rail)
- GND to pin 0 on board (5V ground rail)
- SCL to pin 3 on board
- SDA to pin 2 on board
- MOD-1016
- Vcc to pin 1 on board (5V power rail)
- IRQ to pin 4 on board (interrupt pin on RPi)
- SCL to pin 3 on board
- SDA/MOSI to pin 2 on board
- GND to pin 0 on board (5V ground rail)
- Mast
- Blue-white to pin 0 on board (5V ground rail)
- Blue to pin 1 on board (5V power rail)
- Green-white to pin 3 on board
- Green to pin 2 on board
Board pinout to Rasberry Pi
- Pin 0 (5V GND) to pin 7 on Pi
- Pin 1 (5V Power) to pin 4 on Pi
- Pin 2 (SDA) to pin 3 on Pi
- Pin 3 (SCL) to pin 5 on Pi
- Pin4 (Int) to pin 11 on Pi (GPIO 17)
- Pin 5 (SPI CLK) to pin 12 on Pi (GPIO 18)
- Pin 6 (SPI OUT) to pin 16 on Pi (GPIO 23)
- Pin 7 (SPI IN) to pin 18 on Pi (GPIO 24)
- Pin 8 (SPI SC) to pin 22 on Pi (GPIO 25)
- Pin 9 (3V GND) to pin 20 on Pi
- Pin 10 (3V Power) to pin 17 on Pi
it will take a while before I post the Python code on the Pi. I am still testing/working on the code for the battery monitoring. Once I’m done, I’ll post it all here as well as on Github.
No comments