Author Topic: Doubt regarding a circuit consisting of Optocoupler  (Read 1902 times)

0 Members and 1 Guest are viewing this topic.

Offline macbookTopic starter

  • Jr. Member
  • **
  • Posts: 45
  • Helpful? 0
Doubt regarding a circuit consisting of Optocoupler
« on: September 20, 2011, 03:54:35 AM »
Hi,

I am using my development board to drive some DC motors and to save the board from backward spikes and large amount of current drawn by the motors, I am using optocouplers to separate the board from the motor circuitry.

Since the grounds of the 2 parts must be different, we use 2 batteries for the circuit - 1 for the board and the other for the motor circuitry. I wanted to ask if there is a way to drive both the circuits from a single battery? That is, some way of using a single battery and still keeping the grounds separate. Sounds stupid but just wondering if there's a way to do it.

Thanks.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Doubt regarding a circuit consisting of Optocoupler
« Reply #1 on: September 20, 2011, 07:44:36 AM »
Hi,

Since the grounds of the 2 parts must be different, we use 2 batteries for the circuit -
I wanted to ask if there is a way to drive both the circuits from a single battery? That is, some way of using a single battery and still keeping the grounds separate.
Yes, you could use a DC-DC converter for galvanic separation, but... Why do you think that you need separate grounds?
Just connect the grounds together. If you're of the nervous type, do keep the optocouplers, but a small signal transistor will be just as efficient in keeping motor transients from your controller.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline macbookTopic starter

  • Jr. Member
  • **
  • Posts: 45
  • Helpful? 0
Re: Doubt regarding a circuit consisting of Optocoupler
« Reply #2 on: September 20, 2011, 08:17:44 AM »
Thanks for the reply and correct me if I am wrong here. I read somewhere that we use optocoupler to separate the motor's ground from microcontroller's and we do that because a heavy DC motor can draw a large amount of current and since all the current goes back to the ground, and if the board and the motors are connected to the same ground, that current can cause damage to the microcontroller or can cause it to act weird like getting it to reboot and all. Is it not so?

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Doubt regarding a circuit consisting of Optocoupler
« Reply #3 on: September 20, 2011, 12:56:26 PM »
Hi,

I read somewhere that we use optocoupler to separate the motor's ground from microcontroller's and we do that because a heavy DC motor can draw a large amount of current and since all the current goes back to the ground, and if the board and the motors are connected to the same ground, that current can cause damage to the microcontroller or can cause it to act weird like getting it to reboot and all. Is it not so?
No.
Your ground is your reference point and cannot (per definition) change, assuming a correct ground (low impedance all the way) and motor current (as well as any other current) drawn directly from the battery terminals, rather than sharing power lines.
The power line supplying the motor will carry the inductive kick back from the motors, but correctly terminated, the battery will, together with buffer capacitors, dampen it.

Using optocouplers (in this case) is just a way of getting by with inferior design but then you need two batteries or a galvanic separator like a DC-DC converter that use a real transformer.
Galvanic isolation isn't an iron clad guarantee against surges getting through - as with any other method (except the optocoupled dual battery setup), proper design is mandatory.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline macbookTopic starter

  • Jr. Member
  • **
  • Posts: 45
  • Helpful? 0
Re: Doubt regarding a circuit consisting of Optocoupler
« Reply #4 on: September 21, 2011, 03:25:56 PM »
@Soeren Sir,
I actually referred to this blogspot http://ambadatsystems.tarinbansal.com/dc-motor-operation-using-pwm-opto-couplers/ while designing my circuit. Please tell me if the circuit and explanations given on that post are wrong.

Thanks

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Doubt regarding a circuit consisting of Optocoupler
« Reply #5 on: September 21, 2011, 06:10:26 PM »
Hi,

I actually referred to this blogspot [snip] while designing my circuit. Please tell me if the circuit and explanations given on that post are wrong.
I see no reason to repeat what I wrote already. Please read it again.

Since I write something different than "Tarin, a 4th year Electronics & Instrumentation undergrad at BITS-Pilani, Goa Campus", at least one of us are wrong!

It's for you to decide whether you wanna take his words as Gospel, or if the word of an electronic engineer with over 4 decades of electronics interest and lots of motor control systems in the sack may be worth your ears.

If you wanna spend extra money and increase complexity of the circuit, feel free to do so, I just mentioned it because people asking here usually wanna build as cheap as possible and I'd personally not use optocouplers like that - if you were to interface to the mains or wanted to avoid ground loops or something similar, optos would be the right choice, but using them as a substitute for good design practice is not what I call a "legitimate" reason, but it's not my money, so you decide :)


Edit: Wonder if the name of Tarins web page (AmBadAtSystems) could be a clue   ;)
« Last Edit: September 21, 2011, 06:14:04 PM by Soeren »
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline Fr0stAngel

  • Full Member
  • ***
  • Posts: 96
  • Helpful? 3
  • [O_O] what??
Re: Doubt regarding a circuit consisting of Optocoupler
« Reply #6 on: September 23, 2011, 10:35:04 PM »
If you are really that worried about back e.m.f, throw in a couple of diodes between the motor driver and the controller. but as Soeren said, if designed carefully, and with buffer capacitors, any spike would be dampened enough to be of no damage.

Also, remember that this back e.m.f generated is directly proportional to the speed of the motor (and some other things), and they are mainly caused by abrupt change in motor direction. You may try to slow down your robot before changing direction (of rotation of motor), if operation allows.
'crazy' is the new hype! =)