Sequences, Pin Information, Status

@Gabriel:

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.

Any ideas so far?

I tried the following pins:

That behavior is due to the input pull-up. The sensor should still work.

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?

If you have access to the Arduino IDE, you can edit the pin mode for those pins and upload the modified firmware to the Arduino.

Hey @Gabriel thanks for the fast reply!

I was wondering how to do that, because I thought the Arduino FW is handled through the Rsp image, right?

Is this the way I need to do it then?

And the custom firmware I would need to build through the Arduino tools? Is there anything special about the FB version?

A little bit more guidance would be really helpful, thanks a lot!

@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…

Thanks very much, BR
Klim

Will pins D11, D6, A13, A14, or A15 work for your purposes?

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!

Hi Gabriel,
I am confused. Are you referring to the pin names of the RAMPS board?https://forum.farmbot.org/uploads/default/original/2X/8/85f908df533914760951f5e799c5d1e14910eee8.jpg

Or are you referring to the Raspbi? If I look at the bindings, this is clearly referring to the Raspis GPIO?!

Please clarify… thanks in advance!

These are RAMPS/Arduino pins.

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…

@Gabriel I really appreciate an answer as it seems that this is still not correctly configured in the initialisation of the firmware!

Thanks!

Those pins are not pulled up in software, but may have hardware pull-up resistors on the RAMPS board.

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?

Thanks in advance for your support!

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.

Hey Gabriel,

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…

Thanks, Best
Klim

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.

1 Like

Thanks for the explanation Gabriel, I did not anticipate that much work on your side.
I will give it a try as soon as I am able to and let you know.

Are you currently planning on implementing it some time in future?