Tool verification resistor?

Have you considered using a resistor on the tool verification pin? That would allow the Arduino to identify different heads by measuring the resistance using a voltage divider. Disadvantage is that a dodgy connection between head and tool would cause a misidentification. Or, use a Dallas Semiconductor “One Wire” identifier chip. The trouble there is that the chip just gives you back a magic number. Turning that into a tool type means making a lookup table.

It could be put on a very small PCB sized to fit between two screws.

Right now the plan is that FarmBot will know what tool is where based on the user inputting that information into the web app. ie: The Watering Nozzle is in Slot 1 in Tool Bay 1. Assuming FarmBot puts the tool back in the same spot it picked it up in and the user doesn’t swap the tools by hand without updating the web app, then there is no need to be able to identify the tool.

It would be weird if FarmBot had to mount the tool to figure out which one it was. It should know that ahead of time - just like how it “knows” where plants are based on the farm designer. I guess being able to identify the tool would be a nice error detection feature. ie: if the user screwed up by moving their tools around without updating the app.

The identifier chip and resistance method would be a cool way to implement that. I think that would be most useful in a more consumerized/easy-to-use bot. Will be fun to experiment with!

Along these lines, the tool bay itself could be “smart” such that it could identify when tools are placed in it - and what kind. That would probably be more useful than only being able to identify the tool once its mounted. In this case, the user could buy a new tool and pop it in - or shuffle their tools around in the bay - and FarmBot would know where they all are and what types they are. That would be awesome!

You may be able to do this utilizing the camera and matching an (image, number, holes, hashes, raised bumps, etc) placed on the tool around the top edge so it doesn’t interfere with the tools function. That way it could just glide over the top of all tools and know what tool is below it.

1 Like

I think the easiest and cheapest way to implement this is using NFC tag stickers. the UMT doesn’t even have to fully mount the tool in order to identify it. It could hover a couple of centimeters above the tool bay and do a sweep above all the tools and it would identify whatever is in each bay slot.

NFC tags are really cheap. I don’t know how much a reader costs, though.

Rory’s suggestion of making the tool bay smarter could work in the same way. When a tool is slotted, the NFC tags would ‘fist bump’ and the tool bay could inform the gantry what’s in each slot.

I like the CV idea. It is the lest expensive and simple to implement. All thats needed are id markings designed into the tool. Then training the CV algorithm to identify it. Less wiring. Roy has stated that the bigger the system is the resistance increases on moving the gantry. It also reduces the cost of material. My only concern is the amount of space on the sd card for openCV. It also takes proccesor power. Is the pi able to do all this?

The CV idea is a neat one, especially because it is using the existing hardware to perform another function. I think the SD card would have plenty of space and the Pi3 is pretty powerful. The key with it working reliably is getting good contrast on the markings and consistent lighting for photos.

NFC is indeed inexpensive for the tags, but the readers are more expensive, somewhat finicky to deal with, and usually bulky. From what I can tell, it would be difficult to fit a reader into the UTM.

Thanks Rory. I have loaded Open CV on a Pi2 but I was using a Pi camera. It worked but their was some other things need to get the pi camera and OpenCV to work together. I am going to pop over to the Pi section to see what everyones upto.

Another option (as long as tools are 3D printed, rather than injection molded) would be to have a coded series of “bumps” coming out horizontally from the side of the tool. (Think of hammering a finishing nail in so that 1/8" still sticks out.) These could be below the “English” name labels that are already included. I am not sure what the camera resolution is. However, as long as the first “bump” is always in the same location, the rest of the “bumps” could provide a binary number to identify the tool.

Having worked in the plastics injection molding industry a bit (MANY years ago), I will say that getting molds built for these parts is going to be very expensive. You need to know you are making a LOT of parts to cover the cost. With the dramatic decrease in cost of 3D printing (and Moore’s Law will continue to apply), within a VERY few years 3D printing is going to be replacing a lot of injection molding, rather than the other way around.

Connecting the verification pin to a resistor is a LOT simpler than trying to identify the tool using CV. Just make it a voltage divider and feed it into an ADC pin on the micro. Even precision resistors are a dime each.

1 Like

One other way it could be done is by creating a standard for the tool head colors. Water could be blue, for example. Idenifying color is esayer and will narrow the search quicker. It would also help us humans to identify the tool heads… Are the heads color coded?

The only onther issue is with others printing parts there may not follow the standard.

1 Like

At this time we’re thinking all of the tools will just be gray. So many possibilities! I think @RussNelson’s idea makes the most sense. Its low cost, reliable, and easy to set up.

If you use 1% precision resistors, you have these values available to you:
10.0 14.7 21.5 31.6 46.4 68.1
10.2 15.0 22.1 32.4 47.5 69.8
10.5 15.4 22.6 33.2 48.7 71.5
10.7 15.8 23.2 34.0 49.9 73.2
11.0 16.2 23.7 34.8 51.1 75.0
11.3 16.5 24.3 35.7 52.3 76.8
11 5 16.9 24.9 36.5 53.6 78.7
11.8 17.4 25.5 37.4 54.9 80.6
12.1 17.8 26.1 38.3 56.2 82.5
12.4 18.2 26.7 39.2 57.6 84.5
12.7 18.7 27.4 40.2 59.0 86.6
13.0 19.1 28.0 41.2 60.4 88.7
13.3 19.6 28.7 42.2 61.9 90.9
13.7 20.0 29.4 43.2 63.4 93.1
14.0 20.5 30.1 44.2 64.9 95.3
14.3 21.0 30.9 45.2 66.5 97.6

So let’s say that you used these values in the 1K to 9.76K range, and made a voltage divider using a 1K resistor. That’s 100 values (approx 7 bits) being measured by an A/C with 10 bits of precision. You give up one bit because you’re starting your measurement halfway (1K / 1K vs 1K / 9.76K), but that leaves you with 9 bits. You’ve got two bits to spare. That’s plenty. So just using a pair of precision resistors and an A/D pin, you can identify 100 different tips. That ought to be enough.


Awesome! I’m admittedly a big novice when it comes to even basic electronics so having your help here is much appreciated. We’ll order up some precision resistors and run some experiments in the coming months to see how well this will work in practice. Excited to report back the results!

I worry about having to replace damaged ones, temperatures effects, complication in the electronics and a bunch of other issues.

With QR Code cant they just use the current camera and new software? Then your not adding a whole new set of electronics and issues.

We’ll certainly need to test the various methods. If temperature ended up messing things up between a hot summer day at noon vs a cold winter with wind chill, then of course we’ll need to find something else. QR code would require the camera to have lights for night time, which it currently doesn’t.

Lots of things to consider, and really it will just take some prototypes and experiments to figure out what works best :slight_smile:

Definitely all about the QR code, quick and cheap and easily extended. The camera is needed if you want a weeding tool anyway.

Can’t wait to start building one of these farmbots, might try to find someone in the UK to work with, is there a sensible forum thread for that?

Also @roryaronson I wondered if the XL version plans are available even though it’s been put on hold…

You can see the last XL documentation in v0.9 docs: But it was never that well documented because we haven’t build a fully functioning XL system yet.

For the UK teamwork, just make a new thread for “FarmBot folks in the UK collaboration” or something :slight_smile:

You should start one that is called connections or something. Everybody could put their country in the first word of the reply. Once there are a group of two or more then each are could start their own thread. My only thoughts is that if anything comes out of the conversations that they dont forget to add the questions or information to the other threads since most people wont be going into a tread like that looking for overall information.

I like the idea of a resistor that 1) identifies the tool but 2) also allows the software to verify that the system managed to get the correct tool mounted.