Hbridge deck design for bidirectional motor control

Firmware/software/electronics/mechanics
Post Reply
dastonge
Beginner
Posts: 10
Joined: Tue Jul 14, 2020 9:51 pm

Hbridge deck design for bidirectional motor control

Post by dastonge »

This post is a followup on this older thread: viewtopic.php?p=24295&sid=70c32a9a98c96 ... 4b0f8f0752
---------------------------
Hello!

We also have a small research project going on for which we'll need to get bidirectionnal control of our Crazyflies motors. We managed to do it, for larger models, using the ESC+Bolt setup, but we now want to control the tiny Crazyflie motors with a dedicated custom deck. We plan to populate our deck with 4 H-bridges, such as https://www.digikey.ca/en/products/deta ... R/15286883. We will hook them to the PWM signals (as it is done on the BigQuad deck https://github.com/bitcraze/hardware/bl ... rev-c1.pdf), and several digital pins (ideally 2 are required for each H-bridge to get sleep and brake features). Do you have any other recommendation on the H-bridge chip or does anyone have tried this before?

Our current options for the digital inputs are:
- get 4 available digital outputs from the CF expansion pinout to control the Hbridge direction (forward and reverse have opposite signal - we lose the brake and sleep features);
- add an I2C chip to manage all of the H-bridges inputs;
- use different PWM frequencies for forward and reverse and detect the frequency change on our deck to swap the H-bridge control inputs.

Note that we also plan on using the flow deck v2 with z-ranging and maybe the LPS deck too....

Thank you for your support,
David.
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Hbridge deck design for bidirectional motor control

Post by tobias »

It is hard to tell the best way forward and if you want to use the flow deck, LPS etc already hogging the BigQuad PWM outputs is a problem. A couple of options I can think of
  1. Use a separate MCU on the deck to drive the H-bridges and motors. Could use I2C as interface to not hog any pins but this solution requires the most software to be written.
  2. Use the current motor outputs and wire them to the deck. Not as neat and tidy solution but would not hog many pins. Especially if I2C IO-expander is used.
  3. Use your suggested solution. Works with the Flow and LPS with some hacks. LPS have to use alternative pins and Flow IO3 would have to be moved.
Either solution you chose I would go with the powerful H-bridge solution, DRV8212 which has 280mOhm on-resistance. Even that is a bit much but the others has 1Ohm, which is as much as the motors has. That would burn half of the energy in the mosfets. If you can find anything, look for something below 50mOhm.
dastonge
Beginner
Posts: 10
Joined: Tue Jul 14, 2020 9:51 pm

Re: Hbridge deck design for bidirectional motor control

Post by dastonge »

Thank you for your answer. We will go forward and try the second option using the motor output and these:
- Hbridge - https://www.ti.com/lit/ds/symlink/drv8212.pdf
- I2C I/O extender - https://www.nxp.com/docs/en/data-sheet/ ... F8574A.pdf

unless you have a better recommendation.

D.
Post Reply