26th January 2016
“Captain’s (build) log, star date January 2016…”
Since finishing this build log I’ve had quite a few questions about the wiring details for it.
So retrospectively I’ve taken a bit of time out to put together a wiring diagram that should (at least) give you an idea of how I went about wiring her up…
Now, the following wiring diagram may not be 100% accurate as I have had to reverse engineer it from my notes but as I will elaborate in a while, this kind of wiring is more an art form than pure science. So if a few resistor values have been swapped around in translation it won’t matter… Some of your LEDs might just end up a bit bright (or dim).
The above diagram is 1920 pixels wide, so you can click it to view it full size.
You might also find the following diagram useful, this is the diagram I used during the build to help me keep track of which LED goes in which hole in the Bussard Collectors…
Going back to what I was saying about this kind of electronics being more art than science…
There are lots of online sources about LED resistor calculations and it’s easy to get caught up in the science and believe that you need to exactly calculate voltage drops and forward currents and take into account reverse biases and all kinds of parameters in order to light up a LED. Well the simple truth is that you don’t.
My advice when working out resistor values for LEDs is to use a basic bit of maths (yep a little bit of Ohm’s Law) and then trust to eye for the final tuning.
What I mean is this: The output from an Arduino pin is 5 Volts. Most LEDs have a maximum forward current of 20mA.
That is 0.02 Amps.
What this means is that if you allow the LED to draw more than 0.02 Amps (20mA) it will blow up.
Which is bad.
Without a resistor to limit the current, an LED connected straight to a power supply will attempt to draw (almost) infinite current and will destroy itself trying. To prevent this we put a resistor in line with the LED (in series) which will limit the current the LED can draw (current limiting resistor).
So what value resistor do you need to use?
I said that a typical LED can be allowed to draw up to 20mA before it goes pop, so if we use Ohm’s law to work out the resistance required to limit 5 Volts (the voltage on an Arduino pin) to a maximum current of 20mA we get 250 Ohms.
R = V/I
250 = 5/0.02
So in a nutshell, a 250 Ohm resistor in series with a single LED will limit the current that the LED can draw to about 20mA.
Here is where the art comes into it…
With a model such as the USS Enterprise, you’re not going to want the LEDs to draw their maximum current otherwise they will be like (freakin’) lasers and will be so bright as to cause arc-eye.
No, for modelling purposes you will want the LEDs to be dimmed down somewhat so that they look right.
Also bear in mind that different LEDs all give a different light output (brightness) for a given current. So for the same current a red LED could be twice as bright as a green LED (or vice versa).
Therefore the best and easiest approach is to start out with resistors of 250 Ohms (or more) and see how the LEDs look when illuminated. If you have an LED that is way too bright, swap the resistor for a higher one. I’d start at 1k (1,000 Ohms) for an LED and see how it looks. If it is too bright try 2k, too dim then try 500Ohms.
As long as you don’t go below 250 Ohms you will be fine. Anything higher than 250 Ohms will lower the current and the LED will be dimmer.
You will note that some of the Arduino channels in my diagram drive multiple LEDs. In this case the current will be shared by all the LEDs on that channel so you will need to reduce the value of the resistor to allow more current through. Even so, the lowest resistance I used was 330 Ohms to drive six LEDs – which is approx. 15mA for all LEDs or about 2.5mA each.
This is another reason why I situated the LEDs outside the body of the model, it allowed me to see how the lighting looked in the finished model and do any final teaks to the resistor values with no problem. If you put the resistors close to the LEDs and entomb them in the model you will have difficulty in changing the brightness of the LEDs.
I hope this extra info is useful, let me know in the comments below if you have any more questions.
Congratulations if you managed to follow my USS Enterprise build log this far, I hope you had as much fun reading it as I had doing it!