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 2773 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…
  • Jan Cumps
    0 Jan Cumps over 8 years ago

    It is possible that the circuit that drives the LEDs is of an 'open drain' type.

    in that case, the output floats when the LED pin isn't pulled to ground, and you can't make a useful measurement.

     

    can you remove your added circuitry, and check the voltage of all 3 LED kathodes when they are turned off, with a volt meter?

    Does that give you a value you can work with? Is it stable?

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

    Do you mean de-solder the wires? The wires are jumper cables image

    If I remember correctly the voltages where quite stable when I measured them last time, but I will measure them again, no problem

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

    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) is controlling the two 7-segment displays, multiple switches, and multiple LEDs and it's possible that the indicator LEDs you are interested in are combined with the rest of the multiplexing. If they are, the readings you get will be very confusing.

     

    If it is multiplexed, you should still be able to come up with a way to read it with an Arduino. It would just be a matter of reading at the right time, triggered by one of the multiplex signals. In fact it wouldn't be too difficult to read the whole lot, including the value on the display and the switch states, if you wanted to. Add some analogue switches across the ones on the board and you could even control it.

     

    Hold off on the filter until you know more about the circuit. One of your caps is the wrong way round. And if the drive is switched you have a differentiator that will generate negative going pulses (though the static protection diodes will probably save you from damaging the Arduino input).

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

    I've added a few photo's of the back of the PCB. I had removed the glue blob a while ago but didn't add new photos of it.

    I've also thought about matrixing, what I do know is that the 7 segment (2 dig.) display is being driven by the shift register next to it. That might be the case for the LEDs to, that the shift register is matrixing the LEDs + connection.

    I was already planning to (somehow) read the serial input of the sr because I want to know what is on the screen.

     

    Thanks,

    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

    Tim Koers wrote:

     

    Do you mean de-solder the wires? The wires are jumper cables

    ...

    Don't desolder them please. Measure with everything in place.

    If you have an oscilloscope at school, it might be good to probe these points too. That will immediately show if there's multiplexing involved with the LEDs.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • 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
  • jc2048
    0 jc2048 over 8 years ago in reply to tim687

    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 components are simple to recognise. It will make it much more straightforward to plan your modifications. You'll also get more answers here because many of us can read schematics quickly but don't have the time (or inclination) to trace out a circuit from photographs.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject 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
>
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