Linear motion sensing/controlling

Let me preface this post by stating that I am totally new to arduino, programming, and microcontrollers. I do, however, have a bit of previous knowledge of basic electronic components. Having said that...

I just picked up my first Arduino board last week and have been having lots of fun learning so far. I have an application for the Arduino that I think Id like to undertake but am unsure of how to interface various components together to achieve my desired result.

I need to trigger a relay contact when an object moving linearly moves faster than a specified threshold speed. So Ive envisioned the following system:

A DC motor with a wheel attached which contacts the moving object. When in motion the motor produces a small voltage. This analog signal is converted using the onboard ADC. When a specific speed is reached I can have a digital output work through a transistor to control a relay. The relay portion of the circuit is figured out already thanks to the many guides and schematics available online. Its the motor and ADC part I dont know quite how to connect or program.

Any help? I realize many may recommend using some type of accelerometer but for this application it cant be used due to the fact that all the electronics need to be mounted on the stationary side of the object.

One final question with regard to SSRs. I know that there are plenty of ssrs that can be controlled with 5VDC. That is simply to drive the relay correct? I can switch any load I want as long as its within the load rating of the SSR? Also, what is needed(if anything at all) to isolate the arduino from the SSR to avoid any sort of damage to the board? For the record I need to switch 12VDC @ approximately 10 amps.

Anything you gurus can offer me will surely be of help to a new guy like me. Thank you in advance!

t_hum

Monitoring the voltage of the motor is one option, but probably not your best; I think there's the chance of too much fluctuation in voltage/current varying. Some that would be dependent entirely on speed would be the motion of the motor output - the rpm of the output gear. If you could contrive to get one or more regularly-spaced holes in it, you could monitor them with a phototransistor. If you were willing to fiddle with it a bit, you might even find a reflective opto sensor that could actually watch the gear teeth.

That 5VDC for the solid-state relay is the control voltage. Be aware that a lot of SSRs are intended to work with AC loads (so that they actually turn off when the control voltage is removed), so you'll want to double-check your SSR and load combination.

Hope this helps...

DMerriman

Hi T_Hum, welcome to the forum.

One final question with regard to SSRs. I know that there are plenty of ssrs that can be controlled with 5VDC. That is simply to drive the relay correct? I can switch any load I want as long as its within the load rating of the SSR? Also, what is needed(if anything at all) to isolate the arduino from the SSR to avoid any sort of damage to the board? For the record I need to switch 12VDC @ approximately 10 amps.

Those commercial SSR use an internal optical isolator so you need no further protection for you Arduino. One thing to consider is that to use those SSRs at their maximum rated current requires that you mount them to a heat sink. The back side of the SSR cube has a metal conduction plate that needs to be in good mechanical contact with the heat sink an a application of heat sink paste is called for. If you need a max of 10amps for your AC powered device use a SSR rated for higher then that, say 20 or 30 amps. It's not good to use components at their 100% rated value and normal engineering practice is to not utilize maximum values but rather to use a larger value component.

EDIT: PS I just reread your post and want to make sure you understand that most of those SSR are for switching AC voltage only, not DC. To switch high current DC devices a logic level MOSFET is a better choice.
Make sense?

Lefty

Thanks for the quick responses. I was aware that most SSRs were designed for AC loads. I fonud a few great links in another post on the boards for DC SSRs. I did some looking around at spec sheets for what Im trying to switch and it looks like its going to be a really low amperage draw, i.e. < 1 amp. So the heat sink may not be necessary after all.

I thought about using an optical sensor as well but I dont want to drill enough holes to monitor the speed with any sort of certainty (the object is 20 feet long). What do you think about using motor position sensing from a stepper motor or a little motor from a cd-rom?

After a bit more thought maybe I could drill holes evenly in a disk using my cnc machine and then optically monitoring motion that way? Do you think that is better?

If you're dealing with a DC load of less than an amp, I'd be inclined to just go with a MOSFET (TO220 package), and heat sink it anyway -- good rule for electronics: if it's too hot to touch comfortably, it's too damn hot! :wink:

If you're talking about 20 feet of linear motion, you might be able to get by with just one hole in one gear of the train, depending on how fast you're trying to move things, and how much accuracy you REALLY need.

Another option would be to check around and see about maybe finding a used/cheap tachometer of some kind, and just monitoring IT.

Or gluing a number of small magnets equidistant around one of your gears, and monitoring them with a Hall Effect sensor (cheap, easy to use, non-contact). You've got plenty of choices; as always, it's finding the best combination of cost, effort, and efficiency for YOUR needs. :smiley:

You could simply drill holes in a wheel that's running along the object in just the same way as your motor would be. Or, you can use a reflective opto-sensor and print out an encoder wheel with black and white stripes:

http://www.geology.smu.edu/~dpa-www/robo/Encoder/pitt_html/encoders.html

http://mitros.org/p/projects/encoder/

http://letsmakerobots.com/node/3815