Power for the Raspberry Pi Pico - Guide to using VBUS, VSYS and 3V3 for external power circuits

แชร์
ฝัง

ความคิดเห็น • 69

  • @aidan8204
    @aidan8204 11 หลายเดือนก่อน +1

    I don't think I've subscribed to a youtube channel in several years until today

  • @tubegor
    @tubegor ปีที่แล้ว +3

    This wonderful YT channel made me want to tinker with RPI pico. Super content, very clearly shown, without disturbing music, very competent help in the comments section.
    An attempt to donate the money via PayPal was not possible and on YT without a credit card it doesn't work at all. A PayPal friends link would be helpful.

    • @PenguinTutor
      @PenguinTutor  ปีที่แล้ว +2

      Thanks for your kind comments.
      I may look into other options in the future. For the moment I'm happy with subscribes and likes as they help me to grow the channel.

  • @ewanyork
    @ewanyork 8 หลายเดือนก่อน +1

    Fantastic - so comprehensive! I'm going to be coming back and referring to this many times.

  • @martinparker9044
    @martinparker9044 ปีที่แล้ว +6

    Very good explanation of powering your pico 👍

  • @Carhill
    @Carhill ปีที่แล้ว +1

    As written on the tin and no fluff!
    Precisely what I was looking for! Thank you!

  • @robosklegs
    @robosklegs ปีที่แล้ว +2

    Great video - very well explained - exactly what I was looking for. One minor gripe is that the audio is not very clear. but regardless - thanks for making the video.

  • @rp9406
    @rp9406 ปีที่แล้ว +1

    Thank you for that wonderfull lesson about powering the Pico.

  • @charlotteswift
    @charlotteswift 11 หลายเดือนก่อน

    I came across this most excellent video by happen chance and I'm sure it will come in very useful, thank you. I've subscribed!!

  • @frontier164
    @frontier164 ปีที่แล้ว

    That's just what I've been looking for!

  • @PATRIK67KALLBACK
    @PATRIK67KALLBACK ปีที่แล้ว +1

    Thank you! Super helpful information.

  • @yoda_soda
    @yoda_soda ปีที่แล้ว +4

    Very helpful thank you

  • @alevans51
    @alevans51 หลายเดือนก่อน

    Very helpful. Thanks!

  • @domotcl
    @domotcl 8 หลายเดือนก่อน

    Thanks for the very useful video. One question, though: You casually mention to use a Schottky diode. This is for the power supply, so a DC voltage. Then neither the higher switching speed nor the lower forward voltage drop of a Schottky diode seems to be important when using a 5V or even 3.3V external power supply. Wouldn't a regular 1N4148 or 1N4001 also be usable in such a situation?

    • @PenguinTutor
      @PenguinTutor  8 หลายเดือนก่อน

      I normally use a Schottky rectifier diode because of the low voltage drop. This means less power loss. Particularly when using a battery.
      It's not going to be much in the grand scheme of things, but even a little can help.
      Another potential benefit could be that if the voltage from the power source is greater than USB then that will be dominant, although if that is important a MOSFET would be a better option.
      A regular rectifier diode would work fine instead.

  • @elusive62
    @elusive62 2 หลายเดือนก่อน

    Great vid mate, If possible, could you give some advice, I am looking to use the pico w in my car, What id like to do is power it from a 12V battery, That is the issue i have, i dont know how.
    The reason i want to use the pico W in my car is mainly as a way to.., press a button, power on, side lights of the car turn on for 30 seconds, power off.
    I have done the coding for the powr on, delay, power off, but i dont know how to power a 5V pico from a 12V battery, I wont be using the car battery, infact I will be using a 2nd battery I will be placing in the boot, i havent chosen yet if it will be a leisure battery or a car battery. I have other plans to make that battery multi purpose, such as connecting a convertor to power my airsoft batteries and a mini cooler.
    My end goal for the pico W is to bring a feature to my car that other cars have, such as pressing the key fob to unlock the car and the main lights turn on, i think its like a courtesy lights, sadly my interior light doesnt turn on with the unlock, it only turns on when opening the door, so other ways around my issue is impossible, but that is my intention, courtesy lights.
    other future ideas are of course, RGB within the car which, once i have a solution for the powering, ill be using my Pico WH for it.
    I have put a post on reddit but the moderators keep removing my post, i have tried posting on respberrypi and raspberry pi projects. not sure why but mods on both pages remove my posts about this.

    • @PenguinTutor
      @PenguinTutor  2 หลายเดือนก่อน +1

      @@elusive62 You could use either a cigarette lighter style usb charger, or a 12V to 5V buck converter.

    • @PenguinTutor
      @PenguinTutor  2 หลายเดือนก่อน +1

      @@elusive62 Although possible without, I would recommend keeping the two power supplies completely isolated from each other. Eg using relays or opto isolators.

    • @PenguinTutor
      @PenguinTutor  2 หลายเดือนก่อน +1

      I mean the two 12v supplies, the car and your electronics supply.
      You will also need to make sure all your signals to the Pico are only 3.3V and you increase the signal to be enough to drive whatever outputs you are using (eg relays). Or it may be possible to drive opto-isolators / optocouplers directly depending upon voltage and current requirements.

    • @elusive62
      @elusive62 2 หลายเดือนก่อน

      @@PenguinTutor the only part the wiring would come together would be at the sidelights, I did consider using the VCC as a signal for the pico to begin the timed "sidelights on" for 30 seconds, but i think it would be much more simpler to put a button i would press to begin the timer.

    • @elusive62
      @elusive62 2 หลายเดือนก่อน

      @@PenguinTutor Thanks for response.

  • @Hd12325
    @Hd12325 ปีที่แล้ว

    Really fantastic post, thanks very much!

  • @zyghom
    @zyghom ปีที่แล้ว +1

    21:27 - irrespective of the voltage on the gate, internal diode of the mosfet is in wrong direction so mosfet will always allow voltage to pass ;-)
    I think the mosfet should be opposite direction here

    • @PenguinTutor
      @PenguinTutor  ปีที่แล้ว +1

      The diode of the MOSFET is the internal body diode, which is a characteristic of the MOSFET.
      It could allow current to flow if the voltage of VSYS is lower than the alternative supply voltage minus the required voltage for the body diode to conduct.
      If the MOSFET was connected in the opposite direction then it could allow backfeeding from USB (via VSYS) to the secondary power supply which is was the circuit is designed to prevent.

    • @zyghom
      @zyghom ปีที่แล้ว

      @@PenguinTutor that is correct of course, but to stop the backfeeding one more diode would help as well ;)

  • @mungewell
    @mungewell 8 หลายเดือนก่อน

    Nice Video. I'm currently investigating using a Pico from the 'bias voltage' from a camera audio input - this is use to power mics at 1.5-5v (but normally 3.3v)... Looks like it might work :-)

  • @bkaufMC
    @bkaufMC 9 หลายเดือนก่อน

    very helpful video, thank you

  • @crischi9419
    @crischi9419 ปีที่แล้ว

    First thing: Which MOSFET should I use? Can you name one you would recommend the most?
    Second thing: I often see the diode in the opposite direction on the internet. Can you explain the thing with the diode a little bit more?
    In general: which components do I need to buy to best power my Pico (with and without W) with either 3.3 V or 5.0 V?

    • @PenguinTutor
      @PenguinTutor  ปีที่แล้ว +1

      Do you mean the MOSFET used at 14:21 - used for switching a high power LED? If so then it depends upon the current requirement, a 2N7000 is good for up to 200mA, but for more than that you may need to look at one in a TO-220 package such as an IRLB8721.
      What do you mean by a diode in the opposite direction? Do you mean across the MOSFET (that may be showing the internal parasitic diode), or across the load which could be a flyback diode to protect against back EMF from inductive loads.
      To power a Pico I normally use a 1N5817 from a 5V supply to VSYS (pin 39) as shown in the VSYS diagram here: www.penguintutor.com/electronics/pico-power

    • @crischi9419
      @crischi9419 ปีที่แล้ว

      Thanks for your fast reply!
      All my questions refer to the improved powering of the Pico itself you are showing in the picture in 21:20.
      I want to use a power supply made for breadboards, which can output either 3.3 V or 5.0 V. And I want to be able to connect the Pico to the PC at the time. From your video I understood, that I need to put a MOSFET and and diode infront of the pins of the Pico. But I don't know which ones exactly.

    • @PenguinTutor
      @PenguinTutor  ปีที่แล้ว +1

      You can use the simpler diode based version which just takes whichever is the highest voltage. The diode projects against back feeding to either power supply.
      The MOSFET version has a lower voltage drop and disconnects the external supply when connected to USB if that is what you want.
      The datasheet suggests a MOSFET but I expect that is SMD. The main characteristic to look for is the maximum current, any P-channel MOSFET that can handle the required current should work.

  • @cheblack677
    @cheblack677 ปีที่แล้ว +1

    I need an interruption to save some data if the power drops.

  • @SoundToxin
    @SoundToxin 9 หลายเดือนก่อน

    I'm using a Pico W in a project where I want it to be able to work (communicate) wirelessly or wired, is it safe to have some batteries (3 AAs) connected to VSYS and then also plug in to the USB port? Or in other words if I want to go from wireless to wired, do I need to take out the batteries or switch them off somehow before I plug in to USB?

    • @PenguinTutor
      @PenguinTutor  9 หลายเดือนก่อน +1

      Yes, just use a diode to prevent the USB power trying to charge the batteries. This is the circuit at 15.53 replacing the external power supply with your batteries.

    • @SoundToxin
      @SoundToxin 9 หลายเดือนก่อน

      @@PenguinTutor Thank you!

  • @davidmiddleton2927
    @davidmiddleton2927 8 หลายเดือนก่อน +1

    just what I wanted

  • @jakoblindgren9564
    @jakoblindgren9564 ปีที่แล้ว

    I wounder if it would be possible to power the pico directly of the 3.3v pin assuming the onboard solution is turn off and the power source is a known good supply?

    • @PenguinTutor
      @PenguinTutor  ปีที่แล้ว

      I can't see any reason why it wouldn't work, but considering you can just connect 3.3V to VSYS I don't see much benefit to doing so.
      There doesn't appear to be anything that uses the VSYS supply, except as an output on the connector and as a voltage reference for ADC3 (so you can read the input voltage). I don't know how the RT6150B-33GQW will respond to having power at the output, but not at the input, but it would probably be okay especially as the enable pin won't be pulled-up.
      The only advantage I see to bypassing the onboard buck-boost convertor is a slight improvement in efficiency due to the loses there, but those will be fairly small.

  • @hmillot8717
    @hmillot8717 9 หลายเดือนก่อน

    very useful, thank you

  • @wojciechszmyt3360
    @wojciechszmyt3360 ปีที่แล้ว

    Do I need a Schottky diode if voltage supplied to VSYS is below 5V (such as LiPo battery)? Will the 5V from USB be supplied to the battery then?

    • @PenguinTutor
      @PenguinTutor  ปีที่แล้ว

      Yes I do still recommend that you use a Schottky diode.
      If a voltage source is higher then the battery then it will try and charge the battery. This can be detrimental to the battery and in some circumstances dangerous.
      For a LiPo battery then you should be using a dedicated charging circuit. These are typically restricted current chargers designed to prevent the battery from overheating.

  • @santosalex213
    @santosalex213 ปีที่แล้ว

    What if i want to use both the usb cable for data transfer and an external power source ?

    • @PenguinTutor
      @PenguinTutor  ปีที่แล้ว

      If you want to use the USB power supply to power your own circuits then you can use the output from pin 40, the VBUS pin. This is shown at 6:11 in the video.

    • @santosalex213
      @santosalex213 ปีที่แล้ว

      @@PenguinTutor I want to power the pico through an external source. I want to use the usb cable to transfer data from and to the pico and my lap top. How do i make sure that the pico draws power only from the external source and not from the usb ?

    • @PenguinTutor
      @PenguinTutor  ปีที่แล้ว

      ​@@santosalex213To guarantee that you'd need to create a custom USB cable without a +5v connection.
      If you use a Schottky diode to VSYS then as long as the external power supply is a higher voltage then that would be used in preference to USB.

  • @abhinavgolwalkar
    @abhinavgolwalkar ปีที่แล้ว

    Hi I did the same setup at 18:19 timeline in video. except the IN5817 i have used IN5819.. BUT the magic smoke appears when i plug the battery and usb both ...I fried my pico...a buck boost converter was attached with the lipo pack 5v. what is wrong here?

    • @abhinavgolwalkar
      @abhinavgolwalkar ปีที่แล้ว

      i checked with the microscope and found the onboard battery management chip got burned

    • @PenguinTutor
      @PenguinTutor  ปีที่แล้ว

      Was your buck boost providing the correct voltage? The absolute maximum Vin for the Pico's buck-boost is 6V. I have tried some buck-boost regulators in the past and they have provided a much higher voltage especially with a low load. It's best to test with a meter before connecting it to the supply.
      Other than that I can't see a reason for why it would do that. That is essentially the same circuit as provided in the Pico datasheet (page 19).

    • @abhinavgolwalkar
      @abhinavgolwalkar ปีที่แล้ว

      @@PenguinTutor Yes, XL6009 buck boost converter that I used in my setup. The output voltage set was 5.3V (tested via a multimeter yellow color model number DT830D). Another thing that I used IN5819 diode as a substitute on IN5817.

    • @abhinavgolwalkar
      @abhinavgolwalkar ปีที่แล้ว

      A question. Can I simply remove the buck converter from my circuit and use LiPo battery (with TP4056 1A charging module), keeping diode as in your circuit?

    • @PenguinTutor
      @PenguinTutor  ปีที่แล้ว

      @@abhinavgolwalkar IN5819 should work fine as a substitute for IN5817 (higher voltage tolerance and slightly higher voltage drop).
      Generally the boards with a TP4056 are designed so that you use that to charge your battery, then physically disconnect it from the charger and connect the battery to your circuit.
      If you are looking to use as a UPS then you probably need a dedicated chip, perhaps the LTC4040 (I'm not familiar with that particular chip, just found on a quick Google, so you will need to check suitability).
      If you are just powering the Pico then you should be able to connect LiPo through a diode to the VSYS pin, as you can run from as low as 1.8V. Note that this will mean that you don't have any additional protection from your LiPo (some LiPo batteries have built in short circuit protection which I would recommend). Again page 19 of the datasheet covers this: datasheets.raspberrypi.com/pico/pico-datasheet.pdf
      " For example a single Lithium-Ion cell* (cell voltage ~3.0V to 4.2V) will work well"

  • @happymatekenya394
    @happymatekenya394 ปีที่แล้ว

    I want to power up a 5V logic sensor which pin should I use if I power up the pico using VSYS?

    • @PenguinTutor
      @PenguinTutor  ปีที่แล้ว

      What power supply are you using to VSYS?
      If it's 5V then you can use that. If not then you will need to use a separate 5V supply as the Pico does not provide any step-up voltage outputs.
      If using a 5V sensor then make sure the data signal is compatible with 3.3V on the GPIO pins.

    • @happymatekenya394
      @happymatekenya394 ปีที่แล้ว

      @@PenguinTutor want to use a battery. Let me ask in this way, with the diode in between VSYS and VBUS will it be possible to power up the pico using a battery through pin VSYS but powering up external circuitry using VBUS, as in the case when using a USB power supply?

    • @PenguinTutor
      @PenguinTutor  ปีที่แล้ว

      @@happymatekenya394 No. It's one way. You can power through USB / VBUS and then use VSYS to power other components, but if you can't use VBUS as an output unless you provide power through the USB port.

    • @PenguinTutor
      @PenguinTutor  ปีที่แล้ว

      Do you have a 5V battery? In which case you could use that for VBUS or VSYS and also use that to power your 5V logic.
      If not then you will need external circuitry to increase the voltage to 5V - perhaps a buck-boost converter.

    • @happymatekenya394
      @happymatekenya394 ปีที่แล้ว

      @@PenguinTutor I have a 9V battery

  • @jamestcg3511
    @jamestcg3511 ปีที่แล้ว

    Well done

  • @oktaymercan
    @oktaymercan ปีที่แล้ว

    Curent 1 to 150-160mA (lowest to max peak)

  • @Andrew-Wardle
    @Andrew-Wardle 11 หลายเดือนก่อน

    Thanks

  • @sherakhela4044
    @sherakhela4044 ปีที่แล้ว

    Awesome
    Thanks

  • @JuandelaCruz-zl1le
    @JuandelaCruz-zl1le ปีที่แล้ว +3

    FULL BRIDGE RECTIFIER!!!

  • @DanielA-hs3pi
    @DanielA-hs3pi 9 หลายเดือนก่อน

    8:35

  • @rikshawala7289
    @rikshawala7289 ปีที่แล้ว +1

    Your voice is not clear. Can't understand.

    • @joshy_j_
      @joshy_j_ ปีที่แล้ว +1

      Do you have any specific questions that we can help with?

  • @fullpower8382
    @fullpower8382 ปีที่แล้ว

    Thx for making that Video!