A20 micro and servo motors

Started by gurumelo, December 16, 2014, 01:10:46 PM

Previous topic - Next topic

gurumelo

Hello, excuse me for the question.
What do you think about connect servomotor directly to GPIO A20?
suggestions?

Thank you.

MBR

Unless the servomotor has some build-in electronics, which accepts 3.3V (not 5V!) TLL-compactible logic control signals, you cannot conect it directly. You will neeed some kind of driver, the exact type depens on the servomotor and its usage.

dave-at-axon

Another thing to consider is if you are doing this under an OS and trying to bit bang the GPIO. It will be very slow.

You ideally need to use the PWM pins and then write a driver to control them. Have a look at the PWM control for the backlight as this might give you an idea on how to do it.

BUT as MBR says, you may need to level shift the 3.3V to 5V for the servo motor to accept the input. You could try it first and see if it works as an output to an INPUT is OK but make sure that the INPUT on the servo is not PULLED UP to 5V as this will damage the GPIO output.

gurumelo

#3
Thank you. and then... How do people connect servos directly to raspberry pi?
and They use servoblaster https://github.com/richardghirst/PiBits/tree/master/ServoBlaster


MBR

The most 5V TTL circuits can accept 3.3V level without problems (the lower threshold for the Hi level is about 2V), the problem is that the SoC inputs cannot take the 5V. So you can connect the SoC outputs directly to 5V TTL inputs, but unless you ad some protection (e.g. Zener diodes), the first misconnection (e.g. connecting to input with active pull-up) may be fatal.

The minimal protective circuid should be someting like SoC output - resistor - 3.6V Zener diode connected to the ground - resistor - servo TTL input (the resistors should be at least hundreds of Ohms), maybe also some capacitors (their capacity depends on the required speed).


gurumelo

MBR. Do you have a plan, where can i see this connections? Thanks