Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/myraspberry/pico_w_pid
Raspberry Pi PICO W board with PID control and webserver show/operation
https://github.com/myraspberry/pico_w_pid
circuitpython pico-w
Last synced: 3 days ago
JSON representation
Raspberry Pi PICO W board with PID control and webserver show/operation
- Host: GitHub
- URL: https://github.com/myraspberry/pico_w_pid
- Owner: MyRaspberry
- License: other
- Created: 2023-12-10T23:16:58.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-11T04:23:31.000Z (11 months ago)
- Last Synced: 2024-12-20T01:44:23.774Z (3 days ago)
- Topics: circuitpython, pico-w
- Language: C++
- Homepage: http://kll.byethost7.com/kllfusion01/infusions/articles/articles.php?article_id=227
- Size: 257 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PID-project
## PICO W Circuit Pythonnew ( 3.1.2024 )
## PICO W Arduino IDE 2.2.1
## ESP32-S3 Arduino IDE 2.3- webserver ( RTC from NTP )
- analog in
- digital out pwm
- PID
- MQTT to local broker
+ + MQTT with Secure Server and MQTT lib v2.5.2 to HIVEMQ with TLS## RPI4: MQTT broker & Node-Red & SQLite for Current and Hist Trend
- fix IP 192.168.1.4 on ethernet port / cable
- Mosquitto MQTT broker ( no TLS / password protected ) ( v2.0.11 )
- SQLite3 ( v3.40.1 )
- Node ( v20.10.0 )
- Node-Red ( v3.1.0 )add sideproject:
# PMS1W PoorManScope 1channel WiFi
## PICO W CP829
## ESP-32-S3 Arduino
## PICO W Arduino# project info
see [phone browser](http://kll.byethost7.com/kllfusion01/downloads/PICOW_android_beowser_page.jpg)
see [V102 from PC](http://kll.byethost7.com/kllfusion01/downloads/PICOW_PID_datapage.png)
see [V110 NR&wwww](http://kll.byethost7.com/kllfusion01/downloads/PICOW_PID_WWW_NR_DASHpng.png)
see [ESP32-S3 Arduino IDE](http://kll.byethost7.com/kllfusion01/downloads/ESP32_Arduino_PID_faceplate.png)see [PICOW CP829 PMS1W](http://kll.byethost7.com/kllfusion01/downloads/PICO_W_CP289_PMS1W.png)
see [ESP32-S3 PMS1W](http://kll.byethost7.com/kllfusion01/downloads/esp32-s3_PMS1W_RAW_In.png)- v1.0.1b PreRelease
- v1.0.2b Release
- v1.1.0 MQTT ( no TLS ) Release
- v1.1.1 update to CP900a6 work on PICO_W code
- v1.1.2 back to CP829 and use mem_free report for each import "DIAGM" in settings.toml
- v1.1.3 delete datetime lib use time lib only ( +26kB mem )
_______________________________board: PICO W
used system files:
```OS: Circuit Python
adafruit-circuitpython-raspberry_pi_pico_w-en_US-20231205-no-branch-156f417.uf2
adafruit-circuitpython-bundle-9.x-mpy-20231205.zip
flash_nuke.uf2
```### read back after nuke & flash:
see: boot_out.txt
```
Adafruit CircuitPython 9.0.0-alpha.5-34-g156f417f70 on 2023-12-05;
Raspberry Pi Pico W with rp2040
Board ID:raspberry_pi_pico_w
```
______________________________the in this project used Python PID code is from:
[m-lundberg/simple-pid](https://github.com/m-lundberg/simple-pid)
MIT lic._______________________________
## maker
by: kll engineering
lic: CC-BY-SA 4.0
date: 11.12.23
place: CNX
blog: [myBlog PICO_W PID artcle](http://kll.byethost7.com/kllfusion01/infusions/articles/articles.php?article_id=227)_______________________________
## HOW TO
- 1
get a PICO W board with WIFI 6$ and HEADERS ( if you not want to solder 7$ )
[PICO W board](https://www.raspberrypi.com/products/raspberry-pi-pico/?variant=raspberry-pi-pico-wh)- 2
connect it with a USB cable ( USB A to Micro-USB-B cable ) to a PC USB port
and see drive content INDEX.HTM, INFO_UF2.TXT ( with bootloader info )
later you will need to press the [BOOT-SEL] button while connecting to see that drive again- 3
open 2 file explorer windows and copy like drag / drop
-a- flash_nuke.uf2 ( required only if you change CPxxx version )
-b- adafruit-circuitpython-raspberry_pi_pico_w-< LANGUAGE >< DATE >< VERSION >.uf2 to it
after copy the drive will close and after 5sec drive show up again: 'CIRCUITPY'
pls find there boot_out.txt and check- 4
you could start now edit 'code.py' with MU-Editor, but here we
delete the empty code.py and settings.toml
and copy / drag our new files and /lib/- 5
open [MU-Editor](https://codewith.mu/) ( mode circuitpython )( should auto find that drive and open code.py )
activate the serial TAB aka REPL console ( use [CTRL][c] for stop / [CTRL][d] for reboot )
now develop code directly on the board
BUT: can not edit settings.toml on the board! ( reboot failure might happen )
that file only edit on the PC ( like with notepad )( like add your wifi login SSID PASSWORD )
and copy it to the board- 6
good project code backup / upload to your PC
keep zips for each version- 7
[System files download](https://circuitpython.org/board/raspberry_pi_pico_w/)
might want to check if there is a update on the core files,
download CPxxx.uf2 and adafruit-circuitpython-bundle_lib.zip
- 7a- backup all your code
- 7b- nuke the board
- 7c- flash the board with the new CPxxx.uf2
- 7d- copy back your code ( not the /lib/ )
- 7e- with the new lib.zip
copy / unzip from it new versions of the same libs used in that project
( here /adafruit_httpserver/ )
- 7f- expect to now find code errors old code .vs. new libs
and find new lib doc online to fix- 8
after first edit settings.toml for SSID & SSID password and wanted FIX IP
open any browser ( inside your LAN ) http://192.168.1.215 and test operation
( OUT & SP number or mouse input and [ENTER] as submit )
( see also MU-REPL for diagnostic prints "www ...." )- 9
after website operation checked and coding work finished ( incl backup )
you can disconnect the USB cable from PC and use a USB charger to power the board
( place anywhere inside your LANs WIFI area)- 10
hardware: PID needs a
*input for PV: connect a SENSOR on ADC0
but you could also use 'linked' sensor boards..
*output from OUT: here use a LED to see the 'dimmed' control output
later can connect like a SERVO ... for real process control_______________________________