Pico as GPIO for Inovato Quadra



Thanks to Cody for the inspiration.  The code and breadboard are more a proof of concept than a finished product.  (Cooks Ritual Apology)

Thanks to

https://stackoverflow.com/questions/72151781/how-can-i-get-raspberry-pi-pico-to-communicate-with-pc-external-devices   for getting me started.

Install pip then pyserial

We need pyserial to allow us to open the serial USB connection.

System

The Pico is connected to the host (quadra) via the normal USB connection.

    

The test board contains

Software

Commands - sent from the host

Commands are of the form: operation pin (value).  Operation can be one of:

On Host (Quadra) examples:

Oscillator


Blink and Data

On the Pico:

I used Thonny to develop and upload the following code to the Pi Pico.  Note that it uses the same USB port that I am using to send commands and read data.  So, Thonny needs to be terminated before any of this works.

The software receives interprets and executes commands from the host

            

Links

Details of the hardware

Photo resistor bridge -
 note for the Pico 5V is 3.3V


Two views of the relays showing the control connections and the 120VAC connections
These relays have an opto-isolator driving the relay coil so the current draw is minimal - measured at 2ma.

 

Relays connected to the Pico board
  

Finished with the relays installed in the electrical box.


Wiring in the electrical box:

Since we can't see inside anymore.