Critique My Design Please.

Discussion in 'The Projects Forum' started by Falcon69, Feb 16, 2014.

  1. Falcon69

    Thread Starter New Member

    Nov 11, 2013
    19
    1
    Anything wrong with my design? (PDF attachment) I'd like to know before I order up the components to build a prototype.

    The idea behind this circuit:


    • Hall Effect Switch activated by Magnet
    • Selectable Normally Open or Normally Closed
    • Dual Led, Green when powered, Switching over to Red when tripped
    • Analog SPDT switch (not mechanical) for switching between normally open or normally closed.


    Do you see any problems with this circuit?


    Wire 1 (pin 6 on the SN74) would either be connected to the power source (+5 volts) or to the ground to select which output for the analog SPDT switch.


    Basically, the power (wire 2) and ground (wire 5) will be ran from an external supply. Then the wires 3 and 4 would connect to a Breakout board output. This circuit I'd like to act on the breakout board like I had installed a Normally Open or a Normally closed mechanical switch, based on the various ways of wiring. For example, I may have 3 switches tied in series that are normally closed. If one gets disconnected or cut by accident by the machine, the machine would see the normally closed switch as an open circuit now, telling the software to shut the machine down.


    The most the circuit will see as far as amperage is maybe 100mA max I am guessing. 20mA for each LED, maybe 25mA max for the Hall Sensor.

    The components I have chosen were selected because i have VERY limited room on the small pcb board I am designing for it. The Optocouplers were the smallest I can find. They have 1.27mm footprint, whereas most others are 2.54mm. I don't have the room for the bigger kind. The two transistors (PNP/NPN) will actually be in a single case, SOT-363, BAT846BPDW1, I don't have that labeled on the schematic.


    I'd like ideas on suggestions/changes before I go blow money on components for testing. I'm a college students and funds are kinda low atm. Any help would be greatly appreciated. :)


    Thanks Guys in advance.


    Falcon
     
    Last edited: Feb 16, 2014
  2. Falcon69

    Thread Starter New Member

    Nov 11, 2013
    19
    1
    Nobody has opinions on this circuit?

    Changes, Improvements?

    I'd welcome any advice or help given.

    Thanks in advance. :)

    Falcon
     
  3. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,565
    2,379
    On the surface it seems a little overkill to achieve what seems like simple logic, presumably the machine has an E-Stop circuit of some kind, normally a small relay with a contact AND'ed in the E-stop relay or input string would do this?
    This is common practice in machine control logic.
    Max.
     
    Last edited: Feb 18, 2014
  4. TANDBERGEREN

    Member

    Jan 20, 2014
    74
    4
    The analogue relay is not necessary. You should use a pair of transistors instead.
    The power consumption of that relay is way off what You need to use a pair of transistors to do the job. Also the LED-indicators are driven far too much.
    Better use a pair high-intensive leds and drive them with just a couple milliamps.
    They also could be in series with the LED-segment in the optocouplers to save borth space and currentconsumption.
    And in the end: Simpler and fewer components means cheaper design.
    Really a win-win-situation.
     
  5. Falcon69

    Thread Starter New Member

    Nov 11, 2013
    19
    1
    Thanks Max. The problem is, these switches will also be used to home the machine as well, and I believe a relay would just be too slow in activation.
     
  6. Falcon69

    Thread Starter New Member

    Nov 11, 2013
    19
    1
    I'm not sure exactly what you mean Tandbergeren. I'm more a visual person and have to see it. There is no relay. There is however, an analog SPDT switch. the SN74LVC1G3157.

    The LED's are 15,000 MCD 3mm. The forward current on them is 20mA and the resistor values are selected to make them as bright as they can be, without going over the threshold of mA and voltage. I think the red is rated for 3.4volts and the green at 2.4 volts.

    I'm not sure what you mean by putting the LED's in series with the optocouplers. I don't see how that will work, when the green one stays on, and only turns off when the switch is tripped and the red turns on. Then goes back to green when switch is untripped.

    That analog switch can handle 100mA. This switch will be using maybe half that at any given time. So it should work, yes?

    If you say using transistors is better, I don't understand how to do this, or I am drawing a brain fart on it.

    Thanks :)
     
  7. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,565
    2,379
    It sounds as though your application is, or similar to a Mach CNC system?
    Where the same switches are used for homing as over travel.
    Relays have been used for decades in the E-stop circuits of CNC machines, if the relay is there to purely detect a wiring failure condition, it should be plenty fast enough.
    A little more on the details of the application may help.
    Max.
     
  8. Falcon69

    Thread Starter New Member

    Nov 11, 2013
    19
    1
    I could use a relay to switch between the two optocouplers then, turning either one on or off. That should not effect the digital accuracy of the Hall Effect switch.

    Is that what you are proposing is to get rid of the SPDT analog switch and replace it with a relay?

    I have not looked into it yet, but I have not much room on the board. If a relay does not come in a sot-363 package or smaller, i may not be able to fit it.
     
  9. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,565
    2,379
    14pin DIP is the smallest I have seen, maybe smaller out there, it sounds as if you require this out in the machine wiring, cannot this be used at the termination point/Break-out-board end?
    Still not sure what you are trying to achieve?
    Max.
     
  10. Falcon69

    Thread Starter New Member

    Nov 11, 2013
    19
    1
    it has to be in the switch. I want this to replace the idea of a mechanical switch, but without extra work. Just mount the switch, run wire to the breakout board, and connect.

    Ya, a 14pin dip would be way to big. My foot print on the board is 13mm x 22mm. Not much room to fit everything.
     
  11. TANDBERGEREN

    Member

    Jan 20, 2014
    74
    4
    Exactly, the SN74LVC1G3157.
    Yes ofcourse it will work, but a pair of transistors would do the trick. Simply and cheaper.
    No need for any 100mA capability there.
    The LEDs is fully capable of giving a clear light with a tenth of the current. 2mA is sufficient.

    This would also take some stress away from the HALL-switch.
    It's only capable of sinking 20mA.
    But that is only my opinion.

    And I understand now what You wanted to indicate with the LEDs. All OK.
    Two transistors would work this way: ( I am not able to load any draqwings at the moment.)
    I'll try to explain.
    One PNP and one NPN transistor
    The collector of the NPN to +5V Emitter to the top of the red cirquit.
    Base to the switching signal via a small resistor.
    The emitter of the PNP-transistor to +5V.
    The collector to the top of the green cirquit.
    The base via a resistor to the switching voltage.
    I presume the switching voltage is active driven to either +5V or to ground.
    This would do the switching between the two cirquits.

    Just my opinion.
    As asked for? :D
     
    Falcon69 likes this.
  12. Falcon69

    Thread Starter New Member

    Nov 11, 2013
    19
    1
    okay, that makes sense.

    I will see if I can find something that works for that.

    And yes, the input signal will be one of the 5 wires. It will be connected to either ground or power at the breakout board side of the switch.
     
  13. Falcon69

    Thread Starter New Member

    Nov 11, 2013
    19
    1
    So, If i understand correctly, this circuit will be better and cheaper than using the SPDT Analog switch.

    The Resistors and LED's would be substituted for what in the red and green boxes in original circuit.
     
  14. Falcon69

    Thread Starter New Member

    Nov 11, 2013
    19
    1
    I have redrawn the schematic.

    Does this look more doable now? I will need to redesign the circuit board, as this design adds two more resistors (the PNP/NPN transistors use the same size case as that SPDT analog switch did).

    I am only concerned with what is in the blue box. That is the switch. What is in gray box, is a brief circuit of two types of Breakoutboards, one of which is the G540 which uses an Optoisolator with a 2k2 pullup resistor.

    I am unsure on the resistor values, but under simulation, R4.1 at 22k ohms and R5.1 at 2k7 ohms seems to put the output of both transistors at around the same mA, depending on what wire 1 is connected to, either power or ground. Maybe I am thinking of this all wrong, and I need to reconfigure the resistor values. Or, maybe I can completely eliminate those resistors?

    All resistors will be 1/4watt 0603 case. The Capacitors will also be a 0603 case.

    Is it okay to connect the - side (wire 3) to the ground? Eliminating an unnecessary wire? It would be nice to just have 4 wires coming out. I think it would be okay, since the output of the breakout board goes through the optocoupler and then to ground anyway. The grounds of the switches, power supply, and the breakout board switch output will all be tied together. For some reason, if this is not done anyway, the Gecko G540 Breakout board acts funny.

    Falcon
     
Loading...