Shop OBEX P1 Docs P2 Docs Learn Events
Circuit question — Parallax Forums

Circuit question

mynet43mynet43 Posts: 644
edited 2011-06-13 07:46 in Propeller 1
I have a signal line that's pulled up to 14V with a 10K resistor.

I need to control this signal with a 3.3V propeller pin.

What's the easiest way to pull this up and down without hurting the Propeller?

Thank you for your help.

Jim

Comments

  • Mark_TMark_T Posts: 1,981
    edited 2011-06-12 18:14
    An NPN transistor? 10k resistor from Prop pin to base of transistor, emitter to gnd, collector to the signal line...
  • mynet43mynet43 Posts: 644
    edited 2011-06-12 18:24
    Thanks for the quick reply,

    The NPN sounds like it should work. Is the 10K resistor enough to drive the transistor? I suppose I could use a 1K if I needed to.

    Thanks again.

    Jim
  • Mark_TMark_T Posts: 1,981
    edited 2011-06-12 18:32
    If the 10k pullup to 14V is the only load on the signal line, yes 10k on the base will be fine even if its a very low-gain transistor. Divide the max collector current by the minimum guaranteed current gain of the transistor - that's the current the base needs - now double this to ensure saturation, then calculate the base resistor
  • Mike GMike G Posts: 2,702
    edited 2011-06-12 18:36
    The circuit suggested by Mark_T is a transistor switch. A small base current from a prop pin closes the switch and allow current to flow from the 14V source through the collector- emitter to ground. I'm not sure if this is good circuit for your application. Are you trying to convert 14V to 3.3V or control a 14V signal line?
  • jeff-ojeff-o Posts: 181
    edited 2011-06-12 18:50
    I'd suggest a logic-level MOSFET. It can be controlled directly by the propeller, and can switch very high currents without a problem.
  • mynet43mynet43 Posts: 644
    edited 2011-06-12 18:56
    Hi Mark and Mike,

    I think Mark's circuit is probably OK. I'm trying to control the 14V signal, by pulling it to ground or leaving it high.

    It's an AC motor control box, and the signal starts or stops the motor.

    It looks like the transistor should do that. Let me know if you think there's a better way.

    Thank you for the help and support.

    Jim
  • mynet43mynet43 Posts: 644
    edited 2011-06-12 18:59
    Hi Jeff,

    I like the idea of a mosfet. I know I can get transistor arrays, can I also get mosfet arrays? I have several signals to control, and I'd rather not mount a bunch of parts.

    Thanks for all the help.

    Jim
  • Mike GMike G Posts: 2,702
    edited 2011-06-12 19:10
    Jim, a mosfet is a voltage controlled device and a bipolar transistor is a current controlled device. Both devises have their place depending on demands.

    It's difficult to make a recommendation without knowing more about the hardware you're trying to interface.
  • mynet43mynet43 Posts: 644
    edited 2011-06-12 19:43
    I checked a little. The transistor array is readily available, such as the Fairchild MMPQ3904, quad. Mosfet arrays are not as available, are more expensive, and it's hard to find ones with a high enough drain to source voltage, most are only a little over 10V.

    Right now I don't see any reason the NPN won't work. I'm just trying to pull a 14V input line to ground. There's a common ground between the Prop and the motor control box.

    Can you think of any reason this shouldn't work?

    Thanks for all the great feedback!

    Jim
  • mynet43mynet43 Posts: 644
    edited 2011-06-12 20:39
    Here's a copy of the schematic, with the transistor.

    Let me know if you have any feedback.

    Thanks!

    Jim
  • kwinnkwinn Posts: 8,697
    edited 2011-06-12 21:11
    Just about any npn small signal transistor (2n3904, 2n2222, etc) should work.
  • StefanL38StefanL38 Posts: 2,292
    edited 2011-06-12 23:52
    From the schematic you attached it is not clear what is the inner circuit of the motor-control
    the question that has to be answered is: what does the motor-control with the 14V?

    how much current is flowing?

    as long as this question is not answered it doesn't make sense to think about transistor or MOS-FET.

    further questions:
    does the 14V drive a relay with a coil?

    does the 14V drive a solid state relay?

    does the 14V drive the input of an optocoupler?

    best regards

    Stefan
  • mynet43mynet43 Posts: 644
    edited 2011-06-13 05:28
    Stefan,

    I think I answered your question above. The line to the motor control box is just a negative true signal line, pulled up to 14V by a 10K resistor. There is no load except the resistor.

    With this, I don't see why the transistor won't work fine.

    Am I missing something?

    I really need this to work, so I really appreciate the feedback.

    Thanks!

    Jim
  • RaymanRayman Posts: 14,876
    edited 2011-06-13 06:25
    I also think a transistor is a good choice.

    But, I'd probably use an opto-isolated transistor, just to avoid the possibility of surges coming back to the Prop from the controller...
  • Mike GMike G Posts: 2,702
    edited 2011-06-13 06:40
    Where does the 14V come from? There's a 10K resistor that connects pin 23 to the transistor base. The collector is connected to pin 1 [mot start/stop] and the emitter is connected to ground. Basically, pin 1 [mot start/stop] is connected to an open collector when the transistor is not conducting (low on pin 23). Otherwise, pin 1 [mot start/stop] is connected to ground when the transistor is conducting (high pin 23).
  • mynet43mynet43 Posts: 644
    edited 2011-06-13 07:46
    Hi Mike,

    Thanks for getting involved in this discussion. I want to get it right.

    I probably didn't make it clear about the 14V and pullup. The user's manual for the motor control specifies to ground this pin to make the motor start.

    I derived the pull-up value from the following measurements. I measured the open circuit voltage of the motor control line, when nothing is connected. It's 14V. With the meter still connected, I then connected an ammeter between the line and ground. With this connected, the line was pulled down to about 0.1V, and the measured current was about 0.0014A. Using ohm's law tells me the pull-up resistor has to be 10K (14V/0.0014A).

    So the answer to your question is, that the line is internally pulled up with a 10K resistor, inside of the motor control box. I hope this helps.

    Thanks for all the great feedback!

    Jim
Sign In or Register to comment.