I wired a distance sensor which outputs 0 to 5 V to different analog inputs and got a very interesting finding:
As soon as I connect the output of the sensor to one of the analog inputs it gets pulled up to either 3,3 V oder 5 V (power 5V and ground are connected to the ramps shield as well). I measured this inline with a multimeter…
If I disconnect the analog in from the RAMPS it works flawlessly with a multimeter between one RAMPS GND pin and the sensor output… as I tried on the Arduino side I am sure that the signal output cable does not make a short somewhere.
The pullup resistor can only be ignored for low impedance sensor outputs. If the distance sensor is a Sharp IR type then they have high impedance outputs and a pullup resistor will likely cause the output to be permanently high.
Why would you need an input configured for analogue operation to have a pullup? It makes no sense at all. But if the Arduino is supposed to be able to read analogue sensors then some input conditioning/scaling/buffering/protection circuit would be expected.
Hi @Gabriel thanks for the fast response. It does not work, as I described in my post.
Makes sense and that it was I get.
@Gabriel: Is there any way to turn off the Input_Pullup? I really do not get which sense it makes for analog inputs other than making some setups of analog measurements impossible?
@Gabriel would you be so kind to help out? Currently this is holding me back from adding a new feature which is a distance sensor mounted on the z axis and “hard” wired to the Raspbi…
Hey Gabriel, at the moment I only would need one analog in without pull up, but it might be good to “erase” another pull up on another analog in. Where they are located on the board does not matter for me…
Thanks for clarification again, Gabriel!
Could you please check again if A15 is really not pulling up during the initialisation? I tried again with my distance sensor and as soon as I connect it to A15 it shows 5 V, before (disconnected from A15) it works flawlessly with a Voltmeter…
Hey @Gabriel any more information that you can provide would be really appreciated. At the moment I#ve got the bot indoors and I really like to solve and troubleshoot this problem before I need to put it out again in some weeks.
Would you be able to provide raspberry pi pins as an alternative input in the sequences?
How could I continue with this pull up resistor issue on the analog input pins of the RAMPS board?
Do you have access to the Arduino IDE? You can edit the change the pin mode for the pins you mentioned (D57 (A3), D58 (A4)) to INPUT and upload the modified firmware to the Arduino.
I do not have currently I would need some more support (if possible!) to advance in this direction.
I am exactly where I was mid-december but I thought you’d already implemented this change into the new FW as I read that in another thread… this is quite confusing. Would it be of a big effort for the FB team to include this change in a new FW release? Would be highly appreciated…!!!
@Gabriel would it be that much effort for you to edit the Arduino fw with one analogue pin to be not pulled up?
This is really essential for the distance sensor integration and I really don´t like to waste more days in getting into the Arduino fw whereas this would be maybe 10 mins. of your work. Moreover, I think many would be happy about it in future. Could you please support @roryaronson, Gabriel and I wasted together already many hours with the confusion created above…
To make the change in a release we will need to create a new firmware parameter, which will require changes throughout the entire stack. This will take some time. Making the change locally using the Arduino IDE as I’ve mentioned is by far the quickest option. I’d be happy to help with the process.