go away spammer

Author Topic: Pinouts in sensor modules  (Read 4468 times)

0 Members and 1 Guest are viewing this topic.

Offline praveen_khmTopic starter

  • Full Member
  • ***
  • Posts: 48
  • Helpful? 1
    • Robot Platform
Pinouts in sensor modules
« on: August 13, 2013, 06:21:45 AM »
Hi,

I have purchased different sensor modules like light sensor, Microphone module, IR transmitter module and many servo's. However what actually confuses me is the pinouts of each of these sensors. Some of the arrangements I have seen for Pins 1, 2 and 3 are:

VCC - GND - SIG  (where Sig is input or output signal)
GND - VCC - SIG
VCC - SIG - GND

Now, what is the correct way to design this? With my limited knowledge, I feel SIG - VCC - Gnd is an ideal way. Can somebody confirm is there is a documented way to design such boards, or is it that each manufacturer does what he/she feels it right?
Robot building is all about sharing and learning
-------------------------------------------
www.robotplatform.com : Beginners guide to Electronics & Robotics

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 99
Re: Pinouts in sensor modules
« Reply #1 on: August 13, 2013, 07:01:54 AM »
There is no standard so different makers will pin out differently. This has even been so on RC servo pinouts from different makers.
My preference is the have the GND in the center.
The thing to consider is what would happen if the connector was inserted backwards?
This is a very good reason not to have Vcc & gnd on the outside pins, reverse polarity and most likely smoke. So with GND in the center it is always connected correctly. Then if Vcc and sig are reversed this is usually ok for most devices (caution and/or protection needed for devices that sig is an output).

Offline praveen_khmTopic starter

  • Full Member
  • ***
  • Posts: 48
  • Helpful? 1
    • Robot Platform
Re: Pinouts in sensor modules
« Reply #2 on: August 13, 2013, 07:28:34 AM »
Quote
So with GND in the center it is always connected correctly. Then if Vcc and sig are reversed this is usually ok for most devices

Thanks waltr. You have a point.
The problem is I have a board with SIG - VCC - GND pins (like axon?). I was hoping to make the modules fit right on the board. With SIG - GND - VCC, I would have to change the wiring while inserting the sensors.
Robot building is all about sharing and learning
-------------------------------------------
www.robotplatform.com : Beginners guide to Electronics & Robotics

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,345
  • Helpful? 82
Re: Pinouts in sensor modules
« Reply #3 on: August 13, 2013, 11:05:57 AM »
The right design is the one that is the most efficient for the current conditions. Very seldom do you actually design in a vacuum.
If you have a board with GND - VCC - SIG layout, then I suggest you stick to that. That is, by the way, also the layout of most current hobby RC servos, and the Dynamixel TTL bus.

Personally, I prefer keyed connectors, which is easy to do with an additional pin. In this case, it might be GND - VCC - n/a - SIG. Cut off the n/a pin, and plug the hole in the female connector. Now there's no risk of reverse polarity insertion!

Offline johnwarfin

  • Full Member
  • ***
  • Posts: 120
  • Helpful? 3
Re: Pinouts in sensor modules
« Reply #4 on: August 13, 2013, 02:53:38 PM »
i disagree with statements that there is no standard or best pinout. 99% of all servo, esc, etc use gnd/vcc/sig (blk/red/wht or brn/red/org). any other arrangement is asking for trouble. this is the only one that allows plugging in backwards w/o damage. there have been attempts at deviation from this but the "darwin principle" quickly weeds out the losers.

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,345
  • Helpful? 82
Re: Pinouts in sensor modules
« Reply #5 on: August 13, 2013, 08:27:34 PM »
But this gentleman is not plugging in servos, he's plugging in vaguely specified components into vaguely specified backplanes. If there's some existing thing he wants to interface with, using the particular solution of that thing is likely best.

Also, a keyed connector (4-way with one deleted) is going to be safer than a possible-to-reverse 3-pin connector. So, clearly, the 3-pin connector is not "best" as it can actually be reversed, which, at a minimum, leads to "it doesn't work."

Btw: A Dynamixel TTL connector, if plugged in reversed (which is hard as they connectors are shaped,)
will put a high voltage on the TTL bus and burn it out. Consider:
+12V is +12V. Fine.
TTL on the servo is GND on the plug. Fine, -ish, as there will be a leakage current from the pull-ups.
GND on the servo is TTL on the plug. This is not fine, because the controller will keep the TTL at 5V.
This means that "GND" is held at 5V, which hs -7V from VCC. This means that "TTL" is held at 0V, which is -12V from VCC, and -5V from GND. The buffer chips in the Dynamixels don't like negative voltages.
This is actually a problem in digital RC servos, too -- the reason it's not AS dangerous for RC servos, might be that the signal line isn't normally held at 5V, and the power on the VCC line is typically in the 4.8V to 6V range.


Offline johnwarfin

  • Full Member
  • ***
  • Posts: 120
  • Helpful? 3
Re: Pinouts in sensor modules
« Reply #6 on: August 14, 2013, 12:11:03 PM »
But this gentleman is not plugging in servos, he's plugging in vaguely specified components into vaguely specified backplanes.

op did specify 3 pins. in addition to servos, esc, brushed motors, relays, etc that type pinout also works for 99% of the sensors out there (ldr,led,hall,ir,phototransistor,reed sw,thermister,et al). and in every case, unlike other pinouts, plugging in backwards does no harm. i didnt say it was the ONLY type configuration to use but imo it is the best.

i also favor 4 pin keyed similar to what you mention but only for power and where we may have  different voltages like 12v and 5v on the same plug. instead of random order ive chosen to remain compatible with pc power supply (12v/key/g/5v). this also has the major benefit of being impossible to damage by plugging in wrong.

everybody is certainly entitled to different viewpoints and their own idea of whats "best". but aside from opinions and preferences there is usually one solution that actually is more standard and safer in real world applications. there are situations where 3 pins is not enough but i do believe the servo pinout you 1st mentioned in previous post meets those criteria in most cases.

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,345
  • Helpful? 82
Re: Pinouts in sensor modules
« Reply #7 on: August 14, 2013, 06:23:22 PM »
Quote
unlike other pinouts, plugging in backwards does no harm

I also posted what I think was a pretty clear description of "here's how Dynamixel servos die when you plug in the GND-VCC-TTL plug the wrong way." I would argue that this shows that the GND-VCC-TTL layout does not magically mean "no harm will happen when you plug it in backwards."

Also: even better are connectors that work both ways. GND, VCC, SIG, VCC, GND, for example :-)

« Last Edit: August 14, 2013, 06:28:04 PM by jwatte »

Offline johnwarfin

  • Full Member
  • ***
  • Posts: 120
  • Helpful? 3
Re: Pinouts in sensor modules
« Reply #8 on: August 15, 2013, 09:58:26 AM »
thats hard to believe but i suppose if you try hard enough you can design a circuit that will self-destruct if you just stare at it too long. apparently they decided a 1k resistor was too much to invest in a $50 item. its certainly an example of incompetent design and good reason to stay away from that product.

out of dozens of different rc servo models ive had experience with probably half of them were plugged backwards at one time or another and there has never been a single case of damage. anyway im convinced in the realm of 3 pin servo/sensor wiring the industry standard pinout cant be beat.

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,345
  • Helpful? 82
Re: Pinouts in sensor modules
« Reply #9 on: August 15, 2013, 12:17:28 PM »
Quote
apparently they decided a 1k resistor was too much to invest in a $50 item

Even with a resistor, the voltage differential is enough to kill the buffer CMOS. It's not about current, it's about voltage, and specifics of silicon process. There's a reason different silicon devices come in different voltage ratings! It's quite likely that the reason most RC servos survive being hooked up wrong is some combination of their power voltage being close to the signal voltage, and the servos not doing high-speed UART communications. Feed 12V into a Hitec digital feedback servo signal pin, and you just might see one of those servos die, too!

Also, with a 1k resistor, the time constant on the input gate of the UART becomes too long, and megabit-speed communications will not be possible.

Don't get me wrong -- I think that, if you want a three-pin connector, GND - VCC - SIG is probably the most optimal layout, so we agree on this point. I just think, based on experience and circuit analysis, that that's not /enough/ to make a truly fool-proof connector, if that is the goal.

Offline johnwarfin

  • Full Member
  • ***
  • Posts: 120
  • Helpful? 3
Re: Pinouts in sensor modules
« Reply #10 on: August 15, 2013, 03:16:27 PM »
seeing some of the units coming back from the field and hearing phone support stories i would have to agree there is no 100% foolproof solution. one fellow mentioned putting 110vac in with the theory that if torque and speed were good at 6v then 110v would improve things BIG TIME. true story. lol!

 


Get Your Ad Here