Jump to content
  • 0

PmodHB5 and DC Motor/Gearbox (1:19) questions


DerekM

Question

A couple of questions/comments on the PmodHB5 and 1:19 Gear Motor combination, which I've been playing around with:

1. Is the motor direction being set correctly? It looks like when you set the DIR pin to high so that the motor will spin in a forward (CW) direction, the motor actually spins in a CCW direction rather than CW. Also, if you check the Sensor A and Sensor B signals in this case, it looks like Sensor B signal leads the Sensor A signal by 90 degrees, again indicating a CCW direction. Possibly I'm misinterpreting something here, but can you please clarify that the direction is being set correctly (i.e. logic high for CW direction). 

2. Regarding the encoder signals Sensor A and B, can you clarify the number of pulses / revolution? From the documentation and example code, It seems to be three pulses / revolution: can you clarify?

Thanks.

 

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

Hi Derek,

Logic high is set to CCW as shown in the datasheet here. I took a screen shot of the life cycle. Also when the motor is mounted as part of this robotic kit to go forward it is CCW for one of the motors and CW for the other. While looking at the encoders datasheet it appears that you are correct with 3 pulses per revolution.

thank you,

Jon

motor_gearbox.jpg

Link to comment
Share on other sites

31 minutes ago, jpeyron said:

Hi Derek,

Logic high is set to CCW as shown in the datasheet here. I took a screen shot of the life cycle. Also when the motor is mounted as part of this robotic kit to go forward it is CCW for one of the motors and CW for the other. While looking at the encoders datasheet it appears that you are correct with 3 pulses per revolution.

thank you,

Jon

motor_gearbox.jpg

Thanks, that makes sense now as regards the direction (active-low for CW, not active-high as I thought). Just fyi, it was this page that confused me. It says "To drive the motor at a specific speed, users will need to choose a static direction (forwards or backwards corresponding to high or low voltage) on the Direction pin", which I took to mean high = forward direction. Also, I think the block diagram for the PmodHB5 circuit on that page shows an incorrect mapping for M+/M- (M+ should be pin 5, M- should be pin 6). That also added to my confusion as regards direction.

Thanks again for the reply.

Link to comment
Share on other sites

No problem. I'm happy that I have the direction issue sorted, but after some experimentation I'm not convinced that the encoder is outputting three pulses / revolution. I've set the motor running really slow (60RPM), and I can obviously count the revs at this speed (and indeed there are 60revs/minute). But on the scope I can see the sensor outputs also running at about 60Hz, which indicates one pulse / revolution. If it was three pulses/rev I would expect a frequency of 180Hz.

Also, when I run the motor with regular settings (say, 2kHz with 50% duty-cycle), the sensor frequency is about 550Hz, which is quite close to the rated RPM of the motor. So again I seem to be getting 1 pulse / revolution of the motor, not three.

I may be misinterpreting something here though, as I don't have much experience with motors or encoders.

Link to comment
Share on other sites

Hi Derek,

I might have been reading the reference manual wrong. I have been searching and as of now I'm unable to find specifics to exact pulses per rotation it seems to be either 1 or 3. I was able to find two different projects that compute the rotations using the sa and sb and i have attached them below.  Hope this helps!

thank you,

Jon

pmodhb5_demo_verilog.zip

pmodhb5_mplab_library.zip

Link to comment
Share on other sites

Apologies for the delay in replying. Yes, I've checked out loads of relevant Digilent code and they all indicate that the encoder rate is 3 pulses/revolution. But I am convinced that on the 1:19 motor I have, the rate is 1 pulse/revolution. From some datasheets I found, I think that this particular motor comes with a rate of 1 or 3 pulses/rev, so perhaps I just happen to have the model that does 1 pulse/rev. It's not a big deal at all though, don't feel like you need to follow up on this. But I would be interested if someone else thinks the rate on their 1:19 motor is 1 pulse/rev, just for my own sanity!

Regards,

Derek.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...