User avatar
HermannSW
Posts: 1505
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Run Raspberry Pi Zero over 5V USB➫UART?

Mon Aug 08, 2016 10:08 pm

Hi,

I read in Kolban's book that TXD(GPIO14) and RXD(GPIO15) Raspberry Pi GPIO pins logic level outputs are TTL compatible meaning highs of +5V. Given that I read everywhere else that all GPIO pins are 3.3V this surprised me a bit.

I did connect my Raspberry Pi Zero over USB2UART connector, first with 3.3V selected on the connector. But with 3.3V the Pi Zero did not boot. Then I turned switch to 5V and Pi Zero booted and I could see the bootup messages and do login in minicom session with 115000 8N1 (right click to see photo in big):
Image

These are the connections:

Code: Select all

USB2UART  Pi Zero
RXD       TXD
TXD       RXD
VC        5V
GND       GND
While this all works fine and leaves the Pi Zero micro USB free for something else (eg. USB camera, waiting for 2$ 5M USB camera to be delivered) I just want to ask here whether this 5V connection to power and connect to Pi Zero is safe and correct?

Hermann.
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://gitlab.freedesktop.org/HermannSW/gst-template
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

asandford
Posts: 1997
Joined: Mon Dec 31, 2012 12:54 pm
Location: Waterlooville

Re: Run Raspberry Pi Zero over 5V USB➫UART?

Tue Aug 09, 2016 1:55 am

HermannSW wrote:Hi,

I read in Kolban's book that TXD(GPIO14) and RXD(GPIO15) Raspberry Pi GPIO pins logic level outputs are TTL compatible meaning highs of +5V. Given that I read everywhere else that all GPIO pins are 3.3V this surprised me a bit.
They are 3v3, not TTL.
HermannSW wrote:I did connect my Raspberry Pi Zero over USB2UART connector, first with 3.3V selected on the connector. But with 3.3V the Pi Zero did not boot. Then I turned switch to 5V and Pi Zero booted and I could see the bootup messages and do login in minicom session with 115000 8N1 (right click to see photo in big):
--snip--

These are the connections:

Code: Select all

USB2UART  Pi Zero
RXD       TXD
TXD       RXD
VC        5V
GND       GND
While this all works fine and leaves the Pi Zero micro USB free for something else (eg. USB camera, waiting for 2$ 5M USB camera to be delivered) I just want to ask here whether this 5V connection to power and connect to Pi Zero is safe and correct?

Hermann.
You are OK with the power, but none of the GPIO pins are tolerant of 5V (including serial). You will still see output from the Pi over serial, but whether you can still input to it depends on how lucky you are - you can connect to an Arduino (for example) running at 5V over i2c tho' (or USB)

aBUGSworstnightmare
Posts: 1492
Joined: Tue Jun 30, 2015 1:35 pm

Re: Run Raspberry Pi Zero over 5V USB➫UART?

Tue Aug 09, 2016 4:55 am

HermannSW wrote:Hi,

I read in Kolban's book that TXD(GPIO14) and RXD(GPIO15) Raspberry Pi GPIO pins logic level outputs are TTL compatible meaning highs of +5V. Given that I read everywhere else that all GPIO pins are 3.3V this surprised me a bit.

I did connect my Raspberry Pi Zero over USB2UART connector, first with 3.3V selected on the connector. But with 3.3V the Pi Zero did not boot. Then I turned switch to 5V and Pi Zero booted and I could see the bootup messages and do login in minicom session with 115000 8N1 (right click to see photo in big):

These are the connections:

Code: Select all

USB2UART  Pi Zero
RXD       TXD
TXD       RXD
VC        5V
GND       GND
While this all works fine and leaves the Pi Zero micro USB free for something else ... I just want to ask here whether this 5V connection to power and connect to Pi Zero is safe and correct?
As already mentioned the RPi GPIO are 3.3V ONLY --> they are not 5V tolerant.
Why not supply 5V to the RPi USB PWR IN connector, switch (?) your USBtoUART to 3.3V and connect RX/TX/GND from there only?

User avatar
HermannSW
Posts: 1505
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Run Raspberry Pi Zero over 5V USB➫UART?

Tue Aug 09, 2016 7:21 am

> You are OK with the power, but none of the GPIO pins are tolerant of 5V (including serial).
>
Thanks for confirming that, so Kolban's book statement wrt TXD/RXD 5V is just wrong.


> Why not supply 5V to the RPi USB PWR IN connector, switch (?) your USBtoUART to 3.3V and connect RX/TX/GND from there only?
>
I did that in this other thread, and it worked well with USB2UART 3.3V setting:
viewtopic.php?f=63&t=156539
Image

I did a 5V test run last night for more than 7 hours at 5V as shown initially on this thread, "top" command running with "s 0.1" refresh every 0.1s and 28% CPU utilization, no problems:
Image

But before that I noticed a reboot loop where Pi Zero did a reboot just after reaching i2c driver message without external trigger, so it seems that 5V as I did above is a bad idea, and USB2UART should run at 3.3V only:

Code: Select all

...
[    6.733961] dwc2 20980000.usb: bound driver g_ether                          
[    6.869034] fuse init (API version 7.23)                                     
[    6.905587] i2c /dev entries driver                                          
Uncompressing Linux... done, booting the kernel.                                
                                                                                
Welcome to the rescue system                                                    
recovery login: Uncompressing Linux... done, booting the kernel.                
[    0.000000] Booting Linux on physical CPU 0x0                                
[    0.000000] Initializing cgroup subsys cpuset                                
...
Hermann.
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://gitlab.freedesktop.org/HermannSW/gst-template
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

User avatar
HermannSW
Posts: 1505
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Run Raspberry Pi Zero over 5V USB➫UART?

Tue Aug 09, 2016 9:52 am

Found a smaller (better) solution with my USB2UART module:
  • set USB2UART switch to 3.3V
  • get 5V from USB connector via soldered cable
So USB2UART runs safe 3.3V on RXD/TXD, and Pi Zero gets 5V powered by soldered cable.
(right click for big photo for details)
Image

Hermann.
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://gitlab.freedesktop.org/HermannSW/gst-template
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

aBUGSworstnightmare
Posts: 1492
Joined: Tue Jun 30, 2015 1:35 pm

Re: Run Raspberry Pi Zero over 5V USB➫UART?

Tue Aug 09, 2016 10:01 am

HermannSW wrote:Found a smaller (better) solution with my USB2UART module:set USB2UART switch to 3.3Vget 5V from USB connector via soldered cableSo USB2UART runs safe 3.3V on RXD/TXD, and Pi Zero gets 5V powered by soldered cable.
Glad you 'found' my proposal :lol:

User avatar
HermannSW
Posts: 1505
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Run Raspberry Pi Zero over 5V USB➫UART?

Wed Aug 10, 2016 8:21 am

Thanks aBUGSworstnightmare, for your proposal.
What I meant with "found" was to use cable soldered to 5V from USB2UART USB connector instead of powering via RPi USB PWR IN connector as you proposed.

I used the same 3.3V USB2UART with 5V soldered cable to power and run 8$ NanoPi Neo quad core A7 I received yesterday (after I worked a lot via ethernet with it before):
http://www.friendlyarm.com/Forum/viewto ... f=47&t=241

Hermann.

Image
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://gitlab.freedesktop.org/HermannSW/gst-template
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

Return to “General discussion”