Use 12-19v signal

Discussion in 'General Electronics Chat' started by ejim, Nov 3, 2013.

  1. ejim

    Thread Starter New Member

    Nov 3, 2013
    8
    0
    Hi all!

    I am an amateur in electronics and want to learn by doing a project. :D

    Currently I want to set up automatic signalling for my Märklin tracks (well... future Märklin tracks).

    Whenever a train is on a section of track a 12v alternating current is activated and I want to use this current to control whether the signal is red or not and whether to send a signal to the next piece of track signalling occupancy.

    In the future I want to keep track of my trains with an Arduino board or something similar.

    Please find the attached image. I measured the input alternating current to about 17v (this is from the Märklin transformator so I can't change it) and the output direct current to 19v.

    I guess the increase is due to the capacitor used, I think .473μF.

    Please help me with my next step.
     
  2. R!f@@

    AAC Fanatic!

    Apr 2, 2009
    8,733
    759
    I am afraid I do not understand this part. Need a bit of more details.

    As for the 19VDC u are getting from the 17VAC. It is due to low value smoothing cap u are using. If u need to smoothed DC, you will need a bigger cap, which in turn will increase the DC to about 24VDC.

    Ur diagram is OK for what it is. Just a bridge and filter cap. It's standard full wave rectifier with smoothing cap.
     
  3. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    To size the filter capacitor, we need to know what the DC output from your bridge/cap is connected to?

    Presumably, you will be using LEDs as signal lights, so the current requirement will be small. ALso, LEDs dont care if there is ripple, so the capacitor might not even be needed?
     
  4. ejim

    Thread Starter New Member

    Nov 3, 2013
    8
    0
    Thank you for your replies.

    I can see my description is a bit unclear. I'll try do clear it up a bit.

    There is an attached image.
    What I want to happen is that when there is power through Input A I want L1 to be lit.
    I have looked into transistors, but can't find out how to work one with 12-19VDC as the "controlling" current.

    I hope this is a bit more clear.
     
  5. R!f@@

    AAC Fanatic!

    Apr 2, 2009
    8,733
    759
    The circuit will work fine as long as there is a mechanical switch to turn on the L1.
    You will need a series resistor if L1 is a LED. The resistor value depends on the LED color or forward current.
    If it is a bulb rated for 24V then it should be fine.

    The low value cap will have lot of ripple which will cause the light to flicker at double ur line frequency. If u do not want it to flicker then u should use a cap value of around 1000uf 35V cap. But this will increase the DC voltage close to 24V
     
  6. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Your new diagram is also confusing.

    Do you need to turn the LED on/off while the track is powered? In that case you need a switch(transistor or otherwise) in series with the LED and its (required) current-limiting resistor.

    If the LED just lights whenever there is AC on its associated track, then no switch is required...
     
  7. ejim

    Thread Starter New Member

    Nov 3, 2013
    8
    0
    I seem to have some problems conveying my ideas to you, but I'll try again.

    This diagram is more or less what my intentions are. Let me describe it in short.

    Three inputs:
    - I1 (Main Piece)
    - I2 (Left In)
    - I3 (Right In)

    Two outputs:
    - O1 (Left Out)
    - O2 (Right Out)

    Eight signals:
    - S1, S2, S3, S4 (Left LEDs from top to bottom)
    - S6, S7, S8, S9 (Right LEDs from top to bottom)
    (I have reserved S5 and S10 for future expansion)

    What is supposed to happen:
    - When I1 (Main Piece) is open, S1 and S5 is lit and a signal is sent to O1 and O2.

    - When I1 (Main Piece) is open and I2 (Left In) is open, S9 is lit.
    - When I1 (Main Piece) is open and I2 (Left In) is closed, S8 is lit.

    - When I1 (Main Piece) is open and I3 (Right In) is open, S3 is lit.
    - When I1 (Main Piece) is open and I3 (Right In) is closed, S4 is lit.

    - When I1 (Main Piece) is closed, S2 and S7 is lit and all other LEDs are turned off.

    As of now, the model is working in iCircuit.

    What I would need your help with:
    - I can't get my brain around how to calculate the resistors involved with this operation. I understand (somewhat) Ohms Law, but I fail in getting the I values and thus the right resistor values.

    - The same goes for the resistors to the transistors.

    - I1 (Main Piece) should not be manually controlled. I have a circuit with a flow of 12-19VAC and it should be closed when there is current and open when no current is present.
    Do you have any ideas for this detection and can it be done without interfering with controlling current?

    - I2 (Left In) and I3 (Right In) should be controlled by a similar module and will be connected to O1 (Left Out) and O2 (Right Out). (O1 -> I3 and O2 -> I2)


    I really hope this will make a lot more sense. Of course the point is not to have you do all the math for med, I really want to learn, but when I am not as fluent in datasheet reading yet.

    Thank you for any input.


    // Jim
     
  8. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Without commenting on the logic, two immediate problems:

    The 7402 TTL gate can only operate on regulated 5Vdc. Why not use CMOS that will operate on 12Vdc?

    Each LED needs to have a current limiting resistor in series with it, otherwise you will vaporize it.

    You can get most modern LEDs to light brightly with less than 5mA flowing through them. Why do you need the NPN switching transistors?

    Can you present which LED is to turn on as a function of which switch is closed in the form of a truth table? That would help us help you...
     
  9. ejim

    Thread Starter New Member

    Nov 3, 2013
    8
    0
    Thank you for your response.

    The only reason for this is that it is what I have available.
    I am not opposed to ordering other, they are quite cheap, but would it be difficult to make it work?

    Ah, of course. This is an oversight on my part because it is already built-in into the signal that I am using. I will rectify this in coming schematics to ensure clarity.

    Do you mean that I could connect them directly to the output of the IC?
    Unfortunately this is not possible because the signals that I am using have common anode (is this correct, + side?) with a resistor and four separate cathodes (- side?). This is why I have been using a transistor on each cathode (- side).

    I thought you would never ask. :) Please find the attached image.

    Also, I found a lot (!) of errors in the previous description. I am sorry about this but can't find any way to edit the post. I hope it all checks out now, maybe I didn't get enough sleep tonight.

    Thanks!
     
  10. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Something wrong with O1 and O2. Shouldn't they be mutually exclusive?
     
  11. ejim

    Thread Starter New Member

    Nov 3, 2013
    8
    0
    No, the should both send a signal when I1 is active.
     
  12. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Ok, then they are not two separate distinct outputs. Rather there is only one output, O1 which happens to be wired to two different circuits...
     
  13. ejim

    Thread Starter New Member

    Nov 3, 2013
    8
    0
    True, but it serves as a reminder for myself.
     
  14. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Another question. Your LED assemblies? Does each LED have its own resistor, i.e. are there four resistors in each assembly?

    If there is only one, then you cannot have two LEDs on at once.
     
  15. ejim

    Thread Starter New Member

    Nov 3, 2013
    8
    0
    This has confused me too. Yes, there is only one resistor and I have noticed a significant change in the light strength whenever two LEDs are on at the same time.

    I put this on the lower part of the todo-list however since I guessed that if the signal works with one LED lit, it should work with two LEDs lit.

    But if it is an easy fix, then I am all for it.

    This is the signal:
    http://www.jeco.se/product.asp?qsLang=swe&type=2&id=902&pid=JE92005

    The description is in Swedish but the have a link to Google Translate. It is not too well translated though.

    The manuals that are linked are specific for a digital decoder that you are supposed to use but I thought to try myself.

    Again, thank you for your time and effort. I am reading through a lot of materials at the same time but there seems to be a dot or two that I am currently not connecting.
     
  16. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    So here is my hack at it. The three switches create the logic inputs I1, I2, I3.

    The cathodes of LEDs S3, S4, S8, & S9 are driven low directly by the NAND gates.
    The cathodes of LEDs S2 and S7 and S1 and S6 are driven low by the INV buffers

    The quad NAND and hex INV packages are powered from 12Vdc (not shown)

    The traces are scaled so that they are to be multiplied by 20 (i.e. they are ~12V high)
     
    Last edited: Nov 19, 2013
  17. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Unfortunately, if one resistor is shared by the four LEDs, then they will get dimmer when two light up, dimmer still when the third tries to light...

    If the LEDs are different colors, then the second may cause the first to go out, or the second will not light at all because of the different forward drop on different colors.
     
  18. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Oh, and by the way! To get the 12V supply, you will have to regulate the output of the full-wave bridge and capacitor we talked about at the beginning of this thread. The CMOS gates may not tolerate 17V...
     
  19. ejim

    Thread Starter New Member

    Nov 3, 2013
    8
    0
    Thank you for your help.
    I did not immediately understand everything, but I'm working on it.
     
Loading...