0
\$\begingroup\$

schematic

simulate this circuit – Schematic created using CircuitLab

I am designing a driving system to control some servomotors, and since my microcontroller can not drive enough current, I had thought in do this with some LM324 as comparators.

The thing is that I have a fixed 5 VDC source, and I want the negative input of the opamp being 1V. This way I can source the LM324 with 5 VDC being sure it will not switch.

I have two questions:

  1. It is correct if I just put a voltage divider between my DC Source and the input of LM324N?

  2. Since the input impedance of LM324N is very high, I was thinking of using only one voltage divider instead of one for each input, is this correct?

EDIT: As you can see in the schematic, my idea was to drive the servomotor with the lm324. Output current of this operational amplifier is about 20mA acording datasheet. My servomotor is the famous sg90 towerpro, there is a lot of missunderstanding about how many current does it draw. As @Peter Bennet commented, I thought lm324n does not source too much current, so I did an experiment and it worked fine. So I thought it would be enough.

However, your solution is great @Arturas Jonkus, I did not think about it, so I think I will go around it. It makes much more sense than using a logic component.

Thank you very much to all of you, What a great community!

EDIT2: I have been wrong in my questions, so I was wrong in my concepts from the very beginning. My servomotor has 3 pins: VCC (current comes from here), GND, and PWM. So it was perfectly ok with using a logic device such as a comparator to control the servomotor because it draws the current from VCC, not from the PWM pin. I want you to IGNORE my question because I was completly wrong. I am very sorry.

\$\endgroup\$
  • 2
    \$\begingroup\$ Welcome to EE.SE. We love schematics. There's a button on the editor toolbar and it's easy to use. Comparitors are generally used to compare rather than as current drivers. Please explain where you came up with your scheme and link to any part numbers you mention. \$\endgroup\$ – Transistor Jul 9 '16 at 19:25
  • \$\begingroup\$ What current are you expecting the LM324 to handle? Its specified output current isn't much more than most microcontrollers can provide. \$\endgroup\$ – Peter Bennett Jul 9 '16 at 19:28
  • \$\begingroup\$ No need for grovelling apology. We all had to learn. One thing to learn from this experience is that you need to supply the relevant details in your future questions. In this case someone would have spotted your error quite quickly. See my answer below - it may help further clarify your understanding. \$\endgroup\$ – Transistor Jul 10 '16 at 16:09
  • \$\begingroup\$ My answer doesn't have any relevance now that you provided additional information. I'm deleting it \$\endgroup\$ – Artūras Jonkus Jul 10 '16 at 16:13
0
\$\begingroup\$

My servomotor has 3 pins: VCC (current comes from here), GND, and PWM.

This makes control very simple. Your servo has all the stuff needed to handle the relatively high motor currents.

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 1. Direct connection between micro and servo unit.

Now you just need to figure out the PWM scheme your servo unit uses and write the code for that.

\$\endgroup\$
  • \$\begingroup\$ Exactly! That is what I will do:) \$\endgroup\$ – Sergio Castillo Jul 11 '16 at 16:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.