In this video lesson we will connect the Adafruit Ultimate GPS to the Raspberry Pi Pico W, and will write a simple program to capture the data being sent by the GPS. In this lesson, we simply want to read and print the NMEA sentences coming off the GPS, and then in future lessons we will begin to parse the data, and turn the data into usable numbers. This is the schematic for connecting the GPS to your Raspberry Pi Pico W.
This schematic shows how to connect the Adafruit Ultimate GPS to the Raspberry Pi Pico W
Then this is the simple code we developed to allow reading the data coming from the GPS.
In this video lesson we discuss powering your Raspberry Pi Pico W projects from a battery, allowing portable operation of the project. Most all of our earlier lessons can be powered by battery, allowing the project to operate without being connected to the USB cable. In this lesson I discuss the important issues that must be considered when powering your project from battery, and particularly issues associated with powering your project from battery, but then needing to download the code. I want to explicitly explain how to do this in this lesson, so in future lessons when you see me with the battery connected to the project, you will know what I am doing.
To get started, I will demonstrate with this simple circuit, so go ahead and build this circuit:
Simple circuit to demonstrate a LED toggle
Then, we will be using this simple code:
Python
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
frommachine importPin
importtime
redPin=16
bluePin=17
buttonPin=19
# Initialize LED on GP16
redLED=Pin(redPin,Pin.OUT)
blueLED=Pin(bluePin,Pin.OUT)
# Initialize button on GP19 with internal pull-up resistor
button=Pin(buttonPin,Pin.IN,Pin.PULL_UP)
# Variable to track LED state
buttonState=1# False = off, True = on
buttonStateOld=1
blueLED.on()
whileTrue:
# Read current button state
buttonState=button.value()
# Check for button press (LOW due to pull-up, button connects to ground)
ifbuttonStateOld==1andbuttonState==0:
# Button was pressed (falling edge)
redLED.toggle()
time.sleep(.2)#debounce the switch
# Update last button state
buttonStateOld=buttonState
In the video, we will explain the ins and outs of now powering a project like the one above using a battery supply. Note for now though, that the wire from pin 36 to the bottom power rail establishes that rail as a 3.3 volt rail, defined by the Pi Pico.
Now, if we want to power the project remotely, that is, remove the USB cable and power from the battery, we will need to supply a suitable voltage both to the nonblinking LED (The Blue One) and the Pi Pico itself.
You can power the Pi Pico by applying a voltage to the VSYS pin, which is physical pin 39. The voltage should be between 1.8 and 5.5 volts. So, we can power the LED and the Pi Pico by connecting a suitable power supply. For our examples, I use the Sunfounder Breadvolt (AVAILABLE HERE).
However, when we connect the breadvolt to the breadboard, and we we intend to power the project by the Breadvolt, we need to adjust the wiring where instead of pin 36, we should connect pin 39 to the power rail. This is because in using the breadvolt as the power supply, it will define the voltage of the power rail, not the Pi Pico. The Pi Pico will be a USER of the rail, not the one who supplies voltage to it. So, to power the Pico, we need to connect pin 39 to the power rail instead of 36. So, in using the Breadvolt to power the project, we should use this circuit:
Notice that we now are connecting pin 39 to the Pi Pico
Now with this schematic, we can disconnect the USB, turn the breadvolt on, and power the project (Pi Pico and the Blue LED) from the breadvolt.
Now the question arises, how would we now download code to the project? The bottom line is, it is never a good idea to have two different voltages supplies connected to the rail, or for that matter connected together. So, the simple solution is, turn the breadvolt OFF, before reconnecting the USB cable. Then download the code. Then disconnect the USB cable, and then turn the breadvolt back on.
What you will see, when the breadvolt is turned off, and the USB cable is reconnected to the project, VSYS will act as an output pin, powering the blue LED. Vsys pin is connected to the USB supply by a diode. There is a small voltage drop across the diode, so the voltage at the VSYS will be around 4.8 volts.
Please watch the video as we will be giving more specific examples of how to make this work.
Guys in this class we will be building the Ultimate GPS Tracker. This will build on all you learned in our most excellent Raspberry Pi Pico W class, and now we will begin working on a real project. Hopefully most of the gear you will already have from the various kits you already have, but I give amazon links to the gear we will be using in the project. You Will Need:
In this video lesson we explore a project where control access to a servo is activated by an RDID tag. In order to position the servo with the pushbuttons, the system must be unlocked by a RDID tag. When the system is locked, the LED is red, when the system is unlocked, the LED is green. When using the breadvolt, or any battery power supply on a breadboard project, do not turn the power supply on while the Raspberry Pi Pico is connected to USB, as you could generate voltage conflicts. It is an either or. If the USB is connected, the power supply should be OFF. Or if you are going to connect the USB, first turn off the power supply.
This schematic allows servo control to be granted via RFID tag
For your convenience, this is the code we developed below.
In this video lesson we explore using an RFID-RC522 and an RFID tag to lock and unlock our raspberry pi project. This demonstration will include an RGB LED which remains red while the system is locked, and then turns green when the system is unlocked by the RFID tag. Absence of user input, the system will lock again after 5 seconds. The following is the circuit diagram for the project:
Schematic for Raspberry Pi Pico W and RFID module, with LED and Push Buttons
When using the breadvolt, or any battery power supply on a breadboard project, do not turn the power supply on while the Raspberry Pi Pico is connected to USB, as you could generate voltage conflicts. It is an either or. If the USB is connected, the power supply should be OFF. Or if you are going to connect the USB, first turn off the power supply.
For your convenience, the code for the project is included below:
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok