-1
\$\begingroup\$

schematic

enter image description here

In the circuit I have a proximity sensor that is triggering a relay by going to a micro-controller. This is working fine until the micro-controller ignores the sensor (due to a fail safe I have programmed into the controller), upon a soft reset (NOT A REBOOT, sending a signal to the controller to come out of inactive mode), the sensor is still sending 5VDC when it shouldn't be sending anymore then 1VDC. What is the cause of this? or How can it be fixed?

Note, Everything runs normally if I hold something in front of the proximity sensor for a second or two, then take it away?

Short Recap: Sensor works fine --> controller ignores input due to another input --> controller starts receiving input --> sensor sends out 5VDC even if nothing is in front of it.

Sensor Information: Proxmity sensor 6VDC input @ 300mA max

Micro-Controller: Arduino Based Micro-Controller Input pins - 40mA max

Sensor Wiring Diagram:

Questions/Answers:

  1. Are you powering the sensor from 6 V DC?

Yes, the Sensor is being powered by 6 V DC.

Provide a link to the sensor so that we don't have to look it up.

  1. What is the pot wiper connected to?

I would assume the wiper is connected to the Signal line(Black). Its not an external pot.

  1. Why have you added a pot? Is it to reduce the voltage to the micro-controller? If so, what voltage is the micro running on?

The controller is running 5VDC but is a more "rugged" arduino that can take up to 30VDC per I/O pins.

  1. Provide a link to the sensor so that we don't have to look it up.
\$\endgroup\$

closed as unclear what you're asking by PlasmaHH, Olin Lathrop, Voltage Spike, Dmitry Grigoryev, uint128_t Jul 2 '17 at 22:52

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    \$\begingroup\$ Edit your post, click the Schematic icon in the editing toolbar, draw the circuit diagram. \$\endgroup\$ – Dampmaskin Jun 26 '17 at 14:53
  • \$\begingroup\$ How should anyone point out what you did wrong without knowing what you did? \$\endgroup\$ – PlasmaHH Jun 26 '17 at 14:59
  • \$\begingroup\$ If I had a wiring diagram of the sensor I'd gladly supply it. I'll draw up what I have, but it isn't much. \$\endgroup\$ – Matt Jun 26 '17 at 15:04
  • \$\begingroup\$ I have edited my original post. That is the wiring diagram I could find. From the black wire I just have it going to a pin on the micro-controller with a internal pull-up resistor. So fairly simple setup. \$\endgroup\$ – Matt Jun 26 '17 at 15:30
  • \$\begingroup\$ What is connected to the cathode of the diode? What is connected to the base of the transistor? What is that thing with Chinese symbols on it? Edit your post, click the Schematic icon in the editing toolbar, draw a proper and complete circuit diagram. \$\endgroup\$ – Dampmaskin Jun 26 '17 at 15:42
2
\$\begingroup\$

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 1. Crime scene reconstruction.

If this schematic represents what you have done then copy it into your question. (You can edit my post, edit the schematic, copy and then cancel out of the edits.) When you do, please clarify the following in your question (and not in the comments):

  1. Are you powering the sensor from 6 V DC?
  2. What is the pot wiper connected to?
  3. Why have you added a pot? Is it to reduce the voltage to the micro-controller? If so, what voltage is the micro running on?
  4. Provide a link to the sensor so that we don't have to look it up.

Sensor Information: Proxmity sensor 6 V DC input @ 300mA max.

The 300 mA is likely the maximum current it can sink - not how much the prox element consumes.

Micro-Controller: Arduino Based Micro-Controller Input pins - 40mA max.

That's the maximum output current from an Arduino pin. You're using it as an input so this is irrelevant.


Edit after additional info provided.

schematic

simulate this circuit

Figure 2. More likely setup.

The switch datasheet was easily found in a web search. There is no mention of a potentiometer on the output but the spec does say "Set distance: 0 - 7 mm" so I assume there is a sensitivity adjustment on the back. This does not attenuate the output as you drew it. It adjusts the switching point. The output still switches fully on or fully off.

Try wiring it up as shown in Figure 2 and report back.

\$\endgroup\$
  • \$\begingroup\$ I've added the answers to your questions in the OP. Hope this helps. \$\endgroup\$ – Matt Jun 26 '17 at 17:01
  • \$\begingroup\$ I did just find another wiring diagram. I uploaded it to the OP. It shows a better and more accurate explanation. \$\endgroup\$ – Matt Jun 26 '17 at 17:12
  • \$\begingroup\$ See the update. \$\endgroup\$ – Transistor Jun 26 '17 at 17:21
  • \$\begingroup\$ I just tested Figure 2 with some slight modifications. I have the sensor connected to a power supply that supplies both the controller and the sensor. So I left the ground going back to the power supply vs. going to the controller. I don't know if the controller can take the 6V without damaging it. I did add a resistor in series to the power of the micro but I apperently don't have any 1K resistors so I used a 10k, With all of this in perspective I got the same results as before. The sensor reads LOW but sends an output of 5V. \$\endgroup\$ – Matt Jun 26 '17 at 17:41
  • \$\begingroup\$ @Matt You have a power supply supplying power to controller and sensor without a ground to controller? Use an optocoupler. \$\endgroup\$ – StainlessSteelRat Jun 26 '17 at 17:51

Not the answer you're looking for? Browse other questions tagged or ask your own question.