I'm currently working on a driver board for a pair of small FIT0185 motors with a nominal current draw of 0.35 A and a stall current of 7 A. I've opted to make two H bridges using four IR2104 mosfet drivers and I've built the schematic according to the relevant datasheet for these IC's, but I have some doubts regarding whether I've properly selected and connected my components. Naturally, I'd like to control the speed of the motors using PWM signals from an ATMEGA2560-16AU microcontroller integrated on the board. The IN_PWM_1 and IN_PWM_2 lines are connected to PWM pins OC2B and OC4B on the microprocessor, so in order to not fry my MCU I've also added some PC817 optocouplers. The outputs of the half bridges in the image are placed into JST connectors for the motors.

Is this setup good and functional?

The IR2104 half-bridges

MCU outputs

  • \$\begingroup\$ I don't see any good reason for using an optocoupler. \$\endgroup\$
    – Matt
    Commented Jul 8 at 9:39
  • \$\begingroup\$ @Matt, I've added them for extra protection in case the mosfet drivers end up frying for some reason, I wouldn't want to fry my MCU as well. Would you say that even for this reason it is completely redundant? \$\endgroup\$
    – hdaniu
    Commented Jul 8 at 9:46
  • \$\begingroup\$ AFAIU, only IR2104 could fry even in the worst case scenario. \$\endgroup\$
    – Matt
    Commented Jul 8 at 11:13
  • \$\begingroup\$ @Matt, I mean, that does indeed make more sense. I've removed the optocouplers all-together and I've connected the IN pin to the MCU pins directly. Should I leave the 1.5k resistors? \$\endgroup\$
    – hdaniu
    Commented Jul 8 at 11:50
  • \$\begingroup\$ No, these are current limiting resistors. They are needed only for optocoupler, as its builtin led has no current limit of its own. On the other hand, IR2104, as most of ICs, has internal current limit on all inputs. \$\endgroup\$
    – Matt
    Commented Jul 8 at 12:15


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.