Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

microcontroller cannot drive pin low

Status
Not open for further replies.

jimkess

Member level 4
Joined
Dec 22, 2016
Messages
76
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
650
hi,

i have a situation, where a device is connected to a micrcontroller(PIC) via only one pin. The microcontroller should drive this device pin low. When the pin of the device gets low a LED indicator of the device should blink. However when i send low(for a while) the LED does not blink.

but when i connect the device pin directly to ground a LED blinks.

any idea why this is happening and how can I solve?
 

Hi,

ONE pin/wire is impossible.
Every current needs it's return path.
Every signal voltage needs it's voltage reference signal.

You need at least a se ond connection. Usually GND.
It is simple to verify with a voltmeter.

If there are any doubts ... send a picture/schematic...

Klaus
 

hello,

... where a device is connected to a micrcontroller(PIC) via only one pin.

Are you talking about an 0.W.S. device ?
(One Wire Sensor)

Even in this case , need also to link MCU Gnd to Device Gnd
so at least 2 wires ..not ONE !

In all mode of data transmission
RS232, I2C, SPI ...
very ofen, talk about GND is discarded ..
because too much evident ! with electronic point of vue .
 

no, no,no the ground is there, of course ground is there, i just meant one wire to mean one important signal line. i should have been specific
 

Hi,

And again: what does the voltmeter show?
Directely at the device GND and the device signal.

Maybe a bad solder joint?

Klaus
 

hi,

i have a situation, where a device is connected to a micrcontroller(PIC) via only one pin. The microcontroller should drive this device pin low. When the pin of the device gets low a LED indicator of the device should blink. However when i send low(for a while) the LED does not blink.

but when i connect the device pin directly to ground a LED blinks.

any idea why this is happening and how can I solve?

just try adding a pull-up resistor or pull down resistor to the concern pin
 

Hi,

And again: what does the voltmeter show?
Directely at the device GND and the device signal.

Maybe a bad solder joint?

Klaus

actually i had already tested this before asking here. the voltmeter shows correct, when the pin is driven low it shows 0 wrt to ground.

- - - Updated - - -

just try adding a pull-up resistor or pull down resistor to the concern pin
i have a pulldown resistor. actually the microcontroller sends low successfully and the pin reads 0 when measured. but somehow, the device does not accept this low. the device however accepts the low from direct ground connection.

the low signal is used to drive the device into command mode. when this command mode pin is grounded it enters into command mode. but when i apply low signal from the microcontroller the device does not enter the command mode. the led blink indicates the command mode.
 

actually i had already tested this before asking here. the voltmeter shows correct, when the pin is driven low it shows 0 wrt to ground.

- - - Updated - - -


i have a pulldown resistor. actually the microcontroller sends low successfully and the pin reads 0 when measured. but somehow, the device does not accept this low. the device however accepts the low from direct ground connection.

the low signal is used to drive the device into command mode. when this command mode pin is grounded it enters into command mode. but when i apply low signal from the microcontroller the device does not enter the command mode. the led blink indicates the command mode.

in this case you need to use transistor BC547 to drive your command pin low to ground.
 

@ KlausST,
i tested again the line voltage and it is 4mV between line and ground. but this level is considered low. please see attached picture.

@gauravkothari23,
as i have come to know i incorrectly said that i have a pulldown resistor. i didn't see that you meant a pulldown/pullup resistor on the cmd signal line. i have pulldown resistor connecting to a switch which is used to put the cmd signal low on pin 12 of the micro(attached picture) which i meant to say.

i didn't understand why a pullup or pulldown resistor on the signal line could do the job. although the signal line micro pin is output and low in the default, i have configured it as output and high. also i didn't understand how i can put transistor to put the line into logic 0 or ground. i guess with transistor it can be put to ground voltage. could u explain a bit more. perhaps tell where i have to put the transistor in the shown figure(i mean the base, emitter and collector). any additional info would be great.

any other suggestion would be helpful.

3.jpg
 

@ KlausST,
i tested again the line voltage and it is 4mV between line and ground. but this level is considered low. please see attached picture.

@gauravkothari23,
as i have come to know i incorrectly said that i have a pulldown resistor. i didn't see that you meant a pulldown/pullup resistor on the cmd signal line. i have pulldown resistor connecting to a switch which is used to put the cmd signal low on pin 12 of the micro(attached picture) which i meant to say.

i didn't understand why a pullup or pulldown resistor on the signal line could do the job. although the signal line micro pin is output and low in the default, i have configured it as output and high. also i didn't understand how i can put transistor to put the line into logic 0 or ground. i guess with transistor it can be put to ground voltage. could u explain a bit more. perhaps tell where i have to put the transistor in the shown figure(i mean the base, emitter and collector). any additional info would be great.

any other suggestion would be helpful.

View attachment 139845

Initially try using just pull down resistor to pin 12 and if not it does not work use transistor
For Transistor:
Connect a resistor of 100E to 1K between port pin 12 and Base of transistor,
Collector to Cmd line
emitter to GND
add pull up/Down resistor at port PIN 12.
If using Transistor you need to make port pin high to make your CMD line 0
 
Initially try using just pull down resistor to pin 12 and if not it does not work use transistor
For Transistor:
Connect a resistor of 100E to 1K between port pin 12 and Base of transistor,
Collector to Cmd line
emitter to GND
add pull up/Down resistor at port PIN 12.
If using Transistor you need to make port pin high to make your CMD line 0

hi gauravkothari23,

many thanks to you, the transistor solved the problem. could not make the pulldown resistor work

- - - Updated - - -

Initially try using just pull down resistor to pin 12 and if not it does not work use transistor
For Transistor:
Connect a resistor of 100E to 1K between port pin 12 and Base of transistor,
Collector to Cmd line
emitter to GND
add pull up/Down resistor at port PIN 12.
If using Transistor you need to make port pin high to make your CMD line 0

hi gauravkothari23,

many thanks to you, the transistor solved the problem. could not make the pulldown resistor work but will try again later.

but still wonder how come microcontroller could not directly put low to control the device. Microcontroller are regularly interfaced with devices and sends commands but they don't use pulldowns and transistors. can u share ur view?
 

hi gauravkothari23,

many thanks to you, the transistor solved the problem. could not make the pulldown resistor work

- - - Updated - - -



hi gauravkothari23,

many thanks to you, the transistor solved the problem. could not make the pulldown resistor work but will try again later.

but still wonder how come microcontroller could not directly put low to control the device. Microcontroller are regularly interfaced with devices and sends commands but they don't use pulldowns and transistors. can u share ur view?

Thats because the output current from the controller is quite low and the command line you need to make low might need greater current than controller can supply.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top