Grisp 2, Support PWM to DC motor

I am working with Erlang but in telecommunication, it is so interesting to me since I see this grisp board, I intend to do some small projects on this grisp.

When reading the wiki, I have 2 questions related to how to read encoder and how to control DC motor with PWM:

  • Does PMOD HB5 support for DC motor’s encoder (I see this sentence from Product description of pmod hb5: “incorporates quadrature encoder feedback”)? if it has, how we can read this encoder value in grisp 2?
  • Can grisp 2 control DC motor with PWM? as I see from grisp/pmod_hb5.erl at master · grisp/grisp · GitHub, we only set an pin to 0 or 1, I am curious if grisp 2 can control DC motor with PWM or not?

Thanks for your support.

1 Like

Hi Bien!

The Pmod HB5 has two sensor pins that could perhaps be used (not clear to me if they are connected to the encoder somehow), but the current driver doesn’t do anything with them. PRs welcome!

No, we currently don’t have any PWM support for GRiSP. This is in our long-term roadmap of things we want to do, but we never needed it so far. PRs also welcome!

If you want to work on any of this, feel free to ask for support here and we’ll help you as much as we can!

2 Likes

Thanks for your answer!
I guess these functionalities (PWM and reading encoder) are very necessary for some embedded projects. I am planning to build balancing robot and drone, but lacking these functionalities.
I hope we will reach to these functionalities soon.

1 Like