Small Upgrade On The Hardware Side

Our measurement device got a small hardware upgrade: Two status LEDs and a button:

RPI2_LEDs_Button_Schaltung

With R1 = U(R1) / I = (U(GPIO) – U(LED)) / 0.010A = (3.3V – 2.0V) / 0.010A = 130 Ohm

We connected the button to GPIO 5 with a pull-up resistor  (10kOhm). This way the Raspberry PI can be booted with the button (no software code needed).

USB Switch

Currently only our RPIs are powered by battieres – our switch is connected to the car on-board-socket (through a converter). If the whole messbox needs to run with battery packs only there are adapters available to plug your low-power switch to a regular USB port (battery pack).

In our case (D-Link DGS-1008D) we need 7.5V, 1A to USB adapter – available e.g. here(1).
(1) This was the only one we found online but the seller confirmed that it works for our device: “Yes, I just checked and our adaptor B00HM59B4C will suit the D-Link DGS-1008D. The current draw will be fine and the tip is the correct size.”

Advertisements

Testing the current state of the messbox

After working on the server-PI and sensor-PIs separately and often virtualized we decided that it’s time to put the messbox together and see what happens.

iot_glue_setup

The PIs boot and connect automatically. The sensor-PIs directly start sensing and forward the data to the server-PI who reads the GPS data and writes the received sensor data to csv files as soon as all sensors are connected.

iot_glue_screenshot

Here you have a sample csv log file which contains a quake around the timestamp 707020657 (line 844): sample csl file

The format of the csv file is:

sampleID, timestamp, sensorName (GPS), time, lat, lon, speed, course.
sensorName (FL), gyroX,gyroY,gyroZ,acceX,acceY,acceZ,rotaX,rotaY,rotaZ,
sensorName (FR), gyroX,gyroY,gyroZ,acceX,acceY,acceZ,rotaX,rotaY,rotaZ,
sensorName (BL), gyroX,gyroY,gyroZ,acceX,acceY,acceZ,rotaX,rotaY,rotaZ,
sensorName (BR), gyroX,gyroY,gyroZ,acceX,acceY,acceZ,rotaX,rotaY,rotaZ,
measurementID

And here a chart of the test quake:

received_2015-06-07_19-56-44_chart

Testing the hardware of our road quality measurement setup

Not only the first bit of hardware arrived but also the second (long USB power cables) so now it’s testing time: Overall power consumption, capacity of the battery packs/power banks and voltage drop for the long USB power cables.

Hardware setup (car)

iot15_hw-setup_final

Overall power consumption

In theory our test setup should consume:

  • each of the 4 RPi-B should consume max. 700mA + 50mA (GPIO) (5V; 3.75W)
  • RPi-2B max. 800mA + 50mA (GPIO) + 80mA (GPS sensor/USB) (5V; 4.65W)
  • Switch (D-Link DGS-1008D) max. 7,5W
  • overall: 4 * 3.75 W + 4.65W + 7.5W = max 27.15W

Testing(1) the overall power consumption:

  • idle: ~19W
  • 100% CPU: ~25W

(1) testing device: SilverCrest model 9149

Battery pack capacity (powering RPis)

Unfortunately our battery packs(2) can not be charged and provide power to consumers at the same time. But as a fully charged pack was able to power two RPi-B(5) for 7h 15min before indicating low battery they are suitable for our test scenario (sensing road quality for a period of a couple of hours).

(2) TP-LINK TL-PB10400 Li-Ion 10400 mAh
(5) both RPis were sensing and transmitting sensor data with 50Hz through websockets continuously

Powering a RPi with a long USB cable (voltage drop)

A possible problem mentioned in my last posting (Choosing a test setup) is the voltage drop over long USB cables for powering our RPis. The RPi specifications require a voltage of 4.75V to 5.25V. Even with short cables (30cm) of bad quality we measured only 4.64V between TP1 and TP2 on our RPis. To avoid an even bigger voltage drop in long cables we ordered high quality 28/21-AWG-cables(3) with a range of 1.8 and 3m. Lets see what the multimeter(4) thinks about our purchase:

cable type voltage (TP1/TP2) RPI model power supply
noname 30cm cables 4.64-4.89V Model B USB charger (A3H10)
3m 21/28AWG 4.98V Model B USB charger (A3H10)
1,8m 21/28AWG 5.00V Model B USB charger (A3H10)
cable type voltage (TP1/TP2) RPI model power supply
noname 30cm cable 4.63V (1A socket)
4.88V (2A socket)
Model B battery pack
3m 21/28AWG 4.85V (1A socket)
4.96V (2A socket)
Model B battery pack
1,8m 21/28AWG 4.88V (1A socket)
5.02V (2A socket)
Model B battery pack

Awesomely, the longer cables provide even higher voltage (due to the smaller cable diameter) than the short ones, mission accomplished!

(3) Anker cables: http://de.ianker.com/product/A7105011
(4) Laudmann LM-800 multimeter

All in all the hardware fits our needs. A first test of our measurement software will follow very soon here on this blog.