Problem with analogRead()

Hi. I am having problem with the analogRead() function. I made a little adjustment to the IND. I/0 D21G and the GPRS module where I put steel spacers where the GPRS module is attached to back (the plastic back which is mounted on a DIN rail) and fastend the D21G topboad on the spacers with screws. ( I would post a photo, but i don't have enough karma points). The reason why I am doing this, is I want the Industruino to be as compact as possible.

The problem is that when the screws make contact with the spacers the analogRead function stops the program and gives some bad readings. If i lift the D21G topboard off and it makes no contact with the screws the reading is fine and it doesn't stop. Do you have any ideas what could be the problem?

Best regards

| 2 1 1
Asked on 5/30/18, 2:37 PM

Hi, i guess the screws create a ground loop. how about using plastic spacers and/or screws, is that an option?

on 5/30/18, 11:49 PM

Hi Tom. It helped using the plastic spacers, the measurement kept stable. But for some reason it also happens when I turned the antenna on the GPRS module towards the IND.I/O D21G. Do you think there is some EMI from the antenna to the IND.I/O D21G that is making analogRead not working?

on 6/1/18, 1:04 PM

Your answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

Ask a Question

Keep Informed

About This Forum

This community is for professionals and enthusiasts of our products and services.

Read Guidelines

Question tools

45 follower(s)


Asked: 5/30/18, 2:37 PM
Seen: 1719 times
Last updated: 6/1/18, 1:04 PM