HDC2450 speed control and encoder feedback

7 years 7 months ago #29527924 by Nolebrain
Greetings,

I have some general questions about programming the HDC2450. I am using two brushed 24V DC motors with E5 incremental encoders from US digital. After running the Roboteq utility I noticed my encoders were reading incorrect RPM values (measured from a tach). In the configuration tab, what encoder settings are needed to fix this?

Another concern was motor control commands, I was only able to adjust motor speed with setcommand(_GO, n). Where “n” adjusts the power delivered to the motor. I thought it would be possible to use setcommand(_DSET, 1, 500) to adjust motor speed by changing the voltage. But this did not work.

Also, are there any Micro basic example sketches available? I am trying to test the motors holding torque with PID, such that the motor will attempt to maintain the encoder value.

Sorry for such fundamental questions, any help is appreciated.

Please Log in or Create an account to join the conversation.

7 years 7 months ago #29527926 by Griffin Baker
Replied by Griffin Baker on topic Re:HDC2450 speed control and encoder feedback
Are your encoders A and B correctly wired? Try swapping them.

Motor speed cam be set in the configuration tab under the motor output section.

I don\'t believe we have any sketches of the microbasic scripts.

Please Log in or Create an account to join the conversation.

7 years 7 months ago #29527927 by Nolebrain
Griffin,

The E5 encoder has 5 wires, I am only using 4 of them since I don\'t think this controller has a input for the encoder index.

The other pins are as follows, Encoder to HDC2450. GND to Pin 1, Channel A to pin 24, Channel B to pin 12, 5V+ to pin 14. Using the run utility the encoder values and speed increase / decrease correctly, but I believe the RPM is incorrect.

Maybe I need to adjust the Pulse/Rev to match the reading from my tachometer. Also, what are the 1 and 2 checkboxes for under the Use: tab.

Please Log in or Create an account to join the conversation.

7 years 7 months ago #29527928 by Griffin Baker
Replied by Griffin Baker on topic Re:HDC2450 speed control and encoder feedback
Yes, you will need to adjust your pulses per revolution. The check boxes next to the use tabs are referring to the motor channel that the command or capture type is for. So if the encoder is used for feedback, you want to check which motor channel that the encoder feedback is for. So if encoder one is for feedback motor 1, then the check box 1 would need to be checked.

Please Log in or Create an account to join the conversation.

7 years 7 months ago #29527929 by Nolebrain
Ok I resolved my problem, adjusting the Pulse/Rev to approximately 1250 gave me correct RPM readings from the encoder.

Thanks!

Please Log in or Create an account to join the conversation.

Time to create page: 0.153 seconds