Voltage on Input

Moderators: TomKerekes, dynomotion

Post Reply
AlexD85
Posts: 4
Joined: Sun Oct 07, 2018 6:30 pm

Voltage on Input

Post by AlexD85 » Tue Jan 29, 2019 10:34 pm

Hi
Maybe it's a dumb question, but I've spent 2 evenings trying to solve it. After some manipulations with "smooth mpg" programs IO0 pin has 3.3v on it, though It's configured as Input, both in INIT program and via command in console. At IO screen it has the checkbox 'state' checked, as shown in attached screenshot. Before messing with MPG (by the way I could'nt configure it properly) IO0 was an input for Z home sensor and worked well. I've tried 'SetBitDirection', "SetBit, 'ClearBit', even "ClearBitBuf' - still no luck.... And last but not least - now IO0 and IO1 work in pair - for example if I check the box 'output' for IO0 it gets checked for IO1 automatically. What could be the problem?
Attachments
kflop (1).jpg

User avatar
TomKerekes
Posts: 516
Joined: Mon Dec 04, 2017 1:49 am

Re: Voltage on Input

Post by TomKerekes » Wed Jan 30, 2019 1:03 am

Hi AlexD85,

That is probably normal. KFLOP inputs have very high impedance (meg-ohms) so an input not connected to anything can float to any voltage. Also there can be some small parasitic capacitance between traces on the board or wires in your cable that may cause one signal to change if an adjacent signal changes if the first signal is floating and undriven. An input should only be considered meaningful if it is connected to something that drives the pin high or low.

To test the inputs connect them through something like a 1K ohm resistor to either GND or +3.3V. The measured input voltage using a voltmeter should measure within several tenths of a volt to what it is connected to and the Digital IO Screen should change appropriately. Driving both inputs at the same time, to all 4 possible states, should work correctly.

HTH
Regards,

Tom Kerekes
Dynomotion, Inc.

AlexD85
Posts: 4
Joined: Sun Oct 07, 2018 6:30 pm

Re: Voltage on Input

Post by AlexD85 » Wed Jan 30, 2019 11:09 am

Hi Tom
Thanks for your reply. The problem is that this input IS connected via optocoupler board to Z Home proximity sensor (NPN), and when I try home Z, Kfop sees 'high' on input and zeroes the axis right in the place. Another strange behaviour is when I check the box 'output' on DigitalIO screen for IO0, checkboxes 'state' is deactivated both for IO0 and IO1, is it normal?

User avatar
TomKerekes
Posts: 516
Joined: Mon Dec 04, 2017 1:49 am

Re: Voltage on Input

Post by TomKerekes » Thu Jan 31, 2019 5:57 pm

Hi AlexD85,
Thanks for your reply. The problem is that this input IS connected via optocoupler board to Z Home proximity sensor (NPN), and when I try home Z, Kfop sees 'high' on input and zeroes the axis right in the place.
Well a normal open-collector type of NPN output will only drive the pin low and not high. When not being driven low it may float to any level and report any state. But that problem would result in the state being low when it should be high not what you describe. Although it also depends on how you have the sensor wired. Please check the KFLOP inputs for correct operation with the test I described in my previous email. That will help isolate whether the KFLOP inputs have a problem or if the way you are driving them is a problem.
Another strange behaviour is when I check the box 'output' on DigitalIO screen for IO0, checkboxes 'state' is deactivated both for IO0 and IO1, is it normal?
As I tried to describe this may be normal if the inputs are not being driven properly high and low.
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply