I need help on how to connect 6 servos, SG90, to arduino uno.
I have so far, connect them up with pmw pins and the onboard 5v gnd pins but i got a lot of jitter and they didn’t function.
Then tried a BT router plug which has a barrel jack and is 12 volts, the recommended voltage. That had the same issue with the plus pin connected to the VIN to supply the external power.
This didn’t work either, i think i might have blown one servo doing this as it’s not working at all.
I’m using a Elegoo Arduino Uno R3 board.
In addition to this my project needs two ultrasonic sensors the SR04, and 4 ir sensors. I can reduce it to one ultrasonic sensor and 2 IR sensors.
The project is making a football theme game where the servos move the ball which the it sensors active to move them left and right. The ultrasonic sensors will be used to switch between servos, from different levels of hand height detection.
I think the board can’t simultaneously carry out two instructions at the same time so my game needs to be single player i guess. Which case i can get by with 1 us, two IRs and 6 servos.
Please do mention if there’s a better way to do this game, football theme.
prav234:
I have so far, connect them up with pmw pins and the onboard 5v gnd pins but i got a lot of jitter and they didn’t function.
No need to use PWM pins. Any Uno pin can control a servo, even the analogue pins.
Do not use pin 0, 1 and 13 though.
Servo power is your problem.
It must directly come from an external supply, capability of the stall current of all attached servos combined,
and power can't go through the Arduino.
An SG-90 is listed as 650mA@5volt stall.
Don't forget to share servo supply ground and Arduino ground.
Use detach() to disable servos. No need to switch power.
Leo..
When the servo starts, it will draw 600 ~ 1000 mA, how much voltage will be required to drive 600mA through a 58Ω resistor?
Hint: Volts = current in Amps times resistance in Ohms.
That's maybe when they are moving freely (no load).
For a brief moment, when they start moving, or when they keep position, they draw short peak currents of ~650mA. You can only see that with a scope, not measure with a DMM.
The supply must be able to provide those peak currents.
If not, you have the jitter you talk about.
A 12volt supply is a poor starting point for 5volt servos, and you can't reduce voltage with a resistor.
Better get a 5volt supply, with the right current capability.
Leo..