Page 1 of 1

MetroX Classic Kit meets average idiot

Posted: Wed Oct 19, 2022 3:19 am
by PeterBaird
So I started my Arduino journey today at the tender age of 65 after a lifetime in professional audio. I love puzzles and kits, and I'm hoping some day to understand a little of what goes on under the hood of the gear I've been abusing the last 45 years. What follows are the musings of one with next to zero experience in this sort of exercise.


After opening the box and admiring the contents, I started in on the first circuit. I have a few observations. First, the software hazards are largely what I expected. The curve ball for Mac users is that navigating to the Silicon Labs website for the CP210x driver will require you to ALLOW POP UPS in Safari for that website in order to download the driver. Once you get it installed, you still have to find the correct destination port (my MacBook Pro gave me three candidates) by trial and error (I just kept moving ports until the lights on MetroX responded). As far as using the IDE software itself, your best friends are the green checkmark and green arrow circles upper left. Keep looking for mistakes in your typing (ex. digitalWrite, not digitalwrite) and keep clicking the checkmark until the code passes. Then hit the arrow and see if the captive LEDs on the MetroX react as the Mac pushes the code to the board. So far, all of the learning experiences are as expected.

My second observation is about basic electronics. I have never used a bread board in my life, and had no idea how they were arranged. I suppose I could have asked the Google, but I kind of hoped the book would supply that information. The book, however, only provides diagrams for what goes where and how it connects. If I were King of the Forest, I would add a short bit in the book explaining that the vertical + and - columns on the breadboard are all bussed together and intended for power, and the horizontal rows are bussed individually together but do not connect with each other or the power columns.

Once I managed to get that concept clear in my head I hooked up two long leads from the GND and 5V pins on the MetroX to the + and - rails of the breadboard and congratulated myself. Nearly there, I thought. I found the big blue LED and identified the long lead, and found what I'm fairly sure was the 560 Ohm resistor. I bridged pin 13 from the MetroX to a horizontal row, put the long end of the LED in that row, put the short end in a different row, and then bridged back to the - column through the resistor. I reset the board several times and reloaded the tested and correct code a few times, but didn't see anything happening to the LED.

At this point a question popped into my head: if the LED requires power to work, why aren't we using the positive rail we plugged in to the 5v supply of the MetroX for anything? Which led to a second question--is pin 13 supplying a voltage, or is it just a contact closure? Which led to me tromping upstairs to get the multimeter. I set it to DC, and put the leads on either side of the LED. It read 0.0v then 2.3v alternating. At this point I finally noticed the LED WAS actually lighting up, but extremely dim, almost off. Excelsior! But now I was curious. What was actually going on here?

Backing up, I measured the leads from the MetroX at 5v and GND: 5.01v. Now, pin 13 to GND: alternating 0.0 and 4.97. Answer to question in previous graph: Pin 13 carries voltage! Next question: why is the LED so dim? And a related question: can I make the LED light constant if I power it from the 5v rail instead of Pin 13? Yes, as it turns out. And now that it's lit, howzabout we remove the resistor and patch the LED short lead straight to ground? SHAZAM! Blue light visible for miles around. Move the input back to pin 13 and we now have our blinking light suitable for inducing seizures.

Just for grins I measured the LED leads with the light shining brightly and got 3.3v. Current loss within the LED, I'd guess.

So before I get all involved with changing pins and brightness in code and other fun stuff, I'd like to know the following:
1. Is my blue LED going to explode from the massive 5v circuit I'm feeding it?
2. If not, what's the point of the resistor if it attenuates the voltage so far it's nearly off?
3. Why tell people to hook up the 5v pin to the + rail if it's completely unused in this circuit? I realize it's going to be used later, but isn't the whole point here knowing what each step along the way does?

By the time I get through posting all of my observations through CIRC-13 in the book I'm counting on inspiring a mob with torches and pitchforks urging me to find another hobby.


Re: MetroX Classic Kit meets average idiot

Posted: Sun Oct 30, 2022 6:33 pm
by PeterBaird
Mods--would you consider moving this to Arduino/Arduino Starter Pack?

Re: MetroX Classic Kit meets average idiot

Posted: Mon Oct 31, 2022 9:10 pm
by adafruit_support_mike

Re: MetroX Classic Kit meets average idiot

Posted: Mon Oct 31, 2022 9:44 pm
by adafruit_support_mike
PeterBaird wrote: Wed Oct 19, 2022 3:19 am 1. Is my blue LED going to explode from the massive 5v circuit I'm feeding it?
More or less, yes.

A diode's voltage-to-current ratio is exponential: increasing the voltage across a diode by 60mV sends 10x as much current through it. It's physically impossible to go more than about half a volt above an LED's nominal working voltage because one of two things will happen: the diode will carry so much current it pulls the power supply's voltage down, or the current will generate so much heat that the LED will burn up.

Blue LEDs normally work in the 3V to 3.3V range, and indicator LEDs generally use 25mA. If you have a 5V supply, you want a resistor that takes up 1.7V to 2V at 25mA.

Ohms Law relates resistance to voltage and current with the equation V/IR=1. In this case we know the voltage and current, and want to find the resistance, so V/I=R.

Plugging in the numbers, 1.7V/0.025A=68 Ohms.
PeterBaird wrote: Wed Oct 19, 2022 3:19 am 2. If not, what's the point of the resistor if it attenuates the voltage so far it's nearly off?
If you were using a 560 Ohm resistor, it was reducing the current to 1.7V/560R=3mA.. about 1/8th the nominal working current. You can increase the brightness by using a lower resistor value.. just choose the value between 68 Ohms and 560 Ohms that gives you the brightness you want.
PeterBaird wrote: Wed Oct 19, 2022 3:19 am Why tell people to hook up the 5v pin to the + rail if it's completely unused in this circuit?
It's a combination of good habits and expectations.

Part of learning electronics is spending far too much time trying to debug a circuit problem, only to find that power to some part of the circuit was disconnected. With breadboards, failing to jump power from one side to the other is a common reason. Everyone does that more times than they're willing to admit before getting so exasperated that they learn always to check the power first.

Beyond that, part of the beginner's mindset is trying to make sense of the pieces one does understand. For a lot of people, -not- connecting power to a VCC rail is just as confusing as making the connection but not using it. Ultimately it's a choice of the questions you want to answer.