element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum Detect whether a pin is connected to GND
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 19 replies
  • Answers 8 answers
  • Subscribers 391 subscribers
  • Views 2777 views
  • Users 0 members are here
  • arduino uno
  • iot
Related

Detect whether a pin is connected to GND

tim687
tim687 over 8 years ago

Hi everyone!

 

Recently I've started working on my own IoT project. An Airco that has no connectivity to the world (except for a remote, that I never use), to connect it to the internet.

 

Note: The Arduino Uno is connected with an NodeMCU ESP-12F via serial. The Arduino Uno communicates with the AC circuitry.

 

However, I'm facing a serious problem that stops me from continuing with the project.

 

The AC has got three modes, Cool, Dry and Fan. Microprocessor controls the specialised equipment inside the AC (such as the refrig., the pump etc) so there is no line going to the other control board that is high when one of the three modes is active.

The MIP (microprocessor) controls three leds to let the user know which mode is active. (here comes the, for me, very difficult part)

The GND connections of the LED's are connected to the MIP (pulls, I guess) and they are being connected to GND when a mode is active.

The challenge for me, with my Arduino Uno, is to check which GND connection of the three LED's is connected to the GND line of the external circuitry.

 

I've made a beginning, for each line I've used this setup:

 

image

My selfmade and NOT complete schematic of the AC circuit

image

 

The values I get are usable, but they require taking loads of samples, and taking the average of all the samples, to check which line has got the lowest value (and thus is connected to GND). However, the values are fluctuating very much, and are not very accurate.

As required, the GND of the Arduino is connected to the GND of the AC circuitry.

 

If you want to see a few pictures of the AC circuitry, check out my Google Drive here.

 

The project is a hobby project, next to my school projects, so there is no deadline or something image

 

Thank you in advance for your help,

 

Tim

 

Message was edited by: Tim Koers Added the AC circuitry schematic

  • Sign in to reply
  • Cancel

Top Replies

  • jc2048
    jc2048 over 8 years ago in reply to tim687 +2 suggested
    If you're going to do all that, I think it would be worth your while sitting down with large sheet of paper and drawing out the circuit. It should be easy to do - you can see all the tracks, and the conventional…
  • jc2048
    jc2048 over 8 years ago +1 suggested
    Are you sure the drive is direct. [It's difficult to make out from your photographs because of the large blob of silicone over the capacitor that they've added.] The processor (assuming it is a processor…
Parents
  • dougw
    0 dougw over 8 years ago

    It appears to me that your arduino input is completely floating - it needs a DC reference.

    I would try simply using a weak pull-up resistor on the arduino pin which should also have a capacitor to ground. The RC time constant needs to be longer than any of the multiplexing periods on the target signal. A diode can connect to the target signal, so it can pull the arduino pin down, but not up.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • tim687
    0 tim687 over 8 years ago in reply to dougw

    dougw

    How Large should the cap be? The Same as the one of the ones Im using now?

    jc2048 The first things I did was creating my own schematic of the board in eagle (I'm an absolute brginner in eagle, so tips are welcome. I'll post an image of the schematic later today)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • dougw
    0 dougw over 8 years ago in reply to tim687

    I would try a 100K pull-up resistor and a 0.1 uf cap. Pretty much any diode should work, although a Schottky diode might be needed if the external signal doesn't go low enough.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • tim687
    0 tim687 over 8 years ago in reply to dougw

    dougw  Since I am completely new to caps, how to I connect it? Pull up at the + side followed by a diode that connects to the Arduino? Thedanks for your help! I really hope that this should work

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • dougw
    0 dougw over 8 years ago in reply to tim687

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • tim687
    0 tim687 over 8 years ago in reply to dougw

    This will work when the GND signal is coming from the device? I'll try to test it later today!

    Thanks,

     

    Tim

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • tim687
    0 tim687 over 8 years ago in reply to dougw

    Hi dougw

     

    Sorry for the very very very late response, as some say, life got in my way. I have got time to continue the project now, and I did.


    I created my own little circuit and tried it out,

     

    Measuring with my multimeter I get very different voltages then my Arduino is reading (multimeter is stable, Arduino is not.

     

    These are the values I've measured with my multimeter

     

     

    FunctionCOOL (ACTIVE)DRY (ACTIVE)FAN (ACTIVE)
    COOL1,22V0,08V0,27V
    DRY0,20V0,08V0,29V
    FAN0,83V0,08V0,30V

     

    My Arduino is measuring values of

     

    FunctionCOOL (ACTIVE)DRY (ACTIVE)FAN (ACTIVE)
    COOL1,60V ~ 2,15VHaven't even bothered to get these XD
    DRY0,04V ~ 0,06V
    FAN2,25V ~ 2,80V

     

    I haven't got a clue about what is going wrong here.

     

     

    I really don't want to remove the led's because the airco needs to look exactly the same as without the wifi mod. What I could do is get a photoresistor and get the light values to check which led is on.

     

     

    Thanks for your help!

     

    Tim

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Jan Cumps
    0 Jan Cumps over 8 years ago in reply to tim687

    Depending how fast your photo resistor is, it may show the same variances as the LED. It's our eye that makes the led look stable, but an electronic sensor may very well be faster and follow the fluctuations of the signal going into the led.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Reply
  • Jan Cumps
    0 Jan Cumps over 8 years ago in reply to tim687

    Depending how fast your photo resistor is, it may show the same variances as the LED. It's our eye that makes the led look stable, but an electronic sensor may very well be faster and follow the fluctuations of the signal going into the led.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Children
  • tim687
    0 tim687 over 8 years ago in reply to Jan Cumps

    Could I smooth that out with a capacitor?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube