Remotely Control a DC Motor Over WiFi With Raspberry Pi Pico W

In this video lesson I will show you how you can control a remote DC motor using your Raspberry Pi Pico W. The Pi Pico is set up as a server, and is connected to a DC motor, and TA6586 Motor Controller. The motor is controlled by a client Python program running on your desktop PC. On the client side we create a Graphical Widget, which will allow you to control both the speed and direction of the motor. the schematic for the Raspberry Pi Pico W side is shown below:

Motor Controller
Schematic for TA6586 and Raspberry Pi Pico DC Motor Control

Then in the video, we developed the following software for the server side on the Pi Pico

Then for the client side, the following program runs on Python on your PC:

 

 

Control DC Motor With Raspberry Pi Pico W and TA6586

In this video lesson we show you how you can control a small DC motor using the Raspberry Pi Pico W and a TA6586 DC Motor Controller. We show you how to control both the speed and direction. The schematic for the circuit we use is here:

Motor Controller
Schematic for TA6586 and Raspberry Pi Pico DC Motor Control

In the lesson, we developed the following code for your convenience:

 

Improved PyQt Color Wheel Project

In this video lesson we improve last weeks project by making the PyQt widget more virtual. The PyQt widget generates 3 sine waves, one for the Red color channel, one for the Green color channel, and one for the Blue color channel. The three sine waves are displayed on the widget. You are then given the opportunity in the widget to scale any of the three color channels. This allows you to calibrate your RGB LED in case any color channel is dominating. The widget also features a “Chase” mode where you can introduce phase injection into any of the color channels. This causes one or more of the color channels to “chase” the other ones. In this version, we preserve the phase as we turn the chase mode on or off. We also add buttons at the bottom of the widget to show the composite color being generated, as well as the individual R, G, and B color channels. This is the circuit schematic we are using on the Pi Pico side.

RGB LED
Circuit Schematic for Connecting the RGB LED

This is the code we developed to run on the Pi Pico side. It is the server side.

You need to create this file, and save it as “secrets.py” in the lib folder of your raspberry pi Pico.

And finally, this is the client side program which will run on your PC.

 

PyQt Generates a HSV Color Wheel on Raspberry Pi Pico Over Wifi Project

 In this video lesson we create an interesting project. We create a PyQt Window which  used 3 Sine Waves offset from each other by (2*Pi/). By offsetting the Sine Waves each by this amount creates 3 waves perfectly spaced across the domain. We then use the values from these sine waves to create the Red, Green and Blue values for the HSV color wheel. The x axis represents angle, in radians. Then the values of the sine wave represent the corresponding Red, Green, and Blue values. The program graphs the three waves on the PyQt widget, then passes the data via UDP over WiFi to the Pi Pico. The Pico then applies the values to the RGB LED.  We save the server side program on the Pi Pico as main.py, and power the project with the Breadboard Power Bank, meaning the Pi operates remote and untethered, and the LED is controlled by the desktop client software. This is a schematic of the Pi Pico circuit for the project.

RGB LED
Circuit Schematic for Connecting the RGB LED

This project has a server running on the Raspberry Pi Pico, and a Client running on your desktop PC. Here is the code for the server side for the Pi Pico.

Remember you must set up your ‘secrets.py’ file for your WiFi name and password. Create this file, put in your WiFi name and password, and then save the file on your Raspberry Pi Pico in the lib folder.

Then the code below is the program we developed for the client side. This will run on your PC.

 

Portable Arduino Weather Station Project

In this video lesson we show how to build a portable Arduino Weather Station. The station is powered by a battery bank, and data is displayed on the SSD1306 OLED display. The station included the BMP180 pressure sensor for barometric pressure, the DHT 11 for temperature and humidity, and a push button to toggle between modes. The schematic of the circuit is shown below.

Arduino Weather Station
Schematic of Arduino Weather Station

The code developed in the video is included for your convenience below:

 

Making The World a Better Place One High Tech Project at a Time. Enjoy!