Attiny, risk of supplying 5V on GND and 0 on PB IOs

Go To Last Post
11 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi, I'm designing a circuit with an attiny85

 

It will have a connector 3 pin JR (Servo style) connector (with the power supply in the middle, GND one side, PB2 on the opposite)

Is there any risk in case of connecting the wrong way which means inversion between GND and PB2 ?

 

In this case there will be

pin GND : PWM 0V - 5V 

pin PB2:   0V 

pin VCC : 5V

 

Is this a problem, any risk off damage of the MCU ?

Thanks

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Come on! Put your thinking cap on. What happens if your code tries to drive PB2 high? Or your PWM tries to drive to ground?

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Back when I were a lad servo plugs and sockets had a little "spade !->" in them so they could only be plugged in one way round.

 

 

EDIT: Oh and as you mentioned JR rather than Futaba here is a corresponding "JR" picture - no "spade" this time but note the bevel on top of the plug? If the socket has a similar bevel then you won't be able to plug this in the wrong way round either.

 

http://www.fatlion.com/sailplanes/images/jrconnector.png

 

In my experience of using various "cheap and cheerful" R/C receivers that just had 3 raw pins rather than the expense of a fancy plastic socket housing I think servos must have diode protection anyway as I've never seen damage if they are plugged the wrong way round. Similarly if you are using an ESC with BEC then I've not had problems with Rx damage if the servo/BEC lead to the ESC is the wrong way either.

Last Edited: Mon. Apr 11, 2016 - 12:51 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You're right, It needs at least a resistor.

But my question is still the same. Is there any problem if I connect in reverse way:

 

JP1 pin 1 : PWM 0V - 5V 

JP1 pin 2 : VCC

JP1 pin 3:  GND

 

Thanks

 

 

 

Last Edited: Mon. Apr 11, 2016 - 12:56 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It will not have "mechanic" that prevent inversion as the connector is just 3 pin header

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

But it's the AVR PSU circuitry (that your diagram does not show) that is supplying power to the servo not the other way around isn't it? So the question is surely: are servos damaged if the connector is the wrong way round. As I say the answer would appear to be "no" as I've often done this when connectors are not keyed.

 

Or are you saying that the AVR is, itself, going to be plugged into an RX as if it were a servo and that the RX (presumably from a BEC) is then the one supplying power TO the AVR?

 

As I say you can save yourself a lot of hassle here using mechanically keyed plugs/sockets with spades/bevels that simply won't allow plugs to be physically plugged into sockets the wrong way round.

 

Otherwise take a look at some normal servo circuit boards and see what they are doing in terms of diode protection or whatever.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In this situation, wouldn't the AVR go in and out of reset?  When GND goes to 5V and Vcc is 5V that would cause a reset, right?  Now, with 0V on PB2, does that violate Absolute Maximum Ratings?  Dunno.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Here is the almost the full schematic, basically  attiny85 measures pwm on PB2 and change the output PB3 depending of the PWM 

That's exactly my question.

The Attiny will not start as it it is not polarized correctly (same level on VCC and GND pin) , but does the "-5V" compared to what is provided to GND pin will damage the mcu ???

 

JP1 will not go to a servo, it will be plug to a RC receiver like a RC servo 

SO JP1 pin 2 and 3 provide the supply and JP1 pin 3 provide signal line to the Attiny85

 

It's fairly simple when it's connected correctly but when it's plug inverted I was wondering if there was a risk of mcu damage

 

Last Edited: Mon. Apr 11, 2016 - 02:41 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sorry I don't understand your answer.

When it is pluged correctly I don't see any problem with the schematics, even if PB2 is in output (which is not the case it will be an input)

If it's plugged incorrectly the attiny85 doesn't start ... so what a happen ?

Could you give more details 

 

Thanks

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

> @clawson "Or are you saying that the AVR is, itself, going to be plugged into an RX as if it were a servo and that the RX (presumably from a BEC) is then the one supplying power TO the AVR?"

Yes, this is what I want to do