Help whit my Brushless motor

Comments & issues
Post Reply
xESTEBANx
Fresh meat
Posts: 1
Joined: Wed Nov 20, 2024 10:38 am
Contact:

Help whit my Brushless motor

Post by xESTEBANx »

Hi all. I am working on a machine, I need to control the speed of two brushless DC motors with potentiometers.
I don't know anything about phyton, so I'm totally lost.
I already have the following phidgets:
-1 VINT HUB0001_0
-2 DCC1100_0
-1 DCM4108_1
-1 DCM4106_0
-1 Power supply 24 V DC
-And all cables.

I want to buy the two potentiometers 5K Ohm to control speed of both motors. Can someone give me help?
User avatar
mparadis
Site Admin
Posts: 660
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: Help whit my Brushless motor

Post by mparadis »

Here's how I would approach this problem:

If you've never programmed using Phidgets before, you may want to read our page on Phidget Programming Basics.

1. Go to our code sample generator and get sample code for the DCC1100 in the language of your choice. If you don't have any experience programming, python will be the easiest to get started with and there are lots of resources online for learning. The sample program for the DCC1100 shows you how to set the motor velocity- it sets it to "1" which is full power. You can set it to 0.5 for half power or -1 for full reverse, and so on for any number in between -1 and 1.

2. Once you're able to control the motor, go back to the code sample generator, select HUB0001 from the list and uncheck the digital input port 0 and check the voltage ratio input port 0. This will show you how to read the value of the potentiometer which will range from 0 to 1.

3. Once you can read the value of the potentiometer and print it out to the console, the next step is to combine the code of the two programs. In the onVoltageRatioChange function, instead of printing the potentiometer value to the screen, you can store that value in a variable, and create a loop in the main function of the program to set the motor's velocity to the value in that variable.

4. Once you have this working for one motor, you can create a new BLDCMotor channel and another voltageRatioInput channel for the second motor and potentiometer, and duplicate the code for each.

If you have trouble along the way, you can post here or contact our support email for guidance.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest