Go Down

Topic: Isolation of ESC with optocoupler (Read 1 time) previous topic - next topic

MarkGoingToSpace

Hi,

I am trying to galvanically isolate a brushless ESC from my Arduinbo Uno with a optocoupler PC817. However this doesn't seem to work. When I give the ESC the PWM signal directly from the Arduino it responds accordingly. But when I go through the optocoupler it doesn't do anything.

The thing is that I tried to control a brushed ESC via the optocoupler and then it works fine. Both ESCs work with the same PWM signal (1000 - 2000us). I didn't change anything from my setup but to connect the brushless ESC in the same way as the brushed but I get nothing.

I have the suspicion that it might be due to the resister value. I have attached a sketch of my setup.


I would highly appreciate any help! Thanks.


-Mark

MarkGoingToSpace

Sorry - the image was in a not supported format. My bad

TonyWilk

Hi,
I am trying to galvanically isolate a brushless ESC from my Arduinbo Uno with a optocoupler PC817.
I suspect you need to connect the opto emitter to ESC GND and collector to PWM, maybe with the pullup to 6V+.

To know better, I'd need to know what ESC you have.

Yours,
 TonyWilk

MarkGoingToSpace

Thank you for your very quick reply!

Hi,
I suspect you need to connect the opto emitter to ESC GND and collector to PWM, maybe with the pullup to 6V+.

To know better, I'd need to know what ESC you have.
I am using the EZRUN 60A SL ESC.
Manual

TonyWilk

#4
Feb 04, 2018, 02:58 pm Last Edit: Feb 04, 2018, 03:00 pm by TonyWilk
Ok, try this:
Diagram:


Note: speed control might be backwards depending on your code

Yours,
 TonyWilk


MarkGoingToSpace

Ok, try this
This doens't work on either ESC.

But wouldn't this setup invert the signal? When the Arduino sends a 0 the PWM pin of the ESC is at 6V+ and when the Arduino sends a 1 the PWM pin of the ESC is at 0V. I am not sure if the pulse length and the pause time are the same length so this might do more than just invert the speed control.

Also is it okay to short the 6V pin with the Gnd pin like that?

outsider

#6
Feb 04, 2018, 03:26 pm Last Edit: Feb 04, 2018, 03:51 pm by outsider
Try Tony's diagram with a 10k pullup instead of 1k, PWM will be inverted.
Code: [Select]
servo.writeMicroseconds(2000 - speed + 1000);
Try 10k for RL


TonyWilk

#7
Feb 04, 2018, 03:37 pm Last Edit: Feb 04, 2018, 03:38 pm by TonyWilk
Ok, try it the other way round...
Diagram:


Also is it okay to short the 6V pin with the Gnd pin like that?
Don't understand that. The last diagram only "shorted" the PWM pin to GND, there was 1K up to 6V

Yours,
  TonyWilk

MarkGoingToSpace

I experimented a bit and got a setup that seems to work (see attachment).
Is this okay or is there somethin wrong with it? I don't want to fry any components... Is there a way to determine the resisiter values except for experimenting?

Don't understand that. The last diagram only "shorted" the PWM pin to GND, there was 1K up to 6V
Yeah, sorry you are right.

TonyWilk

I experimented a bit and got a setup that seems to work (see attachment).
Is this okay or is there somethin wrong with it?
Ah, good.

My last diagram should've worked then ?

In your diagram, when the transistor is on, the PWM pin is in the middle of 550ohm to +6V and 550ohm to GND.
So the PWM signal will only switch from GND to +3V max. That might only just be working.

Unfortunately the datasheet on the ESC give no information at all about the PWM input, it might have an internal pull-up which you have to 'override' with that low pull-down value of 550ohm.

Really needs looking at with a 'scope.

Yours,
 TonyWilk



MarkGoingToSpace

Ah, good.

My last diagram should've worked then ?

In your diagram, when the transistor is on, the PWM pin is in the middle of 550ohm to +6V and 550ohm to GND.
So the PWM signal will only switch from GND to +3V max. That might only just be working.

Unfortunately the datasheet on the ESC give no information at all about the PWM input, it might have an internal pull-up which you have to 'override' with that low pull-down value of 550ohm.

Really needs looking at with a 'scope.

Yes your diagram works just as fine and I will be using it. Thank you very much for your help!
And yes I really have to save up and buy myself a scope...

rushikeshvk99

Ok, try it the other way round...
Diagram:

Don't understand that. The last diagram only "shorted" the PWM pin to GND, there was 1K up to 6V

Yours,
  TonyWilk

So I was performing this isolation and the circuit works but the Load Resistor has to be a high value of around 10k.
Do you have any idea of how a higher valued resistor solves the problem??

jerive

I'm new to this, so please bear with me.  If you opto-isolate the PWM input signal in this fashion, are you giving up the capability of programming the device via the signal input ?  This configuration is not bi-directional, and I think it will fail to program (or read anything back from the ESC) if it can't read data back from the ESC.  Is my understanding correct?

Go Up