Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull-up for digital inputs in MAXI Automation results in low level #26

Closed
sumpfralle opened this issue Oct 22, 2018 · 15 comments
Closed

Comments

@sumpfralle
Copy link
Contributor

I am using a Controllino MAXI Automation.
I tried to use digital input pins with a configured pull-up resistor:

pinMode(SOME_PIN, INPUT_PULLUP);

But I am surprised that the pin headers of such digital inputs reach only a level of 1.3V (instead of being close to 5V). Thus I am forced to use analog inputs (with configured pull-up) and use a threshold of ca. 280 for distinguishing HIGH and LOW.

In contrast, the same setup works as expected (with a good HIGH level) with a Controllino Mini.

Is there a technical problem with the MAXI Automation devices with regard to pull-up resistors?
Or do you have an idea, what could have gone wrong with my device?

@CONTROLLINO-Support
Copy link
Member

Hello, the reason is the pull-down resistor. Please, go through this thread to get more information about CONTROLLINO inputs.

@sumpfralle
Copy link
Contributor Author

Thank you for your quick response!

Regarding #25: yes, after reading this issue again, it indeed seems to be related.

But since this was not clear in #25: is it really impossible to use INPUT_PULLUP as a pinMode in a MAXI Automation controller? If yes: is this only valid for this model?
In this case I would have really appreciated a note in the pinout block diagram. The detail diagram with the "automatic divider" (sadly hiding its internal pull-down resistor) could be a good place.

@sumpfralle
Copy link
Contributor Author

Ping?

@CONTROLLINO-Support
Copy link
Member

Hello, I am sorry, but I have somehow missed your question.

Usage of internal pull-up together with external pull-down will result to a voltage divider at the input. This does not make sense from my point of view.

All variants of CONTROLLINO have similar circuitry at Analog/Digital inputs.

My colleague is working on the new pinout block diagrams. I will try to update this thread when they are ready.

@sumpfralle
Copy link
Contributor Author

Usage of internal pull-up together with external pull-down will result to a voltage divider at the input.

Maybe my wording was confusing; I did not use any external resistors in this case. I measured the 1.3V with INPUT_PULLUP while that header pin was not connected.

All variants of CONTROLLINO have similar circuitry at Analog/Digital inputs.

I assumed this. This made the difference between MINI and MAXI even more confusing to me.

@dannyhenderson
Copy link

I have this exact same question. I have a prototype that I built with a standard Arduino and I'm trying to adapt it to Controllino. The devices I am interfacing with signal LOW, so unifying the supply ground for my Arduino and the device allows me to use INPUT_PULLUP on the input pins to use Arduino's internal pullup resistors. Then I simply read the LOW signal directly. If what I'm hearing is correct the Controllino has an internal PULLDOWN resistor, that prevents the use of INPUT_PULLUP which is unfortunate because that would then require an additional external relay to basically change the LOW signals into HIGH signals. Am I missing something?

@CONTROLLINO-Support
Copy link
Member

Hello,
Yes, CONTROLLINO has on input internal pull-down. When you wan to use device on inputs, which needs the external pull-up (I expect some open collector output on the external device), you have to use some more external components to adapt it for CONTROLLINO input. For example logic gate with pull-up on his input side etc. All depends on your application. Input impedance of the screw terminal CONTROLLINO input is approx. 80kOhm so when you will use external pull-up of 8K2 it can also work (approx. division 1:10). For the pinheader you are facing of the pulldown of 15k so 1k5 resistance can work. Of course for this solution you shall be careful about higher currents and power losses (low impedance).

@sumpfralle
Copy link
Contributor Author

Thank you for your response.

Just for clarification: this situation is probably not by design, but by mistake, or?
(mistakes are no problem, as long as they are communicated clearly in order to prevent users from wasting their time)

@CONTROLLINO-Support
Copy link
Member

You are welcome! We do not see it as a mistake. Maybe you can advise us how to design a simple voltage divider to measure 12/24V signals and then also be able to pull-up and pull-down?

@sumpfralle
Copy link
Contributor Author

I see. Thank you for the explanation.

I created a pull request for adding this information to the FAQ.
Maybe you are aware of other places, where this crucial bit of information could be helpful for users?

@CONTROLLINO-Support
Copy link
Member

Thank you for the FAQ! I will inform the team about your suggestion.

@dannyhenderson
Copy link

You are welcome! We do not see it as a mistake. Maybe you can advise us how to design a simple voltage divider to measure 12/24V signals and then also be able to pull-up and pull-down?

If this is not a mistake, would you not agree that "100% Arduino Compatibility" might be a little misleading? It's not to difficult to work around, but the idea that you cannot take an Arduino prototype and run it on Controllino seems to indicate it is not 100% compatible.

@dannyhenderson
Copy link

I see this is marked as closed but you still claim 100% Arduino compatibility on your website. This is not true. It's not a large issue but people should be aware that sketches that work with an Arduino may require external pull-up resistors. I love the product, but please be clear.

@troybourne
Copy link

I agree with this... I was a bit frustrated to find out that such a commonly used function as INPUT_PULLUP is NOT supported after ordering 2 Controllinos.

@Jarod997
Copy link

I have to agree - I had just tried a fairly simple program for a prototype cable tester I'm designing and was puzzled why pinMode(somePin, INPUT_PULLUP); wasn't working as expected.

NOT 100% Arduino compatible.

To be fair, you could implement a hardware switch (eg dip-switch) which would bypass the input divider and make the input function as expected. A prominent note explaining this function should also be included.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants