Monitoring rotation

Hi, new member here and just getting through the "Getting started with Arduino" book now. Took computer engineering awhile back, but went into agriculture now arduino has me intrigued (never was good at machine language :-/)

Anyways for my first project I'd like to monitor a corn planter to ensure that 4 separate discs are in motion while planting. After reading the forums here, it seems a hall effect sensor may be the way to go, but keep in mind an exact RPM does not matter to me in this case. The sensors will be subject to very dirty and rough conditions obviously, just wondering what would be recommended.

Another concern is the length the sensors cable would need to reach, as I would like to have the "arduino monitor" mounted in my tractor pulling the planter.

I would go for the reed switch, since precision is not a design goal you can get ones like these already in a body for 4 bucks a unit

also since they can handle a hefty voltage you can use the (what 12-24 volt?) tractor supply through the switches up to a filtering / step down ciruit in the cab lessening the worry about the cable

as far as magnets, maybe some old hard drive magnets, they are flat and quite powerful for their size

Is this for an attachment that is often disconnected from the tractor? Does this attachment already have power or is it strictly hydraulic? If it is something that doesn't stay on the tractor at all times and doesn't have it's own power, you could probably simplify things by using an RF link (the JeeNode for example) where the electronics on the attachment could be sealed into their own enclosure on the attachment and would connect wirelessly to a separate monitoring/control unit in the cab of the tractor. This would eliminate the cable run altogether, as well as provide you with a single interface in the tractor that could monitor other attachments as you progress onward.

The board on the attachment could be powered by a battery and a solar panel, or even by a hobby-motor connected to a wheel (or PTO) to act as a generator.

You may also want to seek out what this guy did:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1254445743

His application of an Arduino to a tractor is completely different, but since he is a farmer, and knows how to interface an Arduino and tractor (combine!) together (and steer the thing - I am still amazed that this was his first Arduino project); maybe he could give pointers or something...

If there were a way to mount the sensors and/or magnets (or whatever you use) inside the shaft/bearings/supports of the discs, that would go a long way toward reliability. Can you give us more information on the discing attachment (make, model number, pictures, manufacturer)? You might even be able to talk to the manufacturer about you idea, they might be able to give you some pointers on how/where to set it up so that it works reliably.

:slight_smile:

Thanks for the replies, I will try to get pics of the implement on today.

To answer some questions:
The tractor will have a reliable 12v supply.
The implement is a john deere 7000 series corn planter. The newer versions come with a "seed monitor" which is what my project would do, it ensures that seeds ARE in fact being planted with the rotation of the planters discs/gears. Yes I probably could just buy a monitor from John Deere and attach it - but wheres the fun in that :wink:

The attachment is only used for maybe a month out of the year, so I think the plan would be to permanently mount the 4 sensors, but have the Arduino removable for further projects.

I'm thinking now that the Arduino monitor won't necessarily need to be in the tractor with me. Perhaps I could simply mount it on the planter and use LEDs or an audio speaker to let me know if something goes wrong. As this is my first Arduino project I think a RF link would be beyond me!

Osgeld those sensors certainly look like the ones for the job. What is the popular method for powering Arduino from a 12V source?

A resistor divider will work fine to drop the 12 V to the range the Arduino needs. It's not efficient, but it works.

Look into a JeeNode to get the RF integrated real easily. His plug line is probably the kind of thing you want for this application anyway.

What is the popular method for powering Arduino from a 12V source?

You could put it straight into the Arduino's external power socket. It'll drop down 12V to 5V.
That will give some headroom.

You might want to consider a bit of extra protection though, as I assume the power is just from an alternator+battery?

I'd suggest taking it a step at a time because the tractor may be an electrically noisy environment, which could upset wireless.

HTH
GB

12v into the arduino regulator may be pushing it a little, you can get a car transformer to drop it down to ~9v and that would also get you another step of regulation and filtering (thats what I would do)

as far as the signals entering the arduino, a voltage divider as mentioned or some form of buffer circuit made out of fets

rf is another good idea, but your still going to need to get power to the sensors, and to the rf unit, + its more expensive + more complicated, 2 (+ sensors) wires sound easier but I dont know the exact situation

The implement is a john deere 7000 series corn planter. The newer versions come with a "seed monitor" which is what my project would do, it ensures that seeds ARE in fact being planted with the rotation of the planters discs/gears.

Hmm - not much out there picture-wise on how the mechanicals work to cause a seed to drop out of the hopper and into the proper area; how does this all work?

I am asking because maybe there's an area on the mechanical side of things that would allow you to interface to the Arduino easily enough why still being out of most of the dirty area? Maybe there might be a way to mount a hall-effect sensor or optical-interrupt sensor inside of a gearbox or something, and monitor that? Without clear pictures of the mechanicals, though, it would be difficult to know...

Yes I probably could just buy a monitor from John Deere and attach it - but wheres the fun in that

Time vs. Money, I suppose - if you have the time and not a lot of money (I would imagine, like anything else "farm related", that the John Deere attachment isn't very cheap), and you think you can do it cheaper than the official version, then a homebrew solution might work. At the same time, you might be "cutting your nose off to spite your face", if you get my drift. Sometimes you have to ask yourself "am I a farmer or an embedded device engineer", and do what is best for what you do, even if it may not seem (at least initially) to be the most cost-effective choice at first.

For instance, you might be able to build such a device, but its reliability is so low that you are always fiddling with it instead of getting on with planting, or whatever (maybe the Deere equipment is the same, though? Or, maybe it is more reliable because they've ran all the testing and fieldwork, etc).

Just wanting to interject some perspective here, and not trying to discourage you from this project (it really is a nice and simple "first project" for a novice, provided you have the mechanical skills to get it lashed-up to your planter; just don't let it get in the way of your business of farming).

Good luck!

:slight_smile:

12v into the arduino regulator may be pushing it a little

I run mine from a 12V wall wart all day long, and its okay.

But I do agree with Osgeld that more voltage protection is better. This is likely to be an electrically noisy environment. My concern is not the nominal 12V, it's the electrical noise that may be on that power.

It looks like mx270a's project is powered from the laptops USB.

GB

If you're trying to monitor that seeds are actually running through, you might be better off using little pieces of pvc pipe for the seeds to fall through and having LEDs and CDS cells inside the tubes to detect each seed as it goes through. Monitoring the rotation of the discs won't help you if there's no seeds falling onto them. This way you could get an alarm the first time a seed doesn't fall, say due to a clog in the chute or something.

The audio speaker idea probably isn't the best idea unless your tractor has a cab, also the LEDs on the attachment might be hard to see in bright daylight. Even if you don't do the RF idea, you would probably still be better off having some kind of a monitor on the dash. You could even just have two Arduinos (Arduini?), one on the attachment and another in the cab talking to each other using a serial line (very easy to code). This way the one on the attachment could be utilizing all of it's pins (excluding 0 and 1 for serial) to monitor various aspects, while the unit on the tractor could have an LCD screen showing useful data rather than just status updates. RF would work great for something simply being dragged, but since you have to connect a bunch of hydraulic lines anyway, having a little cable (trailer wire for example) wouldn't make it much harder.

Like I said in an earlier post, the other advantage of having the seperate monitor on the tractor is that you could use that same unit to monitor different attachments. It's nice to be able to take the Arduino off when you're not using it, but you might be better off just getting a cheap Arduino clone (like the RBBB) that you can permanently mount in a sealed water-tight enclosure right on the attachment. This way, if you have Arduinos on multiple attachments, it's just plug and play rather than having to re-upload the code, reconnect each pin, and mount it securely again.

Thanks again for replies guys.

Taking Parcanman and cr0sh's advice, I found out I could save time and hassle by just buying the john deere tubes which have a sensor to detect a falling seed and will try to attach them to the Arduino. I'm thinking that might be CDS cells Parcanman mentioned. The advantage of using the Arduino will be the ability to figure out the number of seeds planted per acre.

You can get a 5 pack of CDS cells at radioshack for 3 bucks, so if the tubes from John Deere are somewhat expensive, you might be able to save some money with just opaque PVC or metal conduit tubes. Since you most likely won't be planting at night, you might even be able to avoid the LEDs by just drilling a hole in the tube across from where the CDS cell is. You might have enough natural light coming through that hole, but drill it with a 5mm bit just in case you do need to stick an LED in there.

Just in case you don't know, a CDS cell is a photoresistor. It works like a resistor that decreases in resistance as more light is applied to it. Basically, it's what they put on street lights to make them turn on automatically at dusk. The idea I'm thinking is a simple CDS cell inside an opaque tube with a light source directly across from it. Each time a seed falls between the light source and the CDS cell, the resistance will spike, working somewhat like a switch that goes on and off really fast, but would still be detectable by the Arduino.

John Deere makes some really nice machines, they are a lot of things, but cheap is not one of them. If you order them from JD, you might end up spending a lot more for one tube than it would cost you to build enough for the whole machine.

One nice thing about using your Arduino rather than buying a monitoring system from JD (aside from the price, and the fun of building it) is that you could even add in a safeguard to the coding where if a CDS cell is blocked for more than a fraction of a second (say one second) that could automatically set off an alarm saying that you have a clog in the tube.

With corn, you might even be able to get away with lever switches in the tubes where the seeds hit the lever and activate a switch. This might be easier for a beginner to work with than the CDS cells (but not by much) but any seed smaller than a corn kernel might not set it off. A small CDS cell on the other hand can be as small as 1/3" and should be able to detect enough of a drop in the light as long as the seed passes directly in front of it (using a half-inch diameter tube should solve that problem).

I'd be a little bit careful about CDS cells. I think they are quite 'slow'.

I really don't understand the details of how fast seeds are fed. So it may be so slow that this is not an issue.

I think, to count seeds, they should move past the detector, on average, almost individually.

Otherwise several could fall at the same time, and it might be hard to detect what is happening. (To be fair it is consistency which makes things easier. So if there are almost always 3 together, it is less of an issue.)

As the feed rate increases, I think the seeds need to be travelling at higher speeds to reduce the chances of 'groups' moving past the detector together.

If the speed gets high enough, to cope with a significant feed-rate, CDS cells may be too slow (they have a rise and fall times of 10's of milli seconds).

You may be better off using phototransistors.

[edit]You may want to think about other sensing techniques too. Depending on the geometry of the tubes, small lasers may be a reasonable bet for illumination. Even the sound of the seed bouncing off a surface within the tube may be practical to detect with a cheap microphone and a bit of filtering.[/edit]

Just a thought.

GB

John Deere makes some really nice machines, they are a lot of things, but cheap is not one of them. If you order them from JD, you might end up spending a lot more for one tube than it would cost you to build enough for the whole machine.

Parcanman:

A couple of things you're not realizing:

  1. John Deere's stuff is made for John Deere's machinery
  2. I would hope phishstik is more interested in planting corn than fiddling with a bunch of PVC pipes stuck on his machine

You are right that he could probably do it cheaper; but, should something fail, or not work right, or for some reason causes damage to occur to the planter (or even if it didn't) - if John Deere found out about the non-Deere "custom" modifications, and phishstik is still in the warantee period or whatnot - they probably won't cover any repairs or such.

It might be that Deere's parts are of a specific size, shape, or design to minimize or eliminate the possibility of jamming or such to occur, because they are designed to work with the machine.

If phishstik is spending more time fiddling with a custom detector system than he is planting corn, I would say that would be a loss to his business. At least by using the parts from Deere, he can get on with the planting of corn, and even if the Arduino side fails, he will probably still be able to see that corn is being planted.

Oh - and even if you do go with custom PVC pipes as Parcanman is suggesting, phishstik, I would suggest keeping the LED in there instead of natural light; you know as well as I do that mud/dirt will find that hole and plug it up quick (Murphy's Law and all that).

:slight_smile:

But what he was talking about was using the John Deere sensors with his Arduino. I would imagine that the warranty provided by John Deere would only cover the sensors if they were used with the John Deere monitoring system they were designed for. If he were to use that monitoring system, that would completely bypass the whole point of using the Arduino.

I'm not saying that making your own sensors is definately the best way to go, but if it turns out that the whole sensor system is nothing more than a light detector inside a tube, why spend the extra money to buy the special sensor tubes only to connect them to a system they weren't designed for?

Especially since depending on the design of the John Deere sensors, he might have to modify them, or design a custom circuit just to be able to get a reading out of them. In this case, either method could work, but I just think it's possible that it might be easier just to design sensors to work with the Arduino rather than voiding the warrantees on special sensors, especially if they're more complicated and need extra engineering and work to make them work with the Arduino.

That is a good point, but I would still be wary about attaching tubes to the planter that aren't designed for it, if for no other reason than jamming (unless there is nothing special about the John Deere tubes).

There is also the "time/money" angle; the time phishstik would spend fabricating the tubes and sensors might be worth more to him (for any number of reasons) than buying the tubes outright from John Deere. They also might be more rugged, have everything needed on them to connect them easily to the equipment (for all I know, there are special connectors that, with a standard PVC pipe, you would have to alter the machine itself to get it to fit), etc.

Lots of variables, most of them only phishstik will be able to answer for himself since he has the equipment in front of him - he very well may be able to adapt simple PVC pipes and other sensors, but he needs to weigh the options carefully; this is his business, after all, and not an after-school hobby, I suppose.

:slight_smile:

For an optical detector you might want to use a photo transistor as they can be quite quick. As normal light might be a contaminating issue, You might want to look at using modulated IR like in tv remote controls. Radio Shack has the 38khz IR detectors and one can make the IR transmitter using a 555 timer chip. the next thing to do would be to capture a very quick seed "event". To some what simplify the capture, you could use the 555 chips to make a "watch dog" event detector to monitor the falling seeds. If the seed does not break the beam within a specified time, an alarm signal is generated. You might google for bee counters that are used to count bee activity in hives.

To answer more questions, the planter is quite old probably a late 70's model planter (but VERY well taken care of) - so warranty is no issue.

I looked at the tube where the seed falls, it is just a vertical square plastic tube. Also found out, if I bought new tubes with sensor they would cost over $120 for EACH tube from JD!

So I'm all for trying my own sensors. Probably just working them into the tubes already on the planter. One concern is that the tube's width is like, 5 times the width of a single corn seed. So it would seem possible that it could fall past a single CDS cell and perhaps miss it entirely. I guess that depends on the CDS I choose.

I don't think the seeds will fall to fast for a CDS, I'm roughly guessing 2 to 3 kernels fall every second. Sorry I know I promised pics, I'll get them on tomorrow morning!

Maybe you could use something smaller, like small diameter copper tubing or such? You might also be able to find smaller diameter plastic tubing (PVC or ABS) via an industrial supplier or such - alternatively, browse the shelves at Lowes/Home Depot/Ace Hardware/Tractor Supply/Wherever - and see what might be able to be repurposed...

zoomkat, if the IR LED and photo-transistor are mounted opposite each other via holes in the tube, and the tube is fairly "light-tight", then modulation would probably not be necessary. I would try it without first, and if there seemed like problems, add it afterward (set up a test rig with the tube in a jig, and drop a few grains down a funnel into the tube - then try it outside in the sun). Your idea on "bee counters" though is interesting, and could be useful for the development of this project.

phishstik, if it seems like polling for the drop of the grain event is too slow (really, with proper coding, it shouldn't be), then setting up the sensor to trigger an interrupt, and counting that way, would be the way to go; although unfortunately, setting this up isn't "beginner territory", but it isn't as difficult to understand as it may seem...

:slight_smile: