REXYGEN Community Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Login

    Arduino Mega - analog inputs

    General
    3
    3
    1.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      contactform
      last edited by

      Hello,
      I run REXYGEN version 2.50.8 on RPI with Arduino Mega - REXduino. I'd like to use analog input pins. On pins I want to bring the output from the ampmeter up to 1V. I suppose I will be able to read and process this voltage.

      I don't understand, but the output of analog pins. In the setup, I turned on Pins A0, A1, A2 and A12, A13, A14 for the test. Other Pins are off and I have nothing connected to any analog pins yet. However, some values ​​are displayed on some pin which are not enabled. I'm using Arduino Mega clone. See the attachment for pin settings and displayed values.

      I will be glad for your opinion or advice.

      Martin

      0_1553585495210_Arduino_MEGA_Analog_vstup.JPG

      0_1553585502110_Arduino_MEGA_Analog_vstup_nastaveni.JPG

      1 Reply Last reply Reply Quote 0
      • S
        sisktom2
        last edited by

        Hello Martin,

        I have noted that the Arduino analog inputs can sometimes pick up signals from adjacent channels.
        You can try pulling the analog signals to ground with a 10K - 100K resistor to see if it corrects the unwanted readings.

        Cheers,
        Tom

        1 Reply Last reply Reply Quote 0
        • jaroslav_sobotaJ
          jaroslav_sobota
          last edited by

          Hello Martin,
          the main problem is that the pin modes are in reversed order. By setting pinmodes_A0_A7 to 0x66600000 you enabled A7, A6 and A5, not A0, A1 and A2 as you expect.

          The nonzero readings are then caused by picking up noise and other channels as mentioned by @sisktom2

          Regards,
          Jaroslav

          1 Reply Last reply Reply Quote 0
          • First post
            Last post

          This is a community forum for REXYGEN users and fans. Detailed information can be found at REXYGEN homepage.

          There is also an outdated REXYGEN community forum.

          Powered by NodeBB.