Community discussions

MikroTik App
 
wojrep
newbie
Topic Author
Posts: 42
Joined: Thu Apr 07, 2005 12:27 pm

KNOT and GPIO

Mon Jun 28, 2021 2:53 pm

I wanted to use the KNOT to monitor the opening of the rack cabinet door.
But I have a problem.

The GPIO connector has no VDC pin.
The documentation does not provide any information on how to specify the VDC, where to get it, and what parameters it should have.
 
msatter
Forum Guru
Forum Guru
Posts: 2941
Joined: Tue Feb 18, 2014 12:56 am
Location: Netherlands / Nīderlande

Re: KNOT and GPIO

Mon Jun 28, 2021 6:37 pm

Is there a USB connecter that can donate 5 V DC?
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12554
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: KNOT and GPIO

Mon Jun 28, 2021 6:38 pm

Yes. Micro USB B

Image
 
wojrep
newbie
Topic Author
Posts: 42
Joined: Thu Apr 07, 2005 12:27 pm

Re: KNOT and GPIO

Mon Jun 28, 2021 7:22 pm

This is an idea, unfortunately a very poor idea.

In my opinion it doesn't solve the problem completely, you will have to make a cobweb of cables ...
ugly solution.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12554
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: KNOT and GPIO

Mon Jun 28, 2021 7:29 pm

I wanted to use the KNOT to monitor the opening of the rack cabinet door.

DC Source can be the same +VDC used for power the KNOT, must be used one adequate resistency of XXX Ohm to drop the +VDC to close 3V

For example, if powered at 24V, 70MΩ, and one resistor of 10MΩ from "green dot" to -VDC/Ground


Image
 
wojrep
newbie
Topic Author
Posts: 42
Joined: Thu Apr 07, 2005 12:27 pm

Re: KNOT and GPIO

Fri Jul 02, 2021 2:01 pm

Everything is nice ... but the KNOT is powered by a factory power supply, it probably gives 24V and:
a) no lead, you have to solder to the main PCB or break the power supply cable - both solutions are very ugly.
b) how do I know that it is supposed to be 3V and not 5V or a different voltage? This information is not available in the Mikrotik documentation.
 
marekm
Member
Member
Posts: 416
Joined: Tue Feb 01, 2011 11:27 pm

Re: KNOT and GPIO

Fri Jul 02, 2021 2:40 pm

What logic state does the GPIO pin read when not connected to anything? It may (or may not, haven't found anything about this in the manual) have a built-in pull-up resistor.
If there is none (or there is a pull-down), just a thought - cabinet open detection could be done by a small photovoltaic cell connected to the GPIO input and ground, no voltage when it's dark inside, current needed to drive a GPIO input is small so it doesn't have to be large/expensive. Wouldn't work if the cabinet is open in the dark (or when the door has a transparent window), of course.
Last edited by marekm on Fri Jul 02, 2021 2:48 pm, edited 1 time in total.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12554
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: KNOT and GPIO

Fri Jul 02, 2021 2:47 pm

Whit all the light inside a rack, like Christmas tree, where you find the dark? :))))
 
marekm
Member
Member
Posts: 416
Joined: Tue Feb 01, 2011 11:27 pm

Re: KNOT and GPIO

Fri Jul 02, 2021 2:56 pm

Whit all the light inside a rack, like Christmas tree, where you find the dark? :))))
It depends how you place that photovoltaic cell inside, it could be covered by the closed door. Some black adhesive tape may help too :)
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12554
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: KNOT and GPIO

Fri Jul 02, 2021 3:05 pm

Nice, true...
 
toxicfusion
Member
Member
Posts: 324
Joined: Mon Jan 14, 2013 6:02 pm

Re: KNOT and GPIO

Sat Jul 03, 2021 7:10 am

@OP

Why want to power via USB? If placed in a datacenter environment, have many power options.

1) power via eth1 via PoE in
2) Power via supplied power adapter.
3) can even cut power adapter, splice on an ethernet cable pair and run longer power wire.

If placing KNOT on TOP of rack(s) -- ethernet cable still suffice..

Most Datacenters have biometric entry + CCTV to monitor and log people ingress/egress.

Pretty cool solution to use KNOT to monitor rack door opening. Could be used to LOG entry & close to timestamp billable hours or to further pinpoint when technician started work,etc. etc.
 
sensorhost
just joined
Posts: 1
Joined: Wed Jul 07, 2021 3:34 pm

Re: KNOT and GPIO

Wed Jul 07, 2021 3:42 pm

I would also like to find some technical details on the GPIO and the two analog inputs. Searched all the available documentation with no helpful results.

For a digital input, what is the valid voltage range for a digital zero and a digital one?
This is hardware specific, digital zero would normally be zero volts but digital one can't just be guessed, MikroTik need to provide some information here as applying the incorrect voltage will most likely damage the product.

For the analog inputs, what is the allowable voltage range and what is the measurement resolution?
Also the input impedance and some more technical ADC details would be needed to be able to use this correctly.

I am an electronics hardware engineer designing electronic products and don't understand how such a feature has no specifications. Was about to hit the buy now button but will wait until I can find this info.
 
Wyz4k
Member Candidate
Member Candidate
Posts: 243
Joined: Fri Jul 10, 2009 10:23 am

Re: KNOT and GPIO

Wed Aug 11, 2021 10:55 am

Some if not all of those answers are available here: https://help.mikrotik.com/docs/pages/vi ... d=41680915
note: Analog input voltage is 0-60 V. Theoretical resolution is 4 mV (14bit ADC). Analog input impedance is approximately 72K Ohm.
note: Digital input voltage is 0-2.5 V max. To receive a logical "0" on the pin, the voltage should be between 0-0.3 V. To receive a logical "1" on the pin, the voltage should be between 0.7-2.5 V.
 
gadam
just joined
Posts: 7
Joined: Wed Aug 11, 2021 4:58 pm

Re: KNOT and GPIO

Wed Aug 11, 2021 5:05 pm

Hi All,

Was anyone successful with the KNOT GPIO - I have not found either docs about how to get/set the GPIO, neither any option in the system (including latest testing) that would relate to it. I am a bit confused since this RB is advertised as one with GPIO to use ...

Regards,
Adam
 
Wyz4k
Member Candidate
Member Candidate
Posts: 243
Joined: Fri Jul 10, 2009 10:23 am

Re: KNOT and GPIO

Thu Aug 12, 2021 4:30 am

 
gadam
just joined
Posts: 7
Joined: Wed Aug 11, 2021 4:58 pm

Re: KNOT and GPIO

Thu Aug 12, 2021 2:22 pm

Thank you very much :)
Kind regards,
Adam
 
gadam
just joined
Posts: 7
Joined: Wed Aug 11, 2021 4:58 pm

Re: KNOT and GPIO

Fri Aug 13, 2021 7:14 pm

Hi All,

I seem to have some issue with the KNOT GPIO, I hope someone might help. I'm not sure if the there is a bug in the ROS, faulty board or the docummented thresholds of the Digital Input (Digital input voltage is 0-2.5 V max. To receive a logical "0" on the pin, the voltage should be between 0-0.3 V. To receive a logical "1" on the pin, the voltage should be between 0.7-2.5 V.) but it seems the Input does not react to the voltage. I have single cell battery connected between pin1 (negative) and pins 2, 3, 5 (positive), the analog pins read the voltage, the digital is always 0. I have tried the testing and stable branch - stable does not read analog, please see below:
===

# jan/02/1970 01:33:07 by RouterOS 6.49beta54
#
# model = RB924i-2nD-BT5&BG77

[admin@MikroTik] /iot gpio> analog print
 # NAME                                                        VALUE       OFFSET
 0 pin2                                                       1215mV          0mV
 1 pin3                                                       1264mV          0mV
[admin@MikroTik] /iot gpio> digital print
Flags: X - disabled 
 #   NAME                      DIRECTION OUTPUT INPUT SCRIPT                     
 0   pin5                      input     0      0    
 1   pin4                      output    0     
 2   pin6                      output    0     
[admin@MikroTik] /iot gpio> 

===

# jan/02/1970 01:47:32 by RouterOS 6.48.3
#
# model = RB924i-2nD-BT5&BG77

[admin@MikroTik] /system gpio> print
Flags: X - disabled 
 #   NAME                      DIRECTION OUTPUT INPUT SCRIPT                     
 0   pin5                      input     0      0    
 1   pin4                      output    0     
 2   pin6                      output    0     
[admin@MikroTik] /system gpio> 

===
Any idea?

Kind regards,
Adam
 
gadam
just joined
Posts: 7
Joined: Wed Aug 11, 2021 4:58 pm

Re: KNOT and GPIO

Tue Aug 31, 2021 4:09 pm

Just in case someone else would be stuck with the digital input not working, there is update from Mikrotik:

"We have retested and revised the manual regarding the RB924i-2nD GPIO specs:

note: Digital input voltage is 0-2.5 V max.

Without PCB pull-up resistor:

to receive a logical "0" on the pin, the voltage should be between 0-1.47 V;
to receive a logical "1" on the pin, the voltage should be between 1.48-2.5 V.
With PCB pull-up resistor:

to receive a logical "0" on the pin, the voltage should be between 0-1.34 V;
to receive a logical "1" on the pin, the voltage should be between 1.35-2.5 V."

I have not yet tested it but sounds very promising.

Kind regards,
Adam
 
SH4N
just joined
Posts: 1
Joined: Thu Aug 01, 2024 9:12 am

Re: KNOT and GPIO

Thu Aug 01, 2024 9:19 am

Hello,

I am having major issues with the digital input. For the most part, it works, but unfortunately not reliably. This means the contact is closed, and after every fifth query, the GPIO port goes back to LOW. I have also adjusted the PCP and set it exactly to 2.5V, but unfortunately, it is still unusable. Is there anyone who uses this reliably?

Who is online

Users browsing this forum: tornadoro and 8 guests