User Tools

Site Tools


wio:wiopico-en

Differences

This shows you the differences between two versions of the page.


wio:wiopico-en [2023/08/28 03:06] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +====== SIOpico ======
 +[[:english|{{ :hardware.png}}]][[:english|{{ :rocrail-logo-35.png}}]]
 +  * [[:wio:overview-en|WIO Overview]] | [[:arduino:wio-setup-en|WIO Setup]] | [[:arduino:wioctrl-en|WIO Control]] | [[:arduino:amp-en|User Bitmaps]] | [[:arduino:wio-en|WIO Firmware]] | [[:arduino:wio-mobile-en|WIO Mobile]] | [[:arduino:wio-cable-en|Cable]] | [[:wio:wio-ledscript-en|LEDScript]] | [[:wio:wiopi-en|WIOpi]]
 +    * [[:wio:wiopi-01-en|WIOpi-01]]
 +    * **[[:wio:wiopico-en|SIOpico]]**
 +    * [[:rocnet:headless-cam-en|Headless Raspberry Pi Setup]]
 + \\
 +|< >|
 +|  //**S**lave **I**/**O**//  |
 +{{:wio:pico.jpg?0x300}}{{:wio:siopico-pcb.jpg?0x300}}\\
 +
 + \\
 +=====Introduction=====
 +The Raspberry Pi Pico can be used as WIOpi I2C slave for common tasks:
 +  * 4 Servos or 32 NeoPixel
 +  * 16 I/O (100ms scan)
 +  * 2 four wire stepper on bank1 (ULN2003) 
 +  * up to 2 Charlieplexing signals on bank1
 +The NeoPixel protocol engine needs all interrupts on the Pico. This is the reason that it is not possible to combine servos and neopixel simultaneous on the same Pico.\\
 +
 +
 +
 + \\
 +=====SIOpico Firmware=====
 +The binary firmware can be downloaded here:\\
 +https://wiki.rocrail.net/rocrail-snapshot/SIOpico.ino.rpipico.uf2
 +====Install====
 +  - Keep the Pico button pressed at connecting to USB. (**Important:** The USB cable has to be a data cable, a charging-only cable doesn't work)
 +  - The Pico will behave like a removable drive.
 +  - Copy the [[https://wiki.rocrail.net/rocrail-snapshot/SIOpico.ino.rpipico.uf2|SIOpico.ino.rpipico.uf2]] file on this drive.
 +  - Ready.
 +
 +
 +====Pins====
 +^ Configuration ^^
 +| Servo | GP0 (pin 1) connected to GND | 
 +| NeoPixel | GP0 (pin 1) open and connected to LED strip: Needs a 10k pullup. |
 +| I2C Slave address | GP1 and GP2 |
 + \\
 +^ I2C Slave Address ^^^
 +| GP1 (SW1-1) | GP2 (SW1-2) | Address |
 +| off | off | 124 0x7C |
 +| on | off | 125 0x7D |
 +| off | on | 126 0x7E |
 +| on | on | 127 0x7F |
 +
 +
 + \\
 +^ I/O Banks ^^^^^
 +| GP28 Value | Config | Bank 1 | Bank 2 | SW1 |
 +|  < 200  | 0 | Input | Output | 1=0 2=0 3=0 4=0 |
 +|  > 4000  | 1 | Input | Input | 1=1 2=0 3=0 4=0 |
 +|  < 3000  | 2 | Output | Output | 1=0 2=1 3=0 4=0 |
 +|  < 2000  | 3 | Output | Input | 1=0 2=0 3=1 4=0 |
 +|  < 1500  | 5 | Multiplexing | Input | 1=0 2=0 3=1 4=1 |
 +|  < 1000  | 4 | Stepper | Input | 1=0 2=0 3=0 4=1 |
 +<code>
 +3V3  *------*--[10k]--*--[10k]--*--[10k]--*--[10k]---* GND
 +            |                                
 +SW1         /         /         /         /         
 +            1                                 
 +GP28 *------*---------*---------*---------*--[100k]--* GND
 +</code>
 +The GP28 value can be checked in the [[#arduino_ide_monitor|Monitor]].\\
 +
 +
 +
 +
 + \\
 +
 +^ I2C ^^
 +| SDA | GP4 (pin 6) |
 +| SCL | GP5 (pin 7) |
 +Max. I2C speed: 100kHz -> Default.\\
 +
 + \\
 +^ NeoPixel ^^
 +| Data | GP0 (pin 1) |
 +
 + \\
 +^ Servo ^^
 +| PWM | GP6 (pin 9) |
 +| PWM | GP7 (pin 10) |
 +| PWM | GP8 (pin 11) |
 +| PWM | GP9 (pin 12) |
 +Via parameters in the signal and value in the object switches can be the jumping back of barriers and shape signals simulated.\\
 +The setting is made using hex values. The entry is made as a decimal number.\\
 +
 +Example:\\
 +Number = 4\\
 +Step = 1\\
 +Hex 0x14 = Dezimal 20
 +
 + \\
 +^ Stepper ^^^
 +| IN1 | GP10 | GP14 |
 +| IN2 | GP11 | GP15 |
 +| IN3 | GP12 | GP16 |
 +| IN4 | GP13 | GP17 |
 +
 + \\
 +^ I/O ^^
 +| Bank 1 | GP10...GP17: needs 10k pullup. (8 I/Os because 23/24/25 n.a.) - Adress: 1-8|
 +| Bank 2 | GP18...GP27 and GP3: needs 10k pullup. (8 I/Os) - Adress:9-16|
 +
 +
 + \\
 +=====NeoPixel Addressing=====
 +| Node ID | WIOpi node ID |
 +| Address | Pixel number |
 +| Port | I2C slave: 124...127 |
 +
 +  * [[:rocnet:rocnetnode-led-en#signal_support|Signal Aspect Values]]
 +
 + \\
 +=====Charlieplexing Signal Support=====
 +A Rocrail signal with control aspects and port type multiplex, uses 4 pins starting with the port offset.\\
 +The refresh rate is about 250µs.\\
 +Aspect values are used from the details tab. 24bits are used, the upper 12bits are for blinking.\\
 +Example: LED 1 and 2 on and LED 2 blinking: 0x002003 -> Aspect value = 8195 \\
 +
 +//A second signal can be defined in Rocrail with address + 100 to combine it with the main signal.//\\
 +
 +  * __**[[arduino:wio-en#charlieplexing_signal_support|charlieplexing_signal_support]]**__
 +
 +
 +
 +====Test Signal====
 +Diagram:\\
 +{{:wio:multiplex-signal.jpeg?400}}\\
 + \\
 +Signal setup for WIOpi 98 and slave 126:\\
 +{{:wio:multiplex-signal-int-en.jpg?400}}{{:wio:multiplex-signal-details-en.jpg?400}}\\
 + \\
 +=====PINOUT=====
 +{{:wio:pico-pinout.jpeg?600}}\\
 +
 + \\
 +=====Arduino IDE Monitor=====
 +Type ?<enter> in the monitor to check the configuration of the Pico:
 +<code>
 +SIOpico (c)Rocrail Oct 20 2021 10:47:03
 +I2C:126 (pixel=0 servo=20003F70 IO=FF 00 servo=00 GP28=4083 CNF=0 IO1=input IO2=output)
 +</code>
 +
 + \\
 +=====Links=====
 +  * https://www.raspberrypi.com/products/raspberry-pi-pico/
 +
 + \\
 +=====SIOpico-01 PCB=====
 +====Patch====
 +The ADC GP28 needs a 100k pull down resistor which is not on the PCB.\\
 +The easiest way is to mount the resistor directly on the Pico board on pin 34 and 38:\\
 +{{:wio:wiopico-01-patch.jpg?400}}\\
 +In this way the ADC is also stable if the Pico is not mounted on the PCB; The configuration remains 0 as default.\\
 +
 +\\
 +=====Hardware=====
 +|  {{ :gca:wiopic01_sch.pdf |The schematics}}  |
 +|  {{ :gca:wiopico1_pcb.pdf |pcb and parts positions}}  |
 +|  {{ :gca:wiopico1_parts.pdf |Bill of materials}}  |
 +