Home › Forums › TinyG › TinyG Support › proximity switches.
- This topic has 3 replies, 2 voices, and was last updated 10 years ago by cmcgrath5035.
-
AuthorPosts
-
December 3, 2014 at 10:02 pm #7080ZootalawsMember
I was thinking about what I could do to replace my awful microswitch limit switches and it looks like I have three options.
1/ A more robust NC switch
2/ An optoelectronic switch
3/ An inductive proximity switch1… meh, been there.
2… they are NO, and I want NC
3… there are NC, but finding NC and 3V is proving difficult.Has anyone got any ideas how I can use a 6V inductive switch on the TinyG? Electronics isn’t my strong suit, but I can muddle around, given instruction.
December 4, 2014 at 7:08 am #7092cmcgrath5035ModeratorCan you provide a link to a typical inductive switch? I’m not sure what you are referring to.
If the switch outputs gnd(NC) or 6V, then a simple 1/2 voltage divider between the switch output and the tinyG input should work.
But first I’d like to understand where the 6V comes from.December 4, 2014 at 7:59 am #7097ZootalawsMemberIt doesn’t output 6V, it needs 6V to work. Dividing the voltage would render it inoperable.
December 4, 2014 at 9:41 am #7098cmcgrath5035ModeratorI did a little Googling on proximity switches, saw a hit relative to Arduino and proximity and looked about there.
First, here is a good reference diagram for interfacing to an Uno (5V logic), for Due and tinyG, Repalce Arduino +5V with Arduino/tinyG 3.3V
I now better understand what these are – sort of neat and should be good for your proposed application.
I saw at least one diagram that provided this info:
Sensor is a 3 lead device: Vin, Vout and Gnd.
An NPN (NC) proximity sensor has an NPN transistor output stage, which in the case I saw was pulled high internally to the Vin by a 10K resistor.So, if you supply 6V on Vin and provide no load on Vout, the device will switch between Gnd and 6V, depending on the magnet position.
If you connect a 10K resistor from Vout to GND, then the device would switch between GND and 3V, with the internal resistor and the added 10K making a 2:1 voltage divider.You’ll need a source of 6V or greater, perhaps use 12V fan voltage from tinyG and modify your voltage divider accordingly.
There is no guarantee, without deeper research, as to what the internal pull-up for a particular sensor would be, but I think you can easily experiment to figure out what it is from the above.
So you could use just this voltage divider approach, or implement 6 of the Method 1 or Method2 interfaces for maximum protection.Since this is a rather common problem, and you have 6 inputs to deal with, look around for a likely available 6 or 8 wide translator device, I bet they exist, don’t have time to look at the moment.
-
AuthorPosts
- You must be logged in to reply to this topic.