Hi again everyone, I recently purchased 3 aspect block signals. I programmed my arduino to work them with ir sensors. They worked fine until I installed them on my layout and hooked them up to my dedicated buss wire for my signals. The buss wire gets its power from a computer atx power supply and is DC current. I have not installed my arduino yet on my layout. I found out that these block signals work on ac current not dc current. I emailed the manufacturer of these block signals and inquired about converting them over to dc current. He told me that I could remove the resistor on the black negative ground wire and install the resistor on to the bulb side to get them to work off dc current. I have a number of questions about this. First, does a resistor has to be on every aspect (green, yellow, red) ? Second, can I power my arduino with the computer atx power supply? Third, will the block signals work as they should if the arduino can be supplied with power from the computer atx power supply? Or do I have to scrap this and start all over and do these block signals a different way all together?
LocojunkieI found out that these block signals work on ac current not dc current.
can you post a link to the type you have
LocojunkieFirst, does a resistor has to be on every aspect (green, yellow, red) ? Second, can I power my arduino with the computer atx power supply? Third, will the block signals work as they should if the arduino can be supplied with power from the computer atx power supply?
Second, can I power my arduino with the computer atx power supply?
Third, will the block signals work as they should if the arduino can be supplied with power from the computer atx power supply?
each LED should have a resistor (if in doubt, start w/ 1k) should only draw ~10ma. bulbs? how much current do they draw?
instead of an ATX, you might consider using a typical USB AC adapter (this one provide 2A)
i would connect the ground side of the LEDs to the Arduino output (active low) and provide power (Vcc) to the LEDs from the 5V of the Arduino.
greg - Philadelphia & Reading / Reading
Somethign else to remember is there are two ratings for the power available to the outputs - there is the max per an individual I/O line and there is a maximum for the entire microcontroller. While an individual line may be able to handle 40ma, you can't load EVERY line to 40ma, or the chip itself will still fry. It shouldnt be a problem with LEDs, 40ma would fry the LED< so the current needs to be limited to something less. Plus with 3 LEDs per signal head, it's not likely that all 3 would ever be on (unless you program in a lamp test button), so only 1 in 3 I/O lines will generally be active. Plus if some of the lines are used for inputs from detectors, that further reduces the total output power needed.
It is something to consider if most or all of the lines on a given Arduino are going to be used as outputs to turn something on.
--Randy
Modeling the Reading Railroad in the 1950's
Visit my web site at www.readingeastpenn.com for construction updates, DCC Info, and more.
rrinkerthere is the max per an individual I/O line and there is a maximum for the entire microcontroller.
sect 28.1, pg 258 of the ATmega328p datasheet has a table indicating max current per I/O pin of 40 ma and (max) "DC current Vcc and GND pins" of 200 ma. same limits for ATmega1284p used in Arduino Mega.
drawing 10 ma from 16 I/O should be < this limit. (not true for mega)
Here is a link to the block signals I purchased they are Evemodel block signals.
https://www.amazon.com/JTD873GYR-Railroad-Signals-3-Lights-Green-Yellow-Red/dp/B07FGFH57F/ref=pd_lpo_sbs_21_t_0/138-0863848-3553868?_encoding=UTF8&psc=1&refRID=J668CY22HT17VVA6DZV2
JTD873GYR. description mentions common anode and cathodes for each "light". Of course, LEDs can be driven with AC. Different size resistors may balance intensity as Mel said.
Yeah that seems to be one of those technical bits they hide in the interests of keeping the Arduino "simple", but the datasheet of the actual microcontroller has the info.
Thanks for all the help!! What I am planning on doing is supply the arduino with a arduino power supply instead of the computer atx power supply. I have a 4 x 8 layout HO scale with 3 block signals for the main line. I am planning on hooking up the arduino to terminal strips that I have placed at the block signals under the layout, then running the block signal wires to those terminal strips. I will then place terminal strips for the ir sensors and do them the same. Will this work? or would I have to do it another way? It sounds like the computer atx power supply will be too much for the arduino and the block signals together.
I would definitely use a proper rated 5V power supply for this sort of thing. The on-board regulator ont he Arduino has no heat sink and is a low power device, so feedign 12V and relying on that regulator to power the external devices attached to the Arduino is generally a bad idea. It's fine in the "experimenter" stage doing the sample projects with one or two LEDs, but higher current devices, even a 9G servo, can have problems workign reliably powered through the Arduino.
The best way to power things is use a 5V power supply, and connect it to the 5V and GND pins on the Arduino (don't get it backwards). Forget powering through USB, or through the other input that can take up to 12V DC. Then the only thing you need to consider is the load per pin and the total load of all pins.
rrinkerForget powering through USB, or through the other input that can take up to 12V DC.
while the Atmel processor is designed to operate over a specific range of voltages (max 6V), the Arduino is designed to operate from USB or 12V using the on board regulator.
why ignore the capabilities an electronic device is designed for unless you're not confident what they are? (see Feeding power to the Arduino)
in many cases it makes sense to use a supply higher than needed for the processor. A DCC decoder relies on the ~14V available from the track to power the ~12V motor. The decoder has a regulator for the processor which doesn't require much current so there shouldn't be that much wasted power using a linear regulator.
if 12V is available on a bus going around the layout, why not use it. Power thru the regulator can be minimized by powering external devices (e.g. signals) from 12V and controled using a grounded output so that the I/O current is not drawn thru the regulator.
gregc rrinker Forget powering through USB, or through the other input that can take up to 12V DC. while the Atmel processor is designed to operate over a specific range of voltages (max 6V), the Arduino is designed to operate from USB or 12V using the on board regulator. why ignore the capabilities an electronic device is designed for unless you're not confident what they are? (see Feeding power to the Arduino) in many cases it makes sense to use a supply higher than needed for the processor. A DCC decoder relies on the ~14V available from the track to power the ~12V motor. The decoder has a regulator for the processor which doesn't require much current so there shouldn't be that much wasted power using a linear regulator. if 12V is available on a bus going around the layout, why not use it. Power thru the regulator can be minimized by powering external devices (e.g. signals) from 12V and controled using a grounded output so that the I/O current is not drawn thru the regulator.
rrinker Forget powering through USB, or through the other input that can take up to 12V DC.
It's all fine for the experimental stage, but that little SOT-23 regulator on the Arduino (well, on the Nano anyway) doesn't have much current capacity. The Uno has a bigger +5 regulator and so should be fine up to the limit of the ttoal load on the 328. They don't explicitly tell you the limit of this regulator, but they do say that the 3.3V regulator is good for no more than 50ma - and it's the same package as the 5V regulator on the Nano boards, so I'm assuming a similar rating. And the closer to the input limit, the lower the current limit, since they are linear regulators (and apparantly not LDO, since the 'official' Uno document says the input needs to be greater than 7V to assure 5V out.)
The USB is fine, since that bypasses the regulator. And even a low power 500ma USB port is going to supply more than a fully loaded board can use.
But it's also not just the things like LEDs directly connected to the pins of the Arduino. Servos are alyways my example because I am using them a lot. The current draw on the drive pin is miniscule - but the servo's actual motor needs quite a bit of current. My test circuit actually works - with ONE servo, if I plug it in and supply power via USB, but add a second servo and it falls on its face, the USB can't supply enough current. So what's connected matters a lot, too. Peripherals can draw well under the micro's per pin limit, but still need significant current to power. It just isn't coming from an IO pin.
rrinkerbut the servo's actual motor needs quite a bit of current. My test circuit actually works - with ONE servo, if I plug it in and supply power via USB, but add a second servo and it falls on its face, the USB can't supply enough current.
external devices (e.g. servo motor) should not be supplied power thru the arduino regulator, they should be supplied thru an external source. This includes LEDs.
contrary to what is said above, a 12V supply for a motor can be connected to the Arduino which uses it's internal regulator for processor power. The arduino controls an H-bridge which has separate power for the h-bridge and for the motor which it controls. I doubt the h-bridge logic requires much power which could be drawn thru the arduino, but the motor is not supplied thru the arduino.
external devices can be controlled thru the arduino using active low (i.e. open-collector logic) so that current flows into the input, not out thru the regulator.
maybe servos should be power thru a lower (3.6V) external regulator to minimize current.