Electronics > Projects, Designs, and Technical Stuff
Normally on electronic switch
gaminn:
Hi,
I have an USB device that will be connected to a smartphone. The device can be powered by a smartphone (OTG) and there is also jack connector to supply external power to the device.
The ID pin of USB cable will be controlled by the USB device to tell the smartphone whether it should supply USB power or not.
Normally, when the device is without power, the ID pin must be shorted to ground. So, when the device is connected to the smartphone it gets 5V.
Also, there can be external power connected to the device. In this situation, the device will short the ID pin to ground with e.g. 10 kOhm resistor. This will tell the smartphone, when the device is connected to it, that it should not supply 5V to the USB, instead, it can charge from 5 V supplied by the device.
So, I'm looking for a switch that is normally (without any power) shorted to ground, but when there is a power, it can be controlled (to connect some resistor to ground).
I don't want to use mechanical relay.
Mr. Scram:
I'm still not sure what you want to use the switch for. Switch the inputs? Maybe you'd want to look at how something like an Arduino switches between USB and external power.
Berni:
Things like a JFET or depletion mode MOSFET are conducting when there is no voltage on the gate but stop conducting once voltage is applied. Tho you might need negative voltages to make it work.
gaminn:
--- Quote from: Mr. Scram on August 14, 2019, 08:29:50 am ---I'm still not sure what you want to use the switch for. Switch the inputs? Maybe you'd want to look at how something like an Arduino switches between USB and external power.
--- End quote ---
I want to switch ID pin (it is one pin of USB connector) to:
1) when there is no power, it is connected to ground.
2) when there is power, there is a resistor connected between ID pin and ground.
There is MCU in my device, so the switch will be controlled by MCU.
gaminn:
--- Quote from: Berni on August 14, 2019, 08:34:15 am ---Things like a JFET or depletion mode MOSFET are conducting when there is no voltage on the gate but stop conducting once voltage is applied. Tho you might need negative voltages to make it work.
--- End quote ---
I found JFETs that have like 30 ohms rdson, which is more than what I expect from "connected to ground". And also the negative voltage means I have to solder another IC on the board. But yes, it is the best solution I have at the moment.
Navigation
[0] Message Index
[#] Next page
Go to full version