Skip to content
This repository has been archived by the owner on Jul 8, 2020. It is now read-only.

Connecting the hardware components

brian111 edited this page Jun 5, 2018 · 10 revisions

Before connecting any hardware to the Pi you need to shutdown the Pi and disconnect the power:

sudo shutdown -h now

Wait a couple of minutes for the pi to shutdown then disconnect the power cable.

The Servo, LED and SenseHAT need to be connected to the Raspberry Pi using jumper cables. If you don't have a SenseHAT you can choose to connect a DHT11 or DHT22 sensor to provide temperature and humidity data.

Use the following guide to ensure you have the correct connections.

TobyJnr

The diagram below shows all the connections that need to be made:

Servo

GND - pin 14
+'ve - pin 2
Data - pin 26

LED

GND - pin 6
+'ve - pin 1
DataIn - pin 12

SenseHAT

Connect the following pins to the corresponding pin on the pi (pin 3 <-> pin 3):
3, 4, 5, 16, 17, 18, 19, 20, 21, 22, 23, 24, 27, 28

DHT Sensor

If using a DHT11 or DHT22 sensor, please ensure you have the sensor facing up with the pins at the bottom (so you can see the grid pattern), then pin out is (from left to right):

  • +'ve -> Raspberry pi pin 17 (3.3V)
  • Data -> Raspberry pi pin 15 (GPIO 22)
  • no connection
  • Ground (-'ve) -> Raspberry pi pin 9 (GND)

Servo

Typically need 3 connecting cables with M/F ends, verify that your servo has a female connector.
Servos can come with a range of wire colours, but as a rule of thumb the darkest colour (black or brown) is the ground. The centre cable (red) is +'ve and the lightest colour (yellow, white or orange) is the data cable. You should check the data sheet for your servo to ensure you correctly identify the wires. The servo I use has brown as the Ground, red as the positive and orange for data.

LED

If using the Neopixel diffused LED then you will need 3 connecting cables F/F ends.
The Neopixel RGB LED has 4 connectors. if you should notice that there is a flat side to the edge of the LED, it should be opposite side of the pixel as the shortest cable. If you lay the LED on a surface with the flat side down, then top to bottom the connectors are:

  • Data In (shortest pin)
  • +'ve voltage
  • Ground (longest pin)
  • Data Out (closest to flat side of LED. This pin is not used in TobyJnr)

SenseHAT

You will need 14 connector cables with M/F ends. (if need to extend then use M/F cables to create longer connecting cables)
The SenseHAT usually sits directly on top of the Raspberry Pi, so when making the connections the pin on the SenseHAT needs to go to the corresponding pin on the Raspberry Pi (as if the SenseHAT was directly connected to the Raspberry Pi 40 pin connector).

Pins nearest the edge of the Raspberry Pi board and the SenseHAT are even number pins and pins furthest away from the edge of the board are even numbers. With the Raspberry Pi help with the connector on the right and the USB ports at the bottom of the Raspberry Pi board then the PIN numbers descend, so top pins are 1 and 2 and the lowest pins are 39 and 40.

When wiring the SenseHAT remember the connector will need to pass through the hole in the head, so if making the connections before fixing the SenseHAT to the head then the connecting cables need to pass through the hole in the head. Ensure the connecting cables are long enough, if not you can extend the connecting cables by joining them together.

Now you have TobyJnr built and all the hardware is connected, it is time to setup the audio.