Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Arduino and DC Solid State Relay 'Flicker'

Tags:
  1. Mar 26, 2015 #1
    Hi, thank you for your help in advance.

    I have a circuit configured as shown in this image. I got this arrangement from an earlier thread.

    An arduino controls a DC solid state relay, and it works fine when my load is a simple LED. The arduino is controlling through a digital output header and using the digitalWrite() function, so I don't think PWM has anything to do with it. The arduino is powered by an external source: not USB.

    Making that load a motor as shown in the image causes problems though. I have an LED in series so that I can see when the relay is closed and power is being delivered. It flickers at about 4-5 Hz I would say.

    My relay is the CN024.

    The relay is capable of delivering up to 3.5 A at 24 VDC. It is powered by a 7 VDC switched adaptor source right now. The power source can deliver up to 2 A. It is zero-crossing.

    The motor it is powering is a simple servo motor. It is rated for up to 6V and typically draws 140 mA.

    Despite this, is the flickering caused by a high current inrush and the circuit is being broken by a protective circuit in the servo? Though my knowledge is limited, it seems like all the requirements have been met: the SSR circuit is being closed, and there can be enough voltage supplied and current delivered. I tried putting a diode in series in order to drop the voltage from 7 V to (7-0.6)=6.4 V just to make sure the voltage wasn't too much.

    Any ideas?


    Code included below, if it's important:
    //Servo Potentiometer Control

    #include <Servo.h>

    const int SERVO=10; //Servo on Pin 3
    const int POT=A0; //POT on Analog Pin 0
    const int RELAY=3;

    Servo myServo;
    int val = 0;

    void setup(){
    myServo.attach(SERVO);
    pinMode(POT,INPUT);
    pinMode(RELAY,OUTPUT);
    digitalWrite(RELAY,HIGH);
    Serial.begin(9600);
    }

    void loop()
    {
    val=analogRead(POT); //Read Pot
    val=map(val,0,1023,0,179);//Scale it to the servo range
    myServo.write(val); //Sets the servo
    Serial.println(val);
    delay(15);
    }
     

    Attached Files:

    Last edited: Mar 26, 2015
  2. jcsd
  3. Mar 26, 2015 #2
    Resolved:

    this issue was caused by a very bad power supply.
     
  4. Mar 26, 2015 #3

    Baluncore

    User Avatar
    Science Advisor

    Your LED should be in parallel with the motor, not in series. You have an unnecesary series diode to the motor.
    Attached is a revised circuit.
     

    Attached Files:

  5. Mar 26, 2015 #4
    Thank you again!
     
  6. Mar 26, 2015 #5

    jim hardy

    User Avatar
    Science Advisor
    Gold Member
    2016 Award

    From servo documentation https://www.parallax.com/sites/defa...tinuous-Rotation-Servo-Documentation-v2.2.pdf

    good find, have fun!
     
  7. Mar 26, 2015 #6

    Baluncore

    User Avatar
    Science Advisor

    Sorry, R1 must be moved to limit LED current, no resistor is needed with the SSR LED.
    Attached revision.
     

    Attached Files:

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Arduino and DC Solid State Relay 'Flicker'
  1. SPDT Solid-state Relay (Replies: 3)

  2. Solid state relay (Replies: 8)

Loading...