Proximity sensors / neg output triggering a reverse polarity relay setup for high power motor

My current project is to motorise the lift and lowing of a drill Press table. I want to use proximity sensors for the maximum hight and the max depth. The motor I'm using has a worm gear and draws about 3A at 12V, so I really dont want it to max out. I can easily wire up a reverse polarity relay circuit but cannot interrupt the triggers without adding 2 more relays (dont wanna go this rout-very analog). This is where arduino comes in but I have very little knowedge how to wire this up let alone do the code.
The proximity sensors I have are10v-30v NPN NC and the switch is a simple up and down switch.
Anyone out there able to help with a schematic and possibly some code?

Ok, but I can’t see your Tutorial.

Please post sharp, clear images, and your code inside [code tags]

(or have this thread moved to a more relevant category)

obviously havent posted this in the correct forum. I do appologise.

@RobMormile sounds interesting, pictures would be nice.

Moved to project guidance.

thank you

What is important in terms of the current drawn by the motor is not "about 3A", but its actual stall current - the current it draws when it is prevented from moving which is also the current drawn at the very moment it is powered up.

You use two SPDT relays, one to switch each of the motor connections from ground to 12 V. One runs the motor forward, the other runs it back.

You need to give a Web link for each component.

Thanks for replying.
stall is 7A. lifting the table it draws 4.6A. Lowering the table it draws 1.7A.
relay circuit - 85(12ve), 86(-trigger), 30(motor), 85A(-12ve), 85(+12ve).
That side of the circuit I have sorted. I need help in learning how to integrate arduino in the circuit to understand when the switch is triggered to trigger the relays, and also to isolate the respective trigger when either the hight or base has met its threshold via the poximity sensors.


They are automotive relays, how are you going to drive them.
A bit of a concept circuit diagram would help.

Thanks.. Tom.. :grinning: :+1: :coffee: :australia:

yes they are automotive relays. None the less, not energised they handle 40A, energised they handle 30A. very standard changeover relays mate. I have a 5A power supply, Im assuming extra circuitry will be required to step up the o/p of the arduino to trigger the relays. As I said before, that part of the circuit I have sorted.

As you can see in the diagram I need the uno to be able to communicate with the sensors to disable the corresponding switch input. This will stop the motor from raising or lowering the table too far. I just have no idea how to do it and have no idea how to increase the uno voltage o/p to the relay triggers. And also the sketch lol
hope this circuit diagram helps.

Note the NPN output has a 47k pullup to +Ve.

Thanks for the diagram.
I've added a few things, do you mean gnd reference when you say -12V. Seeing as it's a 12V motor.
You will need a MOSFET on each relay to control the coil current.
The UNO will have to share the same gnd as the 12V supply for the relay coils.

I know you are from an automotive background, hence the edits.

Is the up down switch, centre off?
Can you please post links to data/specs of the proxy sensors?
It sounds like they are OPEN COLLECTOR, so connecting their output to the UNO will not be a problem with a pullup resistor between the proxy sensor and 5V.
You will need to have the proxys connected to the 12V supply as well.

Tom... :grinning: :+1: :coffee: :australia:
You will need to have the proxys connected to the 12V as well.

I don't really see the need for Arduino, you could let the prox switches work small 12V signal relays that would break the coil circuit of the big relays.

agreed, but i dont wanna do that. Was trying to limit the amount of relays and also educate my self with arduino.

-12Ve would have to be -12Ve for the relays to function correctly. I agree a mosfet will be needed to control the coil current. but I dont know how to do it. a schem would be awesome.
yes the up down is center off.
above is data on the proxy sensors from ebay.
I believe their o/p is relative to their i/p.
Awesome feed back. Thanks Tom. Im very slowly understanding the circuit. next would be the sketch.

also it wuld definatly have to be -12v as both relays rest on -12V. It would be a high current feed

Don't forget kickback diodes, 4 x 6 Amp for motor and 1 1N4004 for each relay coil.
Also you will need transistors to carry the relay coil current which is currently unknown.

copy that.

each relay coil is rated at 20mA