Jump to content

Text version of Orange Pi Zero pinout


ityjob

Recommended Posts

Thought this might be useful:

 

FROM:
http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=2236

 01  3.3V                               02  5V
 03  TWI0-SDA          PA12             04  5V
 05  TWI0-SCK          PA11             06  GND
 07  PWM1              PA06             08  UART1_TX          PG06
 09  GND                                10  UART1_RX          PG07
 11  UART2_RX          PA01             12  SIM_CLK/PA_EINT7  PA07
 13  UART2_TX          PA00             14  GND
 15  UART2_CTS         PA03             16  TWI1-SDA          PA19
 17  3.3V                               18  TWI1-SCK          PA18
 19  SPI1_MOSI         PA15             20  GND
 21  SPI1_MISO         PA16             22  UART2_RTS         PA02
 23  SPI1_CLK          PA14             24  SPI1_CS           PA13
 25  GND                                26  SIM_DET/PA_EINT10 PA10

FROM OFFICIAL USER MANUAL:
https://drive.google.com/drive/folders/1lrtE6lbpXqxXTMmq7IxROOaZbOQ0U8uP

P01  VCC-3V3                           P02  VCC-5V
P03  TWI0-SDA          PA12            P04  VCC-5V
P05  TWI0-SCK          PA11            P06  GND
P07  PWM1              PA6             P08  UART2_TX          PA0
P09  GND                               P10  UART2_RX          PA1
P11  S-TWI-SCK         PL0             P12                    PD11
P13  S-TWI-SDA         PL1             P14  GND
P15  UART2_CTS         PA3             P16  TWI1-SDA          PA19
P17  VCC3V3-EXT                        P18  TWI1-SCK          PA18
P19  SPI1_MOSI         PA15            P20  GND
P21  SPI1_MISO         PA16            P22  UART2_RTS         PA2
P23  SPI1_CLK          PA14            P24  SPI1_CS           PA13
P25  GND                               P26                    PD14

 

So you can make ~/bin/pinout-orange-pi-zero, and ~/bin/pinout containing:

 

#!/bin/bash
cat ~/bin/pinout-orange-pi-zero

 

... or just "~/bin/pinout":

 

#!/bin/bash
echo "text
text
text"

 

...so you'll have a pinout command like a Raspberry Pi.

 

I have confirmed that pin 10 should be PG07, pin 12 should be PA07 and pin 26 should be PA10 for a DS18B20 temperature sensor with armbianEnv.txt like:

 

$ cat /boot/armbianEnv.txt
---
param_w1_pin=PA07

 

So it looks like the picture from Orange Pi forums is more accurate. Can anyone comment on the differences between the two pinouts eg pin 10, 12, 26, and others?

 

Thanks, and thanks for making Armbian, and firstpost.

 

Also warning, for other noobs (could have saved me several hours): "Armbian 23.5 Jammy" is broken! Click "Archived versions for reference and troubleshooting" on the download page and download "Armbian_23.02.2_Orangepizero_jammy_current_5.15.93.img.xz" instead

 

Orange-Pi-Zero-Pinout.png

Edited by ityjob
Link to comment
Share on other sites

Btw, I found out that if I go through a basic PWM setup it is the middle pin of the 3 pin header beside the main 26 pin header that outputs the PWM signal, eg make an LED blink every 0.5s:

 

su -c "echo 0 > /sys/class/pwm/pwmchip0/export"
su -c "echo 1000000000 > /sys/class/pwm/pwmchip0/pwm0/period"
su -c "echo 500000000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle"
su -c "echo normal > /sys/class/pwm/pwmchip0/pwm0/polarity"
su -c "echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable"

 

Also interesting: the LED keeps blinking after the OPi is powered down.

Can anyone suggest the procedure to use the PWM pin on pin 7 aka PA06, preferably with shell/bash?

Thanks

 

Edit: the pwm doesn't seem to handle a frequency of 10kHz, but seems to work at 1kHz, which is ok for the fan I'm controlling as the speed is controlled by a voltage between 2.5V and 12V, which my circuit generates out of the PWM signal. Does anyone know the exact frequency at which the PWM on the 3 pin header bugs out? Also, any idea why my DS80B20 works on PA11 but not PA12? Thanks.

Edited by ityjob
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines