0
\$\begingroup\$

For a hobby project I am developing a solar tracker. For this I obtained a linear actuator. It contains a DC motor, 2 Hall sensors and an end switch. I am using an Arduino Uno and a Polulu motor driver for control. Below is a link to a simple electrical schematic of the actuator

http://www.solar-motors.com/inc/getfile.php?id=783163FD-16DB-4AE0-9A48-C1CD71093105

I have managed to run the motor and read out the hall sensors. My problem is with the end switch. I am not sure how to wire this and read this signal.

I am powering the Hall Vcc with 5V form the arduino, which works well with the hall sensors, but when I connect the end switch to a digital input pin I get no signal when the actuator is at its end.

Does somebody have an idea on how to set this up. Thanks

\$\endgroup\$
0
\$\begingroup\$

You need a pull-up resistor from the output to VCC.

10k ohm will probably work just fine.

Perhaps you can use the internal pullups in the Arduino inputs.

\$\endgroup\$
  • \$\begingroup\$ The question refers to the end switch and not open collector outputs. \$\endgroup\$ – Andy aka Mar 6 at 10:52
  • \$\begingroup\$ @Andyaka You are right. :-) I edited the answer. A pull-up should still do the trick. \$\endgroup\$ – Peter Karlsen Mar 6 at 11:44
  • \$\begingroup\$ Thanks for that. To add to that, I have a 24V power supply (Meanwell SDR-240-24) which I use to power the DC motor. Can I than also use this same power supply to power the hall sensor and end switch? This in combination with the pull-up resistors. \$\endgroup\$ – roadrunner38 Mar 7 at 7:38
  • \$\begingroup\$ @roadrunner38 If you connect the 24VDC supply to the hall sensor, you are operating at absolute max rating. I would use a lower voltage. For the pull-up on the end switch, you should use VCC from the Arduino. If you connect it to 24VDC the Arduino will die. \$\endgroup\$ – Peter Karlsen Mar 7 at 9:21
  • \$\begingroup\$ OK. I managed to get it working. Many thanks! \$\endgroup\$ – roadrunner38 Mar 7 at 16:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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