1
\$\begingroup\$

I am building a serial interface for a GPS module. This interface will have a "traditional" DB-9 connection, a USB-to-serial connection and a 5.5V power input. The GPS module will be in a separate enclosure some distance away.

I had considered designing this totally for USB, but it is for my server at home that has more unused COM ports than USB ports so I will design the serial interface around the MAX232.

Now my question about power: I could power the GPS module from USB with an FTDI Friend, and I have. But I'm more comfortable running it from a wall-wart, and if I connect it by DB-9 serial, I have to power it that way. I want to incorporate both the USB module and the DB-9, leaving it up to circumstance depending on where I use this.

I'd thought of using a 4066 switch to some LED's to indicate the state of the interface for troubleshooting (TxD, RxD and PPS) and I'm wondering if the 4066 is feasible for switching power inputs.

The USB module (an EM-406A) draws about 50 mA (rounded up from the datasheet value 44 mA.)

I would have the 4066 control pin connected to my 5.5V power inlet (where the wall-wart is connected) and controlling the +5V from the USB module. It would (or rather, I intend it to) shut off the +5V from the USB.

Is this feasible?

\$\endgroup\$
7
\$\begingroup\$

If you check the datasheet you'll see that the CD4066 has a rather high on-resistance. For instance, at 5V this is typical 470 ohm, maximum 1050 ohm (TI version). This is too much to switch any amount of current beyond something like 1 mA.
BTW, always design for worst case conditions, here the maximum value of 1050 ohm.

\$\endgroup\$
  • \$\begingroup\$ National's CD4066 (members.shaw.ca/roma/4066.pdf) has a typical on-resistance of only 270 ohm, maximum however is the same. You can substantially decrease the on-resistance by using a higher Vdd. \$\endgroup\$ – Federico Russo Jun 3 '11 at 16:51
  • \$\begingroup\$ OK, thought as much. I'm thinking, since I want to complete this sooner rather than later, of just building two computer-side interface boxes; one implementing serial and the other with just the USB board. I'd drive the LED's with BJT's as I have a million 2N2222's around and not worry about power switching. Thanks. \$\endgroup\$ – dmoisan Jun 4 '11 at 13:49
1
\$\begingroup\$

You're better off powering the LED's with open-collector inverters/buffers if you wanted to keep it simple.

The classic way to do this is the 7405.Like this

\$\endgroup\$
  • 1
    \$\begingroup\$ The maximum low level output current for the 7405 is only 16 mA. I thought the 74HC05 would be somewhat better (having MOSFET output instead of BJT), but that's also maximum 25 mA. May or may not be enough for the LEDs. An ULN2803 may be more appropriate. \$\endgroup\$ – stevenvh Jun 3 '11 at 17:53
  • \$\begingroup\$ Depends on the LED. High-bright red's are day-time visible even at 16 mA. \$\endgroup\$ – Toybuilder Jun 3 '11 at 18:49
  • \$\begingroup\$ BTW, I agree, the ULN2803's are probably better. \$\endgroup\$ – Toybuilder Jun 3 '11 at 18:56
  • 1
    \$\begingroup\$ I'll drive the LED's with transistors. Actually, I can probably get away with just driving them directly from the TTL--they're just small red LEDs for diagnostics. I read a project online where someone drove an LED off the 1 PPS line from a GPS and was told he should use a transistor to control the jitter; however, the jitter component from the GPS swamps any that can come from the transistor. I like elegance but I also like not having parts in my shop waiting for the "right" way to use them. \$\endgroup\$ – dmoisan Jun 4 '11 at 13:53
0
\$\begingroup\$

One way to answer these questions is to simulate the 4066 part under the working conditions you have in mind. I demonstrate how to use LTspice to simulate the CD4066 part. Similar parts can be simulated with a change in the SPICE subcircuit. I demonstrate how this can be done in my write-up here: http://www.embeddedcomponents.com/blogs/2011/12/cd4066-ltspice-simulation/

\$\endgroup\$
  • 2
    \$\begingroup\$ I disagree. Simulation is for verifying your design, not for creating it. First you design from knowledge, experience, and information like you find in datasheets. Only then you start to simulate. \$\endgroup\$ – stevenvh Apr 14 '12 at 16:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.