Step 2: Build the sensorbox

From P2P Food Lab
Jump to: navigation, search

2.0 What you need

You have several options depending of your needs and budget. We have divided the materials in different groups: the Basic Board for all the stuff needed to build the aggregator node, then you can choose among different sensors (temperature, air humidity, soil humidity ...) and configuration (onboard, standalone).

Bills of Materials

Aggregator node

The basic board
Type References & Dimensions Quantity Unit price Total price
Arduino Pro Mini 328 3.3V 8MHz Arduino Pro Mini 328 3.3V 8mHz 1 12€ 12€
FTDI Basic Breakout 3.3V Sparkfun Basic Breakout 3.3V 1 11€ 11€
Raspberry Pi Model B Raspberry Pi 1 28€ 28€
Raspian SD Card RASPBERRY-PI / PROG-4GB-SDCARD 1 10.5€ 10.5€
USB cable, M/F, 25cm [1] 1 1.09€ 1.09€
USB Connector USB2066-05-RBHM-15-STB-00-00-A / To connect the solar panel 1 1.05€ 1.05€
26-way female board-to-board connector SAMTEC - BCS-113-L-D-TE 1 5.9€ 5.9€
1-row 12-way header pins Header pins 2.54MM 36WAY / To connect the Arduino to the main board 2 1.27€ 2.54€
1-row 6-ways header pins (bended) Header pins 2.54MM 36WAY / used to connect the FDTI to the Arduino 1 1.51€ 1.51€
JST-3 header B3B-PH-K-S / Used to connect the sensors to the main board 4 0.15€ 0.60€
MOSFET STU95N2LH5 1 0.72€ 0.72€
Main PCB ND 1 ND ND
Resistance 100 MOhms [2] 2 1€ 2€
TOTAL 76.91€ + PCB
Networking options
Networking
Type References & Dimensions Quantity Unit price Total price
Option 1: USB WiFi Dongle D-LINK DWA-127 1 20€ 20€
Option 2: USB GSM Dongle with SIM Card Huawei E176 1 31€ 31€
Option 3: Ethernet On board 1 0 0
Options to power the aggretator node
Power
Type References & Dimensions Quantity Unit price Total price
Solar panel Opteka Solar Charger BP-SC4000 (4000 mAh, 1.0A, 11.4 x 8.4 x 1.4 cm) 1 28€ 28€
AC/DC adaptor 5V 1A AC/DC adaptor 1 4.43€ 4.43€

Temperature and Humidity Sensors

Option 2: Remote temperature and humidity sensor
Type References & Dimensions Quantity Unit price Total price
Humidity and Temperature Sensor RHT03 / DHT-22 1 14 14
JST-3 header B3B-PH-K-S / Used to connect the sensors to the main board 1 0.15€ 0.15€
4k7 resistance RESISTANCE 0805 4K7 1 0.041€ 0.041€
JST-3 header plug JST-3 header plug 1 0.05€ 0.05€
3-way wire
TOTAL 14.15€


Option 3: High quality temperature and humidity sensor (options for two sensors)
Type References & Dimensions Quantity Unit price Total price
Sensor SHT15 1 >40 >40
4-way connector BG300-04-A-L-A 1 1.00 1.00
Pins Header pins 2.54MM 1 1.51 1.51
Telephone wire
Sensor PCB ND ND ND ND
TOTAL xxx

Other sensors

Light sensor
Type References & Dimensions Quantity Unit price Total price
Light sensor OSRAM SFH 203 P 1 1.07 1.07
390 Ohm Resistance 390 Ohm 0805 type 1 0.017 0.017
TOTAL xxx


Pump & Pump connection
Type References & Dimensions Quantity Unit price Total price
Pump Reference needed  ?  ?  ?
Water flexible Reference needed  ?  ?  ?
Screw PCB Terminal Multicomp MC000018 2 0.70 1.40
MOSFET STU95N2LH5 1 0.72 0.72
Header pins 3-way Header pins 2.54MM 1 1.51 1.51
JST-2 header B2B-PH-K-S 1 0.12€ 0.12€
Jumper 2-way jumper 1 0.31 0.31
Pump PCB ND ND ND ND
TOTAL xxx


Soil humidity sensor
Type References & Dimensions Quantity Unit price Total price
Screw PCB Terminal Multicomp MC000018 1 0.70 0.70
555 timer chip LMC555CM 1 1.13 1.13
390 Ohm Resistance 390 Ohm 0805 type 1 0.017 0.017
150 kOhm Resistance 150 kOhm 0805 type 1 0.009 0.009
2.2 uF capacitors 2.2uF capacitor type 0805 2 0.37 0.74
TOTAL xxx


Camera
Type References & Dimensions Quantity Unit price Total price
Webcam Logitech C310 1 35 35

Protection box

Option 1: Plastic box
Description Reference Quantity Unit cost (euro) Total cost (euro)
Box to protect external humidity sensors ND ND ND ND
Plastic box solution
Option 2: Wood box
Description Reference Quantity Unit cost (euro) Total cost (euro)
Plywood 25cm x 65 cm, 5mm ND ND ND ND
Wood box solution

Other materials (to be reviewed by Peter)

Description Reference Quantity Unit cost (euro) Total cost (euro)
The basic board
USB Mini cable ND ND ND ND
Ethernet cross cable ND ND ND ND
3 x 1-way wire, LIY, 15cm ND ND ND ND
3-way protected wire, 200cm ND ND ND ND
2 x 1-way wire, LIY, 5cm ND ND ND ND
AAA batteries and Battery holder, 3xAAA (optional ?) ND ND ND ND
Male header, 6-way ND ND ND ND
JST-2 plug ND ND ND ND
JST-2 header ND ND ND ND
JST-3 plug ND ND ND ND
JST-3 header ND ND ND ND
JST-4 plug ND ND ND ND
JST-4 header ND ND ND ND
Resistance for lightsensor, 12 kOhm (??? 390 Ohm in the bill of material) ND ND ND ND
Transistors for lightsensor (??? Not in the bill of material) ND ND ND ND
FRAM ND ND ND ND
Jumper ND ND ND ND
Male headers (breakable) 2x12, 1x2, 1x3 ND ND ND ND
Terminal block, 2 way, 3.81mm ND ND ND ND
Screw & bolts ND ND ND ND
Washers ND ND ND ND
Wood screws to fix lightsensor ND ND ND ND
Spacers & screws ND ND ND ND

Nota

Sensorbox V3 - Materials Nota

Equipment

The structure

The PCB

New version (June 2014)

Main PCB Front
Main PCB Back

Schematics file

(To be added)

Arduino port used by sensors

  • Port 2: RHT03 (external sensor - thrx in config.json)
  • Port 4: RHT03 (internal sensor - thr in config.json)
  • Port A2: Luminosity
  • Port 9: Raspberry Pi
  • Port A3: Battery USB
  • Port 8: Pump
Internal and external thermal temperature connections on the board

2.1 Solder components on main PCB

Solder USB plug

It's used to connect the solar panel battery.

Thus, we just need to connect the power pins. Behind the USB connector, we have five pins. From left to right, we have VCC +5V connection, D- (Data -), D+ (Data +), ID (Mode Detect) and Ground. We only connect VCC and Ground to get power.

For additional information, Micro USB Connector Pinout diagram

USB Plug

Solder Header Pins for Arduino

Solder the pins that connect the Arduino Mini Pro to the board.

Header pins
Header pins mounted on main board (Front view)
Header pins soldered on main board (Rear view)

Solder Female board to board connector

This is the connector that connect the Main PCB to the Raspberry Pi.

Female board to board connector
Connector mounted on main board (Front view)
Connector soldered on main board (Rear view)

Solder pump header pin

If you choose to install a pump, solder 3-way header pin with jumper, and JST-2 header plug

3 way header pin
Header pin with jumper
JST2 header plug

Solder additionnal headerpin

Solder this additionnal 2-way header pin

Additional header pin

Solder JST-3 header plug

Solder these 4 plugs that are made to simply connect sensors

JST-3 header plug

Solder MOSFET

Solder MOSFET and respect the direction of its pins (see picture).

MOSFET
MOSFET in place

Solder resistor on main PCB

Solder the two 100 MOhms resistors. This part of the circuit is a voltage divider to measure the solar panel input. As the Arduino works on on 3.3V, it can't measure 5V. The voltage divider reduce the 5V power issued by the USB plug down to 2.5V. We use big resistors in order to reduce energy losses.

It's important to solder these surface-mounted devices before installing the Arduino.

Nota: This part of the circuit is still work in progress

The two 100MOhms SMD resistor soldered on the main PCB

Don't solder resistors on the similar pattern, used to measure AAA power in a previous design. In the current design it is connected to a wrong entry of an Arduino.

Solder FRAM and E/S used on Arduino

  • Solder the red and blue wire on the back of the Arduino on A4 and A5 E/S
Connection on A4 and A5
Connection on A4 and A5 (up)
  • Solder the 6 pins of the FRAM used to connect the FTDI Breakboard
FRAM (facing down)
FRAM (facing up)
  • Solder the following E/S on the Arduino: 2, 4, A2, A3, 9, VCC, RAW and both GND.


  • Solder the red and blue wire on the board to connect the Arduino directly to the Raspberry Pi (red on the left, blue on the right when facing the RPi connector).
Wires connected to the board

Wires

Equip wires with JST type connections.

JST-type connection

Clip the wire in the JST plug (JST-3 for thermal sensors). It doesn't matter where you plug the different wires, just keep the same pattern for both connections.

Equiped wire

Notes on current design

The current PCB design is a work in progress. Several features are not used and/or malfunction.

There is a place to connect a timer 555, but it is not yet used. It was initially a difficult circuity to measure the soil humidity. In the following design we will try to implement the solution used by Hernani Diez of "Re:Farm the City" project.

We also advise you to cut some of the connections (use a cutter to erase the "silver lines"). See below for details:

Red lines indicate where to erase connections

2.2 Solder components on Temperature/Humidity Sensors PCB

Components for Humidity/Temperature Sensor

Solder Resistor

Solder the 470 Ohms SMD resistor on the PCB.

Resistor for RHT03 sensors

Solder RHT03 sensor

Bend the 4 connection of the sensor so you can solder easily.

RHT03 sensor soldered

Solder JST-3 header plug

JST-3 header plug

2.2 Solder components on Light Sensor PCB

Light sensor PCB

The light sensor currently used will be changed in the next designs, because of poor performance.

Light sensor schematics

2.2 Solder components on Pump PCB (Optional)

Pump PCB

2.3 Plug Arduino with Raspberri Pi

Arduino on Raspberry
Arduino on Raspberry

2.4 Install pump (optional)

  • Make holes in plastic boxes, and install wires
Make holes
Wires
Wires
  • Install pump
Pump
  • Wire pump to main PCB
  • Test general setup
General setup

2.5 Wire the modules together

Plug everything

2.6 Lasercut and assemble the box (optional)