Arduino Uno - 1.5v on OUTPUT

Hi Guys and Gals,

Could you please help me out.

I have a project that when I assign the pin as OUTPUT, whether it is a Digital or PWM pin I can only get 1.5V at the output pin.

The output pin is driving a Panasonic AQY212EH Solid State Relay.

I do have 5.09V at the 5V pin on the Arduino board so I know it is available. I also measure 5V on the input pin so the pull up resistor is working there.

To simplify things I loaded the code below in place of my project code and found the same problem.

/* switch
 * 
 * Each time the input pin goes from LOW to HIGH (e.g. because of a push-button
 * press), the output pin is toggled from LOW to HIGH or HIGH to LOW.  There's
 * a minimum delay between toggles to debounce the circuit (i.e. to ignore
 * noise).  
 *
 * David A. Mellis
 * 21 November 2006
 */

int SpotinPin = 3;         // the number of the input pin
int SpotoutPin = 5;       // the number of the output pin

int state = LOW;      // the current state of the output pin
int reading;           // the current reading from the input pin
int previous = LOW;    // the previous reading from the input pin

// the follow variables are long's because the time, measured in miliseconds,
// will quickly become a bigger number than can be stored in an int.
long time = 0;         // the last time the output pin was toggled
long debounce = 500;   // the debounce time, increase if the output flickers

void setup()
{
  pinMode(SpotinPin, INPUT_PULLUP);
  pinMode(SpotoutPin, OUTPUT);
}

void loop()
{
  reading = digitalRead(SpotinPin);

  // if the input just went from LOW and HIGH and we've waited long enough
  // to ignore any noise on the circuit, toggle the output pin and remember
  // the time
  if (reading == HIGH && previous == LOW && millis() - time > debounce) {
    if (state == HIGH)
      state = LOW;
    else
      state = HIGH;

    time = millis();    
  }

  digitalWrite(SpotoutPin, state);

  previous = reading;
}

Thanks,

Jeremy

Hey Jeremy,

Interesting issue, can you please use a multimeter to check the voltage between the 3.3V pin on your board and ground? Also, if you can please shoot us through a photo here of how it’s set up that’d be quite helpful in letting us identify what’s going on with it.

Also, if you can run this miniature script below and check the voltage between the 5th pin and GND that’d be helpful too to make sure that we’re not running into issues with the voltage between pin 3 and 5 being less than 5V that’d be helpful too:

void setup() {
    pinMode(5, OUTPUT);
}


void loop() {
   digitalWrite(5, HIGH);
}

Hi Bryce,

Thanks for getting back to me so promptly.

I will run the tests you have given, however I have additional information which may help.

It could be related to the SS relay I mentioned.

I have not used a resistor in series for the SS relay and as such I am wondering if it is drawing too much current and the 5V current limiting is saving the Arduino from letting the smoke out.

On My analogue channels I am getting 0 - 5 V at the input pin. It is just the Outputs I am trying to switch the SS relays with that are the problem.

I am not able to test the board by it’s self at the moment, it is still connected to the rest of the electrical circuit, but I will also check it out independently later on .

I think the biggest issue is I was driving the SS relay as if it was a “Relay” and not a Diode. Hopefully it is my electronic circuit at fault. I am also adding a 60ohm resistor in series with the SS relay input so it limits the voltage to 2V.

I will update my progress later on. Most likely Sunday as I have a bit on at the moment.

Regards,

Jeremy

1 Like

Hi Jeremy,

No worries, glad to help! If you whack an ammeter on the pin which is headed to the relays it should help give you a better idea of what’s going on.

Throwing in a relatively low-ohm resistor (See Bobs post below) should help limit the current, you’ll just want to make sure that it’s not too high, otherwise the voltage drop across the resistor will cause the voltage which applies across the load of your relay and it may not be high enough to trigger (although this is easy enough to check with a multimeter in parallel to the terminals)

image

Too easy, let us know how you go with it. I may not be available myself at the time, but as this is a public forum anyone should be able to jump in and lend a hand. Enjoy your weekend!

Hi Jeremy.
Had a look at the data sheet for that relay. LED operating current for ON condition is quoted 1.2mA typical and 3.0mA max and a max voltage drop of 1.5V. You are probably severely overloading the output pin and the 1.5V you measure is the drop across the LED.

You will need a series current limiting resistor between your output pin and relay LED.
5V - 1.5V = 3.5V
To drop 3.5V at say 2mA requires 1k75Ω. Use 1k8Ω (preferred value).

Be aware you may have destroyed the output pin or the relay LED although the current limit of your driving device (I assume Arduino, you don’t indicate) may have saved the LED. Also don’t forget the LED is polarity conscious.
Cheers Bob

2 Likes

Hi Bryce

What is that all about ???
Cheers Bob

2 Likes

That’s my bad, I should be more careful going through the spec sheet for the ratings on the components here, they’re much lower than I was expecting. I was under the impression that Jeremy was referring to the pin that’s driving his solid-state relay drawing excess current from the Uno and needing to limit the current from the pin without dropping the voltage reaching the relay so low that it no longer triggers.

Bob is right, a resistor in the ballpark of 1k8Ω should be what you’re after if you’re looking to drop 3.5V from the 5V logic level of the Arduino, although I’d personally still suggest measuing the output voltage that you’re getting on those pins to ensure that there’s no funny business going on with your microcontroller and that no components have been cooked so far.

Thanks Rob and Bryce.
I have been using an Arduino Uno so hopefully the current limiting saved the SS relay.

Thanks for the value for the resistor also.

I will have a play over the weekend and report back.

Regards,

Jeremy

2 Likes

Hi Jeremy

Good idea. If you have damaged this output pin you might get away with using a spare pin if you have one. Don’t forget if need be analog pins can be used as digital.

Also be aware that damage can be cumulative and may take time to fail. So if this pin appears to be OK now and fails a bit down the track don’t be overly surprised. You might do well to make a note of the possibility so you don’t do any unnecessary hair pulling later.
Cheers Bob

2 Likes

Hi Guys,

I fitted the 1K8 resistors in series with the SS Relay.

So far it looks like I only Blew the arse out of the SS Relays…

Now I am getting the 5V on the output pin of the Arduino and 1.05V on the leg of the SS Relay.

All appears to be working so far. I can switch on all 3 now and the Board 5v is rock solid.

Thanks again for your time and efforts in replying and looking up the spec sheet.

I have the spec sheet but did not read and understand it correctly…

Regards,

Jeremy

2 Likes

Hi Jeremy

Without a current limiting resistor the LED in the SSR would probably only last µseconds with a hefty supply. The relatively low current capability of Arduino may have prolonged it a bit more.

Don’t forget this bit.
Cheers Bob

1 Like