SlotForum banner

Trying to convert track power to 12v dc

1472 Views 12 Replies 5 Participants Last post by  sealevel
2
Hopefully this will be a short topic but I seem to have reached a watershed in my "self education" about electrical/electronic circuits and SSD systems.

What I have is a test circuit I am looking at for a potential Scalextric digital anti-collision idea. It is borrowed from a model railroad circuit used to control lights and power for "block control". The original plan was to use an external 12vdc power source. Here is the circuit:
.
Source: The Electronics Club

What I want to do is to power them from the track rails.... as 12 vdc vs. the 12vac on the SSD rails.

1) SELECTING A RECTIFIER BRIDGE
So from what I have read, I can use either 4 diodes (1N4001) to make a rectifier bridge (50v/1.0 amp) or buy a ready-made bridge. However, the ready-made ones are usually rated at 100v/1.0 amps or 400v/1.0 amps or 600v/2.0 amps... you get the picture. So does the rating on the ready-made rectifiers matter? Or just go for the cheapest and highest rated ones? I could make one from 4 diodes but the ready-made ones are more compact for the space involved.

2) SMOOTHING CAPACITOR
Secondly, the original circuit has a capacitor across the 12 vdc input.. and I have read that by adding a capacitor across a diode rectifier one can smooth out the rectified power. So should I add ANOTHER capacitor across the input in parallel to the existing capacitor or just stick with the current one? I believe the current one is there to provide a pulse to a 555 timer when called upon.

3) VOLTAGE DROP?
Thirdly, do I have to add another resistor or something to make up for the power loss between the rails and after the rectifier if there is a voltage loss across the diodes? I think the voltage drop over the bridge is in the neighbourhood of 1.2vdc. The output relay is a 12vdc one so I don't know if the voltage drop will affect the functioning of the relay.

4) VOLTAGE REGULATOR?
Lastly, i have read that one can add a voltage regulator after the bridge and capacitor to further smooth the power at a defined voltage. Is this true and would it be necessary in light of the voltage drop over the bridge noted above?

That is it for the power input questions. I am also planning to use reed switches as triggers to the 555 timer (as shown) since it works on the existing circuit although others have suggested either dead strips, live strips, or some type of IR sensors ... I just don't know enough about IR sensors to know if they would work instead of the reed switches and I am not yet sold on the dead strips as I will need parallel ones to make my plan work and that means 3 for each lane (one trigger and two resets) which is a lot of power interruption per LC.

If anyone can share some suggestions or point me to some additional reading, I would appreciate it.

Cheers!
See less See more
1 - 13 of 13 Posts
2
Given the relative simplicity of the circuit I suspect that the single diode & smoothing capacitor will work straight from the rails without any additional components.

However.... my very strong recomendation would be to jump straight to using a microprocessor of some sort. Lots of choices, and each has their followers but one of the simplest I have found to get going with is the Arduino. That is what I am using in my wireless throttles. Have a search on ebay for Arduino & Atmega328 and you will find numerous examples.



The larger boards Uno or Duemilanove, on the left, are easier to get going with as they have a built in USB interface and connectors, however it's then best to move to the smaller and cheaper ones like the Nano or Pro-Mini which are shown on the right. This is what I use in the wireless throttle. Depending on where you buy from price range is £8 -£15.

The development language is a free download and very easy to get started with, there are a lot of examples & sample code on the net.

Yes I know it might seem like overkill, but trust me once you get going it's so much more flexible. If you start off with a 555 based bistable, (and why someone would use a 555 as a bistable escapes me?) it's quite a lot of work to bulild and every time you want to add something or change a parameter like a delay or add an additional input then you need to make hardware changes.

Once you are using a microprocessor there are numerous inputs & outputs to choose from, including analog inputs and PWM outputs.

CODEint throt = analogRead(0);
throt = map(throt, 0, 0x3FF, 0, 0xFF);
For instance, using an analog input with just these two lines of code I can read the throttle resistor & then map from 10 Bits to 8 Bits (0-3F) ready to send to the Powerbase.


Rich
See less See more
1) SELECTING A RECTIFIER BRIDGE
It doesn't matter if the rectifier is rated at a higher voltage or higher current than you need. Go for the cheapest.

[2) SMOOTHING CAPACITOR
Yes an extra capacitor will smooth out the power. Not sure if that that circuit needs it, you are unlikely to do any harm by trying it without. If it does need extra smoothing something rather larger than the 220 already there will be needed

3) VOLTAGE DROP?
12 volt relays usually work down to around 8 or 10 volts depending on type so quite likely it'll work.
If you have a bridge rectifier to produce the DC, the 1N4001 diode at top right appears to be redundant, getting rid of that diode looks like the simplest thing to do to reduce the voltage drop.

4) VOLTAGE REGULATOR?
That would smooth out the power, but introduce a further voltage drop. You'd be pushing your luck with a 12 v relay.

Reed switches are simple to understand. Cars with traction magnets should work them OK, without magnets some people have made them work, some haven't
See less See more
The track voltage is normally a bit more than 12V so I wouln't worry about voltage drop. looking at the circuit, it should provide half wave rectification with the single diode and cap which should be enough to power all you need. The 1N4001 is important dont remove it, it is the half wave rectifier. I would just Try it as it is for now. It would probably work quite well. How are you going to use it for anti collision? Using the relay to cut power to the next LC is the only thing I can think of.
The microcontroller route would be my choice, Ive already implemented pit lane sensing using a USB powered sensing circuit and it talks to SSDC quite well. no PLG or Pit Pro required.
Just to clarify an apparent contradiction between the two posts above

If you do NOT have a bridge rectifier. the 1N4001 is essential

If you DO have a bridge rectifier, the 1N4001 is redundant and can be discarded.
Thanks RichG, mpg200, and 300SLR for you guidance.

QUOTE (mpg200 @ 21 Jun 2012, 05:39) <{POST_SNAPBACK}>The track voltage is normally a bit more than 12V so I wouln't worry about voltage drop. looking at the circuit, it should provide half wave rectification with the single diode and cap which should be enough to power all you need. The 1N4001 is important dont remove it, it is the half wave rectifier. I would just Try it as it is for now. It would probably work quite well.
As 300SLR said, if I go the route to feed from the rails, I will look at full rectification to get a cleaner voltage source. Good to know there is more than 12v on the track rails.

QUOTE How are you going to use it for anti collision? Using the relay to cut power to the next LC is the only thing I can think of.
Aha, that is the next secret to be revealed. I am starting with something simple since that is where my skills are right now. Objective is to prevent the "other guy/gal" from crashing into "my lane". How? My lane prevents "other lane" from changing and visa versa (NOT just kill power).

Use the relay to take the "other guy's" sensor board output and direct it to straight solenoid if I am in my lane, and reset at the exit of the LCs on either side. So "their" relay switches signal from "change" to feed "straight" solenoid and "straight" signal to also feed straight solenoid. Use diodes to prevent back current (since they feed the same solenoid).

I have worked this out in my head and it logically should work.... now to test it. Since SSD does not have auto return of the flippers, I see the need to trigger anti-collision before the LC and reset after so reed switch before (red light trigger on diagram) and 2 resets in parallel from either lane after the LC (green light trigger) so if I or "they" pass the LC the anti-collision is deactivated until the next user. This is for ONE lane, duplicate for other lane on XLC.

QUOTE The microcontroller route would be my choice, Ive already implemented pit lane sensing using a USB powered sensing circuit and it talks to SSDC quite well. no PLG or Pit Pro required.
I understand where you and RichG are coming from but just wanted to see if I could design and build a simple anti-collision device to save my detailed cars that I paid for from damage! Also, I have PitPro, display tower, etc. so want to use that wonderful kit. At this point I have no desire to mess with the signals on the track or in the PB... just avoid crashes.

Again many thanks for the pointers. The prototype will probably be powered by a 12vdc power supply. Then add the rectifier to power from the rails. I originally figured I could use this circuit to cut power to the pit lane exit, and show red light, when main track is occupied, then power pit lane exit and show green light after all is clear. Then after reading the powered flipper thread several times, the anti-collision idea came back again. Since others had not followed through on it, I thought I might give it a go... although my progress rate is slightly faster than the glaciers!

I will update when I have more done. Comments are always welcome.
Cheers!
See less See more
2
OK I will have one more go at convincing you, or perhaps anyone else considering putting together a task specific board of discrete component, that the microcontroller route is the way to go.
Here's half an hours work. The Arduino code for your Reed switch bistable with LED & Relay outputs.

The Setup section defines the Inputs & outputs, and then sets initial states.

The loop section continuously loops,
checking the reed switches and turning on & off the LED's & Relay.

CODEvoid setup()
{
pinMode(1, INPUT); // Set Red switch
pinMode(2, INPUT); // Set Green switch
pinMode(3, OUTPUT); // Red LED
pinMode(4, OUTPUT); // Green LED
digitalWrite(1,HIGH); // 20K pullup on Red Switch
digitalWrite(2,HIGH); // 20K pullup on Green Switch
pinMode(5, OUTPUT); // Relay coil
// Set initial states
digitalWrite(3,HIGH); // Red LED on
digitalWrite(1,LOW); // Green LED Off
digitalWrite(5,LOW); // Relay open
}

void loop()
{
if (digitalRead(1) == HIGH) // Red switch crossed
{
digitalWrite(3,HIGH); // Red LED On
digitalWrite(4,LOW); // Green LED Off
digitalWrite(5,LOW); // Relay Open
}

if (digitalRead(2) == HIGH) // Green switch crossed
{
digitalWrite(3,LOW); // Red LED Off
digitalWrite(4,HIGH); // Green LED On
digitalWrite(5,HIGH); // Relay Closed
}

}
Very easy to connect up, using any Arduino board. Reed switches to pins 1 & 2. LED's via a resistor to 3 & 4. Relay coil, if less than 300 Ohms, will need an NPN transistor to drive it. Base to pin 5, Collector to 5V, emmiter to relay coil, other side of relay coil to ground.

Probably less work than building the 555 bistable? However at this point it's very easy to add additional inputs and outputs, and most importantly make changes to how the circuit works with additions & changes to the code.

Want a delay before the LED come on or the relay closes, then add a single line of code.

CODEDelay(100); // will give you 0.1 second
Delay(1000); // will give you 1 second
Want to do something different if the two sensors are passed within different periods of time?
Try doing this with the Bistable circuit.

CODE if (digitalRead(1) == HIGH){ // Red switch crossed
timeRed = millis(); // Make a note of the time
}

if (digitalRead(2) == HIGH){ // Green switch crossed
timeGreen = millis(); // Make a note of the time
}

timeDiff = ( timeGreen - timeRed); // Calculate difference

if (timeDiff < 1000){ // If Less than 1 second
digitalWrite(3,HIGH); // Turn Red LED On
}

if (timeDiff > 2000){ // If Greater than 2 seconds
digitalWrite(4,HIGH); // Turn Green LED On
}

if (timeDiff > 1000 && timeDiff < 2000){ //If Greater than 1 second and Less Than 2 seconds
digitalWrite(5,HIGH); // Close the Relay
}
So just scratching the surface of what is possible. I hope from the above you can see the sort of things that are possible with very small amounts of simple code. If you really want to attempt something like collision detection this is the only way forward. You will definitely struggle and almost certainly fail trying to make it work building with discrete components.

Rich
See less See more
So if I understand you correctly, all one needs (other than the reed switches, LEDs, relay, transistor, etc.) is the Arduino board and load it with a program?

How big is the Arduino board (dimensions)? I can see the larger board has connectors for programming but cannot fathom how you would connect the smaller boards to program them. I have not even considered the MIH upgrade at this point.

I am sure SOMEONE will take you up on your challenge, Rich. Thanks for the extra info.

Cheers!
See less See more
2
Yes thats all you need,
The larger board is 3 x 2 inches & the smallest 1 1/4 x 3/4 inch, that is the one that I put into the Scalextric throttle for wireless.

The larger board includes a USB connector for programming, and connectors for the other components, and is what I would start with. The smaller ones you need to attach a temporary programming interface like we do to the Powerbase for upgrades, then you solder wires for the reeds & relay.

Well worth a play to find out if it's for you.


Rich
See less See more
Thanks Rich. It is on my "to do" list, which is growing...
We are off on a vacation/shopping junket to the US so will check out the electronics stores there for the Arduino boards.
Cheers!
See less See more
Hi Sealevel, I'm starting to play around with Arduino things but need an objective rather than just making an led blink (case of being determined to run before I can walk
) so I was wondering if you have got anywhere with this project?
See less See more
Like most things I start, it is on hold while other priorities take precedence.

If you want an Arduino mini project, why not look at the RCS64 use of Arduino to control start lights.

Cheers!
See less See more
1 - 13 of 13 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top