I'm new in Arduino programming and hardware. I'm doing a project which needs to connect 3 servo motors (MGR996R) . Long story short, I am building a conveyor belt system that will sort boxes by colour. At the end of the conveyor Im using a gripper (uses 2 MGR996R servos, 1 to open/close gripper and 1 to rotate) that will place the box in different bin. The 3rd MGR996R servo will be used to activate and push the box into a 'waste' bin if its a certain colour. I have TCS230 TCS3200 Colour Recognition Detectors and Infrared Obstacle Avoidance Sensors to use as well.
My question is how do I code the servos to operate in this way? I ordered a PWM PCA9685 servo driver and tried using the Adafruit_PWMServoDriver to control the servos but I am finding it very confusing and cant get the servos to move. Should i just connect the servos directly to the Arduino and code that way? If so, would the code be simple enough.
I am using a Mega 2560 board so should have enough pins.
I would much appreciated if anyone in the forums could help me on this. Thanks
Thanks your reply. Im away from my computer now but can try copy in my proposed circuit and wiring tomorrow. The power supply im using is the Hootracker 6V 2400mAh Ni-MH AA Rechargeable Battery Pack. I have tried a simple code to move one of the motors and it seems to drive it fine.
I will be using a seperate power supply to drive the conveyor belt. I have a good understanding of how to wire everything up, its just the code to run all 3 servos im having trouble with.