Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: Floating voltage (Wobbly axis)

  1. #1
    Junior Member agustin's Avatar
    Join Date
    May 2018
    Posts
    2

    Floating voltage (Wobbly axis)

    Hi friends. Iīm new to the Teensy world but not on other MCUs.
    I wanted to build a simple cockpit panel to control trims and radiators with slider pots. I hooked up a pot on a slider axis using the example sketch on Arduino, and all the sliders on joystick properties are wobbling like crazy. All other analog pins arenīt hooked to anything. But the pin where a pot is hooked still has some wobbling. Is this caused by floating voltage by induced eletromagnetic fields such as AC from the outlets for example? Should I attach the pins to VCC, GND with a resistor? What value should I use? I havenīt tried that yet since Iīm not at home. anyways thank you to all!

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    6,764
    You say Wobbly - but no idea how much that change that represents? Seeing instability in the lower bit(s) isn't surprising depending on the connection and environment.

    Just saw this go by in past days - adding a CAP might help … Strange-analogReading-struggle-with-fader … the rest won't likely apply.

  3. #3
    Junior Member agustin's Avatar
    Join Date
    May 2018
    Posts
    2
    Quote Originally Posted by defragster View Post
    You say Wobbly - but no idea how much that change that represents? Seeing instability in the lower bit(s) isn't surprising depending on the connection and environment.

    Just saw this go by in past days - adding a CAP might help … Strange-analogReading-struggle-with-fader … the rest won't likely apply.
    It looked like noise caused by EMI. I didnīt have any caps and the rest of the pins were floating since I didnīt hook them to anything on the breadboard. I will try to hook all pins to VCC or GND respectively. I just tied the wiper of a linear 10K POT on slider axis just to see if it works. I will complete the project and I will update. Thank you so much!

  4. #4
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    2,710
    All pins are disabled by default, to put them in working floating state you must make the pin active via pinMode(pin, INPUT);

    There shouldnt be a need to tie pins high or low as they’re disabled by default from being used

    example of disabling a pin:

    pinMode(13, INPUT_DISABLE); //disable led pin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •