Projects
Pico Circuit

Raspberry Pico Circuit

This circuit will have a collection of sensors that will capture data. The Pico will read the data and display it on the LCD, send it to the ESP32 over UART, and write the data to the default Serial port so that it can be read by the Node-RED flow.

The ESP32 communication circuit will publish the sensor data to the MQTT broker from where it will be read by the mobile app.

This circuit will also have a collection of relays and motors that will receive control signals from the ESP32 communication circuit over UART and over the default Serial port from the Node-RED flow.

Components

Only connect components that have a operating (signal) voltage of 3.3V. Also make sure there is a microPython library for the component.

ComponentFunction
Voltage
Pins
Temperature and

Humidity Sensor (DHT11/22)
Measures temperature
and humidity.
3.3VDigital Out
Infrared SensorDetects the presence
of an object.
3.3VDigital Out
Ambient Light SensorDetects ambient
light intensity.
3.3VDigital Out
Sound SensorSound sensor.3.3VDigital Out
I2C LCD 16x2Used to display data.5VI2C
RelayControlled by binary
signal from IoT app.
3.3VDigital In
LED ModuleUsed as a visual indicator.3.3VDigital Out
I2C LCD 16x2Used to display data.5VI2C

Circuit Diagram

Pico Circuit Diagram

Connections

Board pin numbers are those printed on the board while code pin numbers need to be used in code (generally indicated in the pinout diagram as the GPIO pin number). They may be the same or different, depending on the board.

Board Pin
Code Pin
ModeComponentPin
42Digital GPIO OutRelaySignal
53Digital GPIO--
64I2C SDAI2C LCDSDA
75I2C SCLI2C LCDSCL
96Digital GPIO--
107Digital GPIO--
118Software UART TXESP3216 (RX2)
129Software UART RXESP 3217 (TX2)
1410Digital GPIO OutServo MotorSignal
1511Digital GPIO OutRed LEDRed Cathode
1612Digital GPIO OutBlue LEDBlue Cathode
1713Digital GPIO OutGreen LEDGreen Cathode
1914Digital GPIO--
2015Digital GPIO--
2116SPI CIPO--
2217SPI CS--
2418SPI SCK--
2519SPI COPI--
2620Digital GPIO InDHT22Data Out
2721Digital GPIO InIR SensorData Out
2922Digital GPIO InSound SensorDigital Out
3126 (ADC0)Analog InLDRSignal
3227 (ADC1)Analog InRaindrop SensorAnalog Out
3428 (ADC2)Analog InRaindrop SensorDigital Out

Code

The code for this circuit is distributed across multiple files, so will not be displayed here. It will be available for download for subscribers.