-1

Background

I'm trying to control some motors by raspberry pi zero w.

I did, but the PWM produced by Software was unstable. So I decided to use arduino uno with zero.

(Zero is required because I should install some software in it)

It worked by serial communication, But the size of arduino uno is big to me. So I want to use arduino nano instead of uno.

Problem

raspberry pi zero w model has no usb port. How to make zero (serial) communicate with nano?

RPF
  • 117
  • 2
  • 9

1 Answers1

1

Question

Rpi Zero W has no usb port. How to make serial communication?

Answer

But you can use the UART TxD (GPIO 14) and RxD (GPIO 15) pins on the 40 GPIO connector to do serial communication.

By the way, I also use Rpi PWM to control [servo] motor. I found its PWM signal rather stable. You might find more details in references below.

References

Raspberry Pi 3 and Zero W Serial Port Usage - 2019jan23

The Raspberry Pi 3 Model B, B+ and Raspberry Pi Zero W contain two UART controllers which can be used for serial communication, the mini UART and PL011 UART. By default, the mini UART is mapped to the TXD (GPIO 14) and RXD (GPIO 15) on the 40 pin GPIO header and the PL011 UART is used for the Bluetooth/Wireless module but either module can be mapped to the GPIO port.

rpi uart

Rpi PWM to control servo motor

rpi pwm waveform

tlfong01
  • 4,665
  • 3
  • 10
  • 24
  • 1
    You are welcome. BTW, I also use Rpi PWM to control serveo motor. I found it PWM signal is rather stable - Rpi PWM to control servo motor https://raspberrypi.stackexchange.com/questions/98467/runtime-error-a-pwm-object-already-exists-for-this-gpio-channel – tlfong01 Jun 04 '19 at 08:08
  • 1
    I'm pretty confused by this answer. I'm not an expert but I'm using a USB hub to do serial communication between a PI Zero and two Teensy micro controllers. Is this not the same thing? – Bill May 05 '20 at 05:19
  • Ah yes, I am sorry to have confused you. Yes, if you use an USB hub for RpiZero, of course you can have any many USB ports as you like. The Op says he have not USB port, so I suggest two things: (1) Use USB hub to get USB ports, (2) Use RpiZero's on board UART (TxD, RxD pins). Please let me know if I still have not clarified. Cheers. – tlfong01 May 05 '20 at 05:25