- #1
LickMyEyeball
- 23
- 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);
}
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);
}
Attachments
Last edited: