Regulate Temperature with a Raspberry Pi Pico — Part 2: Assembly

Paulo de Jesus
3 min readJun 13, 2023

--

In Part 1 of this article series I showed you what hardware components you needed to build a temperature regulator, that can control two relays. In this next part of the series I will show you how to assemble all of the hardware components together.

Assembled Temperature Regulator

We will assemble the components in the following order:

  • Expansion Board and Pico Microcontroller
  • Pico HATs (Dual Relay and OLED Display)
  • Breadboard, Temperature Sensor and Resistor
  • Breadboard and Expansion Board Wiring

Expansion Board and Pico Microcontroller

Take and expansion board and the Pico microcontroller, paying close attention to which side the micro USB connector is on. On the expansion board itself you should see an image indicating which side the micro USB connector should be:

Expansion board and Pico microcontroller

Carefully slot the Pico onto the expansion board:

Connected Pico microcontroller

NOTE: Most expansion boards should at least show the number of each pin in case there is no image of a micro USB connector.

Pico HATs

Next take the Dual relay HAT and the 1.3" OLED Display HAT, again paying close attention to which side the micro USB images are on:

Underside of the Display HAT and Relay HAT

Carefully slot the Relay HAT and Display HAT onto the expansion board:

Connected Relay HAT and Display HAT

NOTE: It doesn’t matter which expansion slot you use on the expansion board, so long as the HATs are facing the correct way.

Breadboard, Temperature Sensor and Resistor

What we want to do is connect the temperature sensor and resistor on the breadboard as per this wiring diagram:

Temperature Sensor and Resistor

The wiring on the breadboard should look similar to this:

Breadboard, Temperature Sensor, and Resistor

Breadboard and Expansion Board Wiring

Next connect three jumper wires (Black, Yellow, and Red) onto the breadboard, corresponding with the sensor wires as shown here:

Connected Jumper Wires on Breadboard

Then on the expansion board connect the jumper wires as follows:

  • Connect the Black wire onto a ground (-) pin
  • Connect the Red wire onto a 3V3 (+) pin
  • Connect the Yellow wire onto a GP16 (16) pin

NOTE: Some of the GPIO pin numbers are used by the HATs by default, so we’ve chosen a specific GPIO pin number (16) for the temperature sensor so it doesn’t clash.

The wiring should look similar to this:

Connected Jumper Wires on Expansion Board

Finally we can connect the micro USB to USB cable, to the Pico microcontroller:

Connected Micro USB to USB Cable

In Part 3 of this article series, I will show you how to copy the required code files from my GitHub repo onto the Pico microcontroller to make it all run.

Please follow me on Medium if you enjoyed this article and would like to know when I publish the next part in this series, and any other future articles.

--

--

Paulo de Jesus

I enjoy solving problems with technology. When I'm not doing that I also enjoy doing DIY, and brewing my own beer.