Verification of Tool Mounting
roryaronson opened this issue · 9 comments
The Universal Tool Mounting System currently incorporates 4 electrical contacts (+12V, GND, and two for data from the Arduino [input or output]). These contacts connect with matching contacts on tools to support a variety of operations.
It will be important to verify that a tool has been mounted or dismounted correctly. This could be done by having an extra electrical contact that is an input to the Arduino. This extra connection could have a jumper on the tool to one of the data wires acting as a 5V output. When the tool is mounted, the extra contact will read 5V, when it is dismounted, it will read 0V.
Hmmm now that I think about it, we may not want a tool to become active (via the 5V on the data line) right when the tool is mounted. So maybe there should be two extra connections that are dedicated to detecting if tools are mounted?
What do you think @TimEvWw?
If you have an extra pin, you could run a diagnostics. Say you have a pin
'enable'. If the pin is 1, the data 1 and data 2 is linked to the tool
itself. If the pin is 0, the data 1 and data 2 are disconnected from the
tool, but are instead linked (through resistors) to power and ground, so on
say 3 volts if everything is connected. Arduino can read the data lines. If
those are 3 volts, all connections are okay. The switching between
test/production could be done with a relay or transistor. I last did
electronics a long time ago, so not sure how that works. A relay would be
easiest but there are probably cheaper solutions.
If you use I2C, you would simply send a command to read a status to the I2C
chip. If you get a reply, all connections are ok.
On Thu, Nov 20, 2014 at 11:40 PM, Rory Aronson notifications@github.com
wrote:
The Universal Tool Mounting System currently incorporates 4 electrical
contacts (+12V, GND, and two for data from the Arduino [input or output]).
These contacts connect with matching contacts on tools to support a variety
of operations.It will be important to verify that a tool has been mounted or dismounted
correctly. This could be done by having an extra electrical contact that is
an input to the Arduino. This extra connection could have a jumper on the
tool to one of the data wires acting as a 5V output. When the tool is
mounted, the extra contact will read 5V, when it is dismounted, it will
read 0V.Hmmm now that I think about it, we may not want a tool to become active
(via the 5V on the data line) right when the tool is mounted. So maybe
there should be two extra connections that are dedicated to detecting if
tools are mounted?What do you think @TimEvWw https://github.com/TimEvWw?
—
Reply to this email directly or view it on GitHub
#17.
I think it would be more simple to have two dedicated pins for checking if the tool is mounted rather than only one extra pin and a transistor or relay in every tool. Some tools may be very simple and not even have/need any electronics. For example: the watering nozzle is just that - a nozzle. All we need to know is if it is attached or not, and so the two screws with a jumper wire would be the easiest to home manufacture.
Hmm another thought is that we may want to be constantly monitoring/verifying that the tool is attached. What if someone makes some crazy tool that falls off the mount during use? We want to detect this and send a message to the user and also stop trying to use the tool! This is another reason for having dedicated pins to verifying mount status.
Now that I am thinking about what types of connections we might want, I am finding a lot more. Here are the possible ones we could support. What do you think we should include? I put [yes, #] to the ones I think we should include and how many.
- Ground [yes, 1]
- +3.3V from Arduino
- +5V from Arduino [yes, 1]
- +12V from RAMPS [yes, 1]
- Pins from a Stepper Driver on RAMPS
- Arduino digital I/O pins with PWM [yes, 3]
- Arduino analog inputs [yes, 1]
- Pins to the GPIO of the Pi
- Pins to a USB port on the Pi (for webcams, etc) [yes, the 2 for data]
I have 9 pins in the setup above. Ground is obviously necessary. Tool verification would happen between the +5V from the Arduino and a digital I/O pin dedicated as the verification input. The other two Digital I/O pins would act as data ins or outs or I2C communications. The +12V from RAMPS allows for high power tools (motors for drilling holes). The analog input would be good for analog sensors such as a thermocouple. And the 2 to the pi would be for USB data for a USB camera, or potentially other USB based tools. I think I could fit all of these into a fairly small Universal Tool Mount! Haha
I was thinking of using the pin to check all other inputs to do a more
complete self-diagnostic instead of just checking one pin. But it would
take a bit more electronics.
Also, you can't use the PWM pins as I2C pins and vice versa.
On Mon, Nov 24, 2014 at 7:51 AM, Rory Aronson notifications@github.com
wrote:
I think it would be more simple to have two dedicated pins for checking if
the tool is mounted rather than only one extra pin and a transistor or
relay in every tool. Some tools may be very simple and not even
have/need any electronics. For example: the watering nozzle is just that -
a nozzle. All we need to know is if it is attached or not, and so the two
screws with a jumper wire would be the easiest to home manufacture.Hmm another thought is that we may want to be constantly
monitoring/verifying that the tool is attached. What if someone makes some
crazy tool that falls off the mount during use? We want to detect this and
send a message to the user and also stop trying to use the tool! This is
another reason for having dedicated pins to verifying mount status.Now that I am thinking about what types of connections we might want, I am
finding a lot more. Here are the possible ones we could support. What do
you think we should include? I put [yes, #] to the ones I think we should
include and how many.
- Ground [yes, 1]
- +3.3V from Arduino
- +5V from Arduino [yes, 1]
- +12V from RAMPS [yes, 1]
- Pins from a Stepper Driver on RAMPS
- Arduino digital I/O pins with PWM [yes, 3]
- Arduino analog inputs [yes, 1]
- Pins to the GPIO of the Pi
- Pins to a USB port on the Pi (for webcams, etc) [yes, the 2 for data]
I have 9 pins in the setup above. Ground is obviously necessary. Tool
verification would happen between the +5V from the Arduino and a digital
I/O pin dedicated as the verification input. The other two Digital I/O pins
would act as data ins or outs or I2C communications. The +12V from RAMPS
allows for high power tools (motors for drilling holes). The analog input
would be good for analog sensors such as a thermocouple. And the 2 to the
pi would be for USB data for a USB camera, or potentially other USB based
tools. I think I could fit all of these into a fairly small Universal Tool
Mount! Haha—
Reply to this email directly or view it on GitHub
#17 (comment)
.
I see. Hmmm I think it is most likely an all or nothing type connection. In other words, I don't think that a properly mounted tool would not have all connections made. For that, I think just testing for correct mounting is enough.
My understanding is that the PWM pins can set to any of the following modes:
- Digital In
- Digital Out
- PWM Out
- I2C (Just a specific way of using the pin as a Digital In or Out)
Is this not correct? If not, where would the I2C wires plug into?
http://arduino.cc/en/Main/arduinoBoardMega
some pins have specialized functions:
- PWM: 2 to 13 and 44 to 46. Provide 8-bit PWM output with the
analogWrite() http://arduino.cc/en/Reference/AnalogWrite function. - I2C: 20 (SDA) and 21 (SCL). Support I2C (TWI) communication using
the Wire library
http://wiring.org.co/reference/libraries/Wire/index.html
(documentation on the Wiring website). Note that these pins are not in the
same location as the I2C pins on the Duemilanove or Diecimila.
On Tue, Nov 25, 2014 at 12:44 AM, Rory Aronson notifications@github.com
wrote:
I see. Hmmm I think it is most likely an all or nothing type connection.
In other words, I don't think that a properly mounted tool would not have
all connections made. For that, I think just testing for correct mounting
is enough.My understanding is that the PWM pins can set to any of the following
modes:
- Digital In
- Digital Out
- PWM Out
- I2C (Just a specific way of using the pin as a Digital In or Out)
Is this not correct? If not, where would the I2C wires plug into?
—
Reply to this email directly or view it on GitHub
#17 (comment)
.
Aha. Ok, so perhaps we want a Tool Mount with: Ground, +5, +12, two PWM, 1 digital I/O, 1 analog in, the two for I2C, and two for USB? Sheesh, that's 11 pins! That might be ok though. I'll mess with some designs. I guess it's better to have more options/abilities than less because we don't want users/hackers to feel limited by their universal tool mount. They should be able to hook in whatever they want I think.
There is also the pin for connection check. So 12 pins.
It's either providing a lot of convenient pins or use I2C or usb to replace
the analog, pwm and digital pins, but that would make the tool electronics
(too) complex.
On Tue, Nov 25, 2014, 11:08 Rory Aronson notifications@github.com wrote:
Aha. Ok, so perhaps we want a Tool Mount with: Ground, +5, +12, two PWM, 1
digital I/O, 1 analog in, the two for I2C, and two for USB? Sheesh, that's
11 pins! That might be ok though. I'll mess with some designs. I guess it's
better to have more options/abilities than less because we don't want
users/hackers to feel limited by their universal tool mount. They should be
able to hook in whatever they want I think.—
Reply to this email directly or view it on GitHub
#17 (comment)
.
Yes, 12 was what I was going for anyways with the new design. I agree that it is better to provide more pins and keep the tools simpler. After all, we already have all the functionality we need at the Arduino. Maybe one day someone will create FarmBot 'Pro' tool mounts and tools that are I2C only, so everything is smaller and 'cleaner'.
I was talking with some folks though, and they all agree that the more pins the better. People are going to want to hack this thing in ways we can't even imagine and we should provide the capability for that out of the box by supporting all types of communication or easier possibility for re-wiring it for custom functions. This goes for the number of liquid and gas lines too. The new design has 6 of them.
So this will all be done with the sequence builder and just reading/writing pins