Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Arduino ON led lights up with no USB, no Vin and no 5V power

Status
Not open for further replies.

123mmm

Member
Hello, I am using an Arduino Uno for a soldering station project. I am powering the Arduino through USB port using a L7805 regulator and I saw that if I remove the USB power, the ON led still lights up when I am powering the soldering station. Also, the other led's are semi light up. The Vin and 5V power pins are not connected.
Please find attached the schematic.

Can you please explain why is happening this phenomenon ?
 

Attachments

  • arduino_schematic.png
    arduino_schematic.png
    78.3 KB · Views: 267
The schematic of the Arduino does not help unless you show all the connections to it. If the power is getting to it with the power connectors not connected then it must be getting to by another path. It could be getting in via a connection to an I/O pin and then to the positive rail via a protection diode on that port.

Les.
 
I also have this schematic for displaying the temperature.
J1 (1 to 8) is directly connected to J2 of the first schematic. The J3 (1 to 3) is connected to pins D8, D9, D10 of Arduino and J6 is connected to +5V rail coming from the 7805.
 

Attachments

  • display.png
    display.png
    60 KB · Views: 263
Edit: I disconnected the +5V that was powering the 3 digit 7 segment display (J6 from the schematic at reply #3) and I removed from the socket the LM358, and the LED's from the Arduino did not lit up anymore.
If I connect back into the circuit the +5V to the 7 segment display or the LM358, then the Arduino LED's light up again.
 
Last edited:
How dangerous it is this phenomenon and is there something that I should do ?
 
Last edited:
How dangerous it is this phenomenon and is there something that I should do ?

Presumably you're powering the Arduino via the protection diodes on the inputs - it's best not to do this, arrange for a common power supply so both go off together. Or stop power feeding back through the inputs?.
 
In my project, I power on the entire soldering station an once, using a switch on the 230Vac input of the 24V power supply.
The Arduino will be always connected to the 7805 output through the USB and also, the 7805 is powering the 7 segment display and the LM358 at the same time. It is correct ?
 
In my project, I power on the entire soldering station an once, using a switch on the 230Vac input of the 24V power supply.
The Arduino will be always connected to the 7805 output through the USB and also, the 7805 is powering the 7 segment display and the LM358 at the same time. It is correct ?

Sounds like it.
 
In terms of "phantom powering" it is better to supply the arduino with regulated 5V through the 5V pin or through the USB connector ?
 
This is the power scheme for an Arduino Uno.
Arduino UNO %V Reg.png


That's what you have including the Green ON LED. :) You can see where the Vin (pin #8) fits in. It's the input to the onboard 5 volt regulator and takes about 7 volts before we have a working regulator. If you want to power the board with a good, clean regulated 5.0 volts you use pin 8 Vin.

Ron
 
Hello, I have the following function to display (void show) the temperature on an 7 segment 3 digit common cathode display, with cathodes driven by NPN transistors.
I modified the lines from the code that are commented to be modified when using common cathode displays but when the temperature is below 100 C then the first digit (most significant) appears with all the led's ON, but I need all of them OFF.
Please have a look at the code...

C:
//Thank you Alex from https://geektimes.ru/ for help with led array function
//AllAboutCircuits.com
//epilepsynerd.wordpress.com

#include <PID_v1.h>

//This array contains what segments need to be turned on to display numbers 0-9
byte const digits[] = {
  B00111111, B00000110, B01011011, B01001111, B01100110, B01101101, B01111101, B00000111, B01111111, B01101111
};

int digit_common_pins[] = {10, 9, 8}; //Common pins for the triple 7-Segment LED display
int max_digits = 3;
int current_digit = max_digits - 1;

unsigned long updaterate = 1200; //Change how fast the display updates. No lower than 500
unsigned long lastupdate;

int temperature = 0;

//Define Variables we'll be connecting to
double Setpoint, Input, Output;

//Define the aggressive and conservative Tuning Parameters
double aggKp = 4, aggKi = 0.2, aggKd = 1;
double consKp = 1, consKi = 0.05, consKd = 0.25;

//Specify the links and initial tuning parameters
PID myPID(&Input, &Output, &Setpoint, consKp, consKi, consKd, DIRECT);

void setup()
{
  DDRD = B11111111;  // sets Arduino pins 0 to 7 as outputs
  for (int y = 0; y < max_digits; y++)
  {
    pinMode(digit_common_pins[y], OUTPUT);
  }
  //We do not want to drive the soldering iron at 100% because it may burn, so we set it to about 85% (220/255)
  myPID.SetOutputLimits(0, 220);
  myPID.SetMode(AUTOMATIC);
  lastupdate = millis();
  Setpoint = 0;
}


void loop() {
  //Read temperature
  Input = 0;
  for(int i=0;i<50;i++)
  Input += analogRead(A0);
  Input /= 50;
  //Transform the 10bit reading into degrees celsius
  Input = map(Input, 0, 550, 25, 400);
  //Display temperature
  if (millis() - lastupdate > updaterate) {
    lastupdate = millis();
    temperature = Input;
  }
  //Read setpoint and transform it into degrees celsius(minimum 150, maximum 350)
  double newSetpoint = analogRead(A1);
  newSetpoint = map(newSetpoint, 0, 1023, 150, 400);
  //Display setpoint
  if (abs(newSetpoint - Setpoint) > 3) {
    Setpoint = newSetpoint;
    temperature = newSetpoint;
    lastupdate = millis();
  }

  double gap = abs(Setpoint - Input); //distance away from setpoint

  if (gap < 10)
  { //we're close to setpoint, use conservative tuning parameters
    myPID.SetTunings(consKp, consKi, consKd);
  }
  else
  {
    //we're far from setpoint, use aggressive tuning parameters
    myPID.SetTunings(aggKp, aggKi, aggKd);
  }

  myPID.Compute();
  //Drive the output
  analogWrite(11, Output);
  //Display the temperature
  show(temperature);
}

void show(int value) {
  int digits_array[] = {};
  boolean empty_most_significant = true;
  for (int z = max_digits - 1; z >= 0; z--) //Cycle through each digit
  {
    digits_array[z] = value / pow(10, z); //We now take each digit from the number
    if (digits_array[z] != 0 ) empty_most_significant = false; //Do not display leading zeros
    value = value - digits_array[z] * pow(10, z);
    if (z == current_digit)
    {
      if (!empty_most_significant || z == 0) { //Check to see that we do not have leading zeros and display the current digit
        PORTD = digits[digits_array[z]]; //Remove ~ for common cathode
      }
      else
      {
        PORTD = B11111111;
      }
      digitalWrite(digit_common_pins[z], HIGH);
    } else {
      digitalWrite(digit_common_pins[z], LOW);
    }

  }
  current_digit--;
  if (current_digit < 0)
  {
    current_digit = max_digits; //Start over
  }
}
 

Attachments

  • display.png
    display.png
    66 KB · Views: 246
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top