Hi everyone.
I'm encountering a issue with my 2 servos and a 4ch relay shield board.
Boards and shield I'm using:
DFRobot Uno (Arduino Uno clone)
DFRobot 4 Channel Relay Shield
Adafruit Motorshield V2
I have an external 6VDC supplied to the motorshield.
Both servo motors pins are in use by 2 x 6VDC servos.
The relays are used to switch between the direction of motion for a DC linear actuator and all are connected to Common and Normally Opened.
A 3 pin 5V DC switch was connected purely to turn on the sequence. They are connected using the yellow,black & white wires.
Results when turned on:
When I'm using PWMServo.h to actuate the 2 servos separately, only one of it works as programmed and the other wouldn't work even move.
(After switching the servo connectors, it appears that the servo only works if connected to pin 9 )
However, instead of using PWMServo.h I used Servo.h, both of servos are able to actuate separately and works as programmed but I am getting alot of noise and interference at the relay. It continued to click non-stop and wasn't functioning properly.
RelayTestR3PWMServo.ino (5.23 KB)
RelayTestR3PWMServo.ino (5.23 KB)
