a plee to the arduino gods

Hi chaps,

I think I need to ask all of you arduino gurus etc for a bit of guidance, I have just received a 12v dc winch, and need to have it RC controlled by tommorow. I have (in the past) successfully controled things from one RC channel, so I am going to look for a copy of the sketch i used for that , i think i can make the sketch work,

My plan is to simply connect to relays to the winch motor terminals, so that it goes back and forth when they are turned on, then have the sketch control the relays accodring to the RC signal ,

Does anyone have any helpful advice on the matter? I am literally not going to be able to sleep until I have it done, and im tired :frowning:

I am going to look and see how much the coil of the relay needs to power (AMPS) and then make sure its within the arduino pin limit, if not then i will hunt a transistor to do the job , hopefully a tip120 will get the job done,
does anyone know the pin limit in mA?

thanks to any of you gurus that can lend a hand

bad news,
they draw 110 ma at 5v

transistor time,

Do you have the parts available to make an H-bridge, or even better an H-bridge IC? Since I assume this wench will have to work in both directions, an H-bridge would be a fairly simple way to implement bi-directional motor control with an Arduino.

By RC controlled I assume you're referring to a hobby RC system with a handset, receiver and servos.

Simplest option is to install two push-to-make switches and have the servo positioned to operate them at the limits of its travel. (No hardware/software involved, just solder and glue.)

I assume the Arduino-based solution would use an Arduino in place of a servo,and use the conventional method to measure the incoming pulse width from the receiver. In this case you would need to know the range of pulse widths corresponding to the full travel of your transmitter controls and choose threshold values at which you wanted the winch to be switched on. You could use a simple if/else if / else structure to see whether to winch in, winch out or do nothing.

Since you need three output states I assume that you would use two relays, each being a twin pole relay. One would power the motor forwards, the other would power it in reverse. You need to ensure that both relays leave the motor outputs floating in the normal state, and make damned sure you only energize one at a time. For example, make sure that the initial state of the output at Arduino power-up is such that both relays are 'off'. Even briefly operating both relays at the same time would short your power supply.

The project sounds fairly straightforward. Use pulseIn() to alternately read the pulses from 2 R/C receiver channels, and use an NPN inverter to drive the relays from the Arduino. The I/O pins can drive only about 40-mA, not enough for the usual 5V relay.

hi

thanks for the reply
I do mean RC handset as found in most hobby toys etc,
I have a sketch that measured the limits of the pulse signal and responded accordingly, so once the hardware is in place then i can start writing the same sketch out again ,

I currently have two dual pole relays conencted as you suggest, but when i energise them , the motor always goes in the same direction , I am obviously only energising one at a time, and thanks for the headsup that i should make sure the sketch includes a part that shuts them both off at boot to make sure nothign funky happens,

I assume that the second relay i just added needs to be reversed, i will try and report back ,

btw, im switching ground and positive with each realy, i assume thats what i need the dual pole for right ?

whats an npn invertor ? i know what an npn transistor is, is it another name for the same thing ?

ok
double relay thingy is working , i had swapped the pos and neg at both motor and power supply, thus not really having swapped it,

now to find a transistor or two in the warehouse to run the relays,
I found a tip120 in an old charger ages ago , im guna go hunt more of the old chargers,

ok ,
raided the warehouse, found some bdx54c and some lm317t

am i right in thinking i can use the bdx54c to power the relay from the arduino , ?
and the lm317t to drop from 12v to 5v, will the lm317t take 3A continuos current drain ? i can bolt it to the winch housing and it will have a massive heatsink ,

NPN transistor is a device, NPN inverter is a circuit.

http://courses.engr.illinois.edu/ece110/simulation/bjt/

LM317 is a 1.5 Amp part.

You REALLY REALLY need to do some of your own legwork, rather than asking about every little thing. Takes 3-seconds to do a google search on datasheets [I'm out of here now, bon chance].

spruce_m00se:
and the lm317t to drop from 12v to 5v, will the lm317t take 3A continuos current drain ? i can bolt it to the winch housing and it will have a massive heatsink ,

Probably not, take a look at Figure 3 on page 8 of the datasheets. The maximum continous output current appears to be ~2.2 A. I suppose if you were really pressed and had no other options, you could try splitting the current between two LM317Ts in parallel. However, this is far from an optimal solution as the output voltages will not be exactly the same and the current won't really be divided equally.

thanks far seeker,

I have played with a sketch and have two leds lighting according to my theshold. so when high pulse is received the "UP" led comes on and when low pulse is received the "LOW" led comes on ,

both are shut off at the start of the loop to avoid a short on the relays,
now i guess i just need to work a way of getting my 12v down to 5v effectivly , and powering the realys from the pins,

spruce_m00se:
thanks far seeker,

Just remember even though this approach can work, it's very much a kludge. Not only is the division of current uneven, it's basically unpredictable at any given time and there are some potentially nasty feedback effects if the current division gets too unequal. Like if one LM317T fails due to too much current it almost guarentees the other will fail as well.

Personally, I would only use this as a last resort and replace it with a properly robust and reliable solution ASAP.

The below page has some diagrams on using relays to reverse a motor. You could probably make a reversing switch operated via a servo if needed.

http://web.comporium.net/~shb/switch.htm

Are you going to be like Tom Cruise in MI, hanging inches from the case with the huge diamond in it? :smiley:

Are you going to be like Tom Cruise in MI, hanging inches from the case with the huge diamond in it?

I think you're confusing "Mission Impossible" with "The Wrong Trousers"

haha,

Since i was unable to make the blagged relay version in time i have purchased an rc motor controller, all i need to do now is control it with two push switches for max and min extension cut offs,

AWOL,
the wrong trousers is a better description