Will A be low unless the switch is closed?

AlbertHall

Joined Jun 4, 2014
9,281
And it depends what it is connected to. If it only connects to a high resistance to GND, e.g. a voltmeter, it will be high regardless of the switch position.
 

Thread Starter

akeepan

Joined Feb 24, 2020
9
And it depends what it is connected to. If it only connects to a high resistance to GND, e.g. a voltmeter, it will be high regardless of the switch position.
Welcome to AAC!

What is A connected to?
A is high in either case based on the way you have drawn the diagram.
SIM800L-GSM-Module-Pinout.pngIts connected to the DTR (pin 11) of this module and it puts the module in sleep when high and wakes it when low. I have attached the datasheet and pages 17,28,29,30 contains the information.
 

Attachments

AlbertHall

Joined Jun 4, 2014
9,281
So far as I can see this datasheet gives no information at all about the current that the DTR pin will source or sink so your question is not answerable.
 

Thread Starter

akeepan

Joined Feb 24, 2020
9
So far as I can see this datasheet gives no information at all about the current that the DTR pin will source or sink so your question is not answerable.
if 0V is considered as LOW will it be ok to remove the resistor connected in parallel to switch in order for the circuit to provide high when the switch is closed and low when open
 

AlbertHall

Joined Jun 4, 2014
9,281
With the switch closed, A will be high, but from the datasheet we have no idea what DTR will be when not connected.
Do you have this module? Can you connect it to power and measure the voltage on DTR?
 

AnalogKid

Joined Aug 1, 2013
8,304
Read.

DTR is a UART control pin. It is an input. It responds to TTL-ish transition levels, BUT NOTE the max input voltage limit on page 30. The voltage ranges for logic 0 and 1 are given on page 30. As stated on page 28, pull this pin low for 50 ms to activate the UART. The input current for I/O and control pins is not given, but the input currents for two specific peripherals are 1 uA and 3 uA. From this it is safe to assume that this is a CMOS part with typical CMOS input currents.

The circuit in post #1 will not do what you want. As stated above, A will be low in both switch states. Also, 5 V will damage the device. If the control circuit is powered by 5 V, there are interface circuits on page 32.

If the DTR input does not have a pullup device on it (current source or resistor), the input voltage will be very difficult to read accurately.

To get the functionality you want, connect a 100K resistor from the DTR input pin to GND, and measure the voltage at the pin. If it is below 0.3 V, OK. If it is higher, decrease the resistor value until it is below 0.3 V. Connect the switch between the DTR input pin and a positive voltage source between 2.5 V and 2.8 V.

ak
 
Last edited:

Thread Starter

akeepan

Joined Feb 24, 2020
9
Read.

DTR is a UART control pin. It is an input. It responds to TTL-ish transition levels, BUT NOTE the max input voltage limit on page 30. The voltage ranges for logic 0 and 1 are given on page 30. As stated on page 28, pull this pin low for 50 ms to activate the UART. The input current for I/O and interface pins is not given, but the input currents for two specific peripherals are 1 uA and 3 uA. From this it is safe to assume that this is a CMOS part with typical CMOS input currents.

The circuit in post #1 will not do what you want. As stated above, A will be low in both switch states. Also, 5 V will damage the device. If the control circuit is powered by 5 V, there are interface circuits on page 32.

If the DTR input does not have a pullup device on it (current source or resistor), the input voltage will be very difficult to read accurately.

To get the functionality you want, connect a 100K resistor from the DTR input pin to GND, and measure the voltage at the pin. If it is below 0.3 V, OK. If it is higher, decrease the resistor value until it is below 0.3 V. Connect the switch between the DTR input pin and a positive voltage source between 2.5 V and 2.8 V.

ak
Thank You for your answer. will try this
 

djsfantasi

Joined Apr 11, 2010
6,142
Here is the circuit described above. If the push button is not depressed, the DTR pin is low. When the push button is pressed, DTR goes high, with some bounce.

To reverse the input (DTR is held high until the push button is pressed), reverse the ground and Vcc connections.

This is called a pull down resistor (or pull up).

I typically use a 10k resistor. But others have calculated 100k as specific to your application.
7118A61E-A141-4E8B-A9A4-57EBB0BC93E0.jpeg
 

Thread Starter

akeepan

Joined Feb 24, 2020
9
Here is the circuit described above. If the push button is not depressed, the DTR pin is low. When the push button is pressed, DTR goes high, with some bounce.

To reverse the input (DTR is held high until the push button is pressed), reverse the ground and Vcc connections.

This is called a pull down resistor (or pull up).

I typically use a 10k resistor. But others have calculated 100k as specific to your application.
View attachment 199951
Thank You Dj
 
Top