Go Down

Topic: [do not read] [solved] Problems with a tester for T-splits  (Read 1 time) previous topic - next topic

fredjean

Hello fellows!

I'm quite new here and I needed to test a big amount of T-splits that uses M12 connectors, (1 male, 2 females) (5 pins on each connector)

I had an idea that I could use Leds (blue ones). So I connected 10 of them into 13->4 in my arduino uno, positive to the tthe numberspots, negatvie to the female pin holes. This because I want to see if all female pin holes work. I then connect the male pinouts to the GND. This creates a closed circuit.

As I have understood the voltage output of these spots are 3.3V approx. The leds tolerance vary between 3.0-3.6 V and therefore I use no resistors.

And now to the problem.

When I use only one lamp connected to 13 and gnd, it works fine (have tried with every led), but when i connect all ten, they dont work. Idont know if my code is wrong or if i have screwed up my electrical scheme.


Grumpy_Mike

Quote
I'm quite new here
And I have not been arsed to read the rules in the How to use this forum sticky post because I am arrogant.

Quote
As I have understood the voltage output of these spots are 3.3V approx. The leds tolerance vary between 3.0-3.6 V and therefore I use no resistors.

And now to the problem.
No that is your first problem, all LEDs need a current limiting circuit and a resistor is the simplest one. That figure is not a tolerance but a spread of what the forward voltage drop could be. It does not mean you can feed the LED with any voltage in that range and all will be fine.

Quote
...... or if i have screwed up my electrical scheme.
Nether do we as you haven't posted one. You also post code as in the link above not as a zip file.


fredjean

Thanks for taking your time repying to a newbie like me Mike, but the problem is no more. I solved it on my own.

By the way, if you ever feel like you are having a bad day, just listen to this song. It always puts me in a good mood.

https://www.youtube.com/watch?v=oHg5SJYRHA0

Have a great day!

because I am arrogant.


vaj4088

I do not know if Grumpy_Mike is having a bad day or not, but his answers were right on target.  Thanks, Grumpy_Mike !


Grumpy_Mike

Quote
Thanks for taking your time repying to a newbie like me Mike
You would have thought that if you are such a newbie you would do every one the curtsy of reading how to use this forum before you ventured to post here.

You know we go to a lot of trouble making sure up to date information at the start of each forum section and it discouraging how few bother to read it.

Quote
but the problem is no more. I solved it on my own.
Without resistors on those LEDs any solution you think you have is illusory.

fredjean

Alright I got you.

After reading the guide I understand you completely.

I am sorry for being rude and impulsive.

However I do not think my solution is illusory  :)

But just to clear things up, I screwed up writing my question pretty terribly yesterday, I admit that... What I meant by "tolerance" was stupidly enough the forward voltage. Which in this case was close to "perfection", as the typical value was for each diode is 3.2V, 0.1V off the 3.3V each arduino "number pinhole". And while each "number pinhole" can give up to 50mA, one led needs just 20 mA to light up. And as I have understood by searching on the web, a device (in this case the leds) will not use more electric current than it needs. If I would have used red leds though, I would have needed to use resistors as you say, since they have a lesser forward voltage. And so the tester basically works the way I want it too, I can see that my T-split's pinouts are not broken, as all the leds light up when the code I have below instructs them to and it also works when I rewrite the code so that just some of the leds light up.

Code: [Select]

int led1 = 13;
int led2 = 12;
int led3 = 11;
int led4 = 10;
int led5 = 9;
int led6 = 8;
int led7 = 7;
int led8 = 6;
int led9 = 5;
int led10 = 4;

void setup() {
    pinMode(led1, OUTPUT);
    pinMode(led2, OUTPUT);
    pinMode(led3, OUTPUT);
    pinMode(led4, OUTPUT);
    pinMode(led5, OUTPUT);
    pinMode(led6, OUTPUT);
    pinMode(led7, OUTPUT);
    pinMode(led8, OUTPUT);
    pinMode(led9, OUTPUT);
    pinMode(led10, OUTPUT);
}

void loop() {
 
   digitalWrite(led1, HIGH);
   digitalWrite(led2, HIGH);
   digitalWrite(led3, HIGH);
   digitalWrite(led4, HIGH);
   digitalWrite(led5, HIGH);
   digitalWrite(led6, HIGH);
   digitalWrite(led7, HIGH);
   digitalWrite(led8, HIGH);
   digitalWrite(led9, HIGH);
   digitalWrite(led10, HIGH);


In the picture named "forum1" the code above is uploaded and all ten leds are lit.

In the other picture named "forum2" I rewrote the code so that just led 1-3 are lit.

But truly thanks for your help guys.


fredjean

here are the pictures

Grumpy_Mike

Quote
And as I have understood by searching on the web, a device (in this case the leds) will not use more electric current than it needs.
In the case of LEDs this does not apply. This is normally asked about a device that is designed to work off a specific voltage. The whole point about an LED is that it is not designed to work off a voltage it is a current driven device. The relationship between voltage given and current drawn is known as none linear.

Have a read of this:- http://www.thebox.myzen.co.uk/Tutorial/LEDs.html

Quote
And while each "number pinhole" can give up to 50mA,
No, at a current of 40mA each output starts to be damaged, you should normally not draw more than 30mA from a pin. You have to arrange the circuit you attach to an Arduino output so that this limit is not exceeded. It is a limit in the sense of you should not exceed it. It is not a limit in the sense that you can not exceed this.

fredjean

#8
Jun 15, 2017, 09:15 am Last Edit: Jun 15, 2017, 10:54 am by fredjean
OK, thanks for your help once again, I will think of something else then.

Edit: Great guide by the way.  :)

Go Up