Pololu Robotics & Electronics
Menu
My account Comments or questions? About Pololu Contact Ordering information Distributors

Pololu Forum

Wireless motor


#1

i built a lightswitch cover out of nxt lego parts. the cover is ran by a motor currently a brushed dc motor that came from a rc car. i want to be able to connect this motor to my computer via wireless and then control the motor using visual basic. i have looked into the wixel and am unsure weather or not it will fulfill this. i need to be able to control which direction the motor moves and how many rotations it makes, does anyone know what parts i would need to be able to do this, i am pretty sure i will need to buy a servo motor in order to control rotations but then what else do i need to accomplish this


#2

Hello.

It sounds like you might need a motor with an encoder or a servo that can turn in the range you require. You might be able to use the Wixel with either configuration. However, using a motor might require additional components, like a motor driver, whereas a servo can be controlled by just a Wixel.

From your description, it sounds like you are trying to control your lights. An easier approach might be to use a relay in place of your switch.

If you need more help, could you post more about your setup? How are you planning on mechanically connecting a motor to the light switch?

- Jeremy


#3

thats all setup, when the motor turns one way the lights go on when it turns the other they turn off :stuck_out_tongue: hard to describe how it works but i used gears and a slider, so what ur saying is that if i get a servo i can connect it directly to a wixel? and then i would be able to make a program with visual basic that had two buttons, left and right, and if i click left the motor turns five left and if i click right the motor turns five right. that is basicly my end goal, would that be possible


#4

Yes, that is possible.


#5

so i need to get two wixels and a servo motor, and the whole setup will work with visual basic, im not putting a program on the wixel i am using a program built with it to talk to the wixel, that will still work right, thanks again in advance, you have been super helpful


#6

Moving a servo with just the Wixel will require you to program it and create custom apps. You can find more information on the Wixel SDK page. As a starting point, you might want to look at some of the example apps that use the servo.h library on the github page.

Alternatively, it might be easier to use the Wireless Serial App in conjunction with a Maestro servo controller.

- Jeremy


#7

ok, so i was doing some research on servos and they say that most servos dont rotate more than 180 degrees, i need the motor to rotate somewhere around 10-20 full rotations, maybe i just dont understand what im reading about servos but it seams to me that i may need to instead get a brushed dc motor driver and connect the wixel to that


#8

There are continuous rotation servos, such as pololu.com/catalog/product/1248
However, if you need a defined number of rotations, you will either have to carefully time the servo on/off signals to give the correct number of rotations (while the servo is connected to the final target), or use an encoder to measure the total rotation angle.


#9

Like Jim mentioned, we do carry some continuous rotation servos. You can read more on the differences between standard servos and continuous rotation servos in this blog post.

Alternatively, you might consider using a stepper motor with a stepper motor driver. Stepper motors are capable of continuous rotation with precise position control, even without a feedback system.

- Jeremy


#10

ok so then in your professional opinion what is most suited for my task, i need to control a motor and make it turn an exact number of rotations and i want to accomplish this without wires and i want to use a program made with visual basic to control said motor


#11

ok so what i have read about stepper motors seems to make it exactly what i want, so then you would connect the motor to the driver ill probably need a bipolar driver, then i can connect the wixel to the driver correct? and then i can create an app to run the wixel over the computer, my other question is how do you figure out what specs you would need for a motor is there an equation somewhere, i know for a fact that it wont require much power or torque but my question is how do i find out how much i would need of each in order to make my i guess you would call it a shaft, turn


#12

ok so just to make sure, ive read through a lot of stuff for the stepper motor drive, so what i got from it is that if i take my wixel and connect its P_0 to the step pin on the driver and the wixels P_1 to the dir pin on the driver then i can control the motors direction and how many steps it makes, i also believe that if i leave the M_0 through M_3 pins not hooked to anything the motor will use default steps so 1.8 degree turn each step correct, what i also believe is that i will need two batteries, one for the wixel and one for the motor driver, is this somewhat correct


#13

It seems like your understanding is correct. You might be able to use a single battery by using a voltage regulator to supply power to the Wixel.

The amount of the torque you need will be a big factor in determining which stepper motor you should choose. This blog post about force and torque, might be helpful in determining how much torque you will need. Please note, the torque a stepper motor can produce will decrease as step speed is increased. You can find a graph of the pull out torque, which shows how much torque to expect at various speeds, for each of our stepper motors on their product pages.

By the way, programming the Wixel is not beginner-friendly. I suggest you look at the user’s guide to make sure you are comfortable programming the Wixel before you get one. If you are not comfortable, you might consider using the pre-made Wireless Serial app to communicate between your computer and a microcontroller (like an Arduino) that in turn controls the stepper motor driver.

- Jeremy


#14

ok so i have done some math and i think that if i where to take the nema-8 size hybrid stepper motor with a mounting hub attached to it i would be generating 2.081 lbs of force on my shaft which will be more than plenty but not enough to damage the motor or my slider thingy, ok so im not entirely sure what you mean by programming a wixel, i mean i looked into the user guide and read through it, but i guess i didnt fully understand it, i was hoping to download the wireless serial app to my wixels and then communicate to the one connected to the computer with visual basic via its com port. i know that i will be fine if it comes to creating my own app i am fluent in multiple programming languages and can use visual studio and eclipse so i think i can figure it out especially since i taught myself all my computer languages, so i guess my question is is what would that entail, i mean like would i need to download the wireless serial app anyways so that they could communicate wirelessly or what is up with that, and also would it be possible for you to draw out a ruff wireing diagram between the motor which i am using the nema-8 size hybrid, the stepper motor controllor, whichever you think is appropriate, i thought the drv8824 would be sufficient but i dont know, the wixel and the power supply, if i can accomplish this all with one batter pack that would be pretty cool but would i be able to use that pack to power the motor the motor driver and the wixel ? i guess im kind of confused there


#15

If you are planning to write your own program, you do not need to download any particular apps. However, you might use them as a starting point. Which stepper motor driver to use will depend on the current rating of the stepper motor you choose. As long as the driver can handle the current (and voltage), it should be appropriate.

If you are using a battery that is outside the voltage range of the Wixel, you can use a voltage regulator to adjust the voltage to a level the Wixel can accept, while powering the motor directly off the battery.

- Jeremy


#16

ok so i looked into creating my own app and my abilities with c are fairly limited and are scoped towards console applications :stuck_out_tongue: so if i got the arduino thing what would i have to do then


#17

so if i was to go and get a arduino or whatever it was called then what would i need to do in the sense of programming because to be honost my c is more focused towards console programming and nothing to in depth :stuck_out_tongue:


#18

You will want to send serial commands from a computer to a Wixel with the Wireless Serial App loaded. The Wixel will then automatically transmit those serial commands to the Wixel its paired with. A microcontroller (like the Arduino) connected to the Wixel can then received the serial commands, and you can program it where a certain byte or string of bytes (i.e. some protocol you create) will correspond to a set of instructions for the stepper motor driver, which in turn will spin the stepper motor in a particular way. The Arduino is a very beginner-friendly platform and can be programmed in C or C++, and with our Wireless Serial app, hopefully this is something you can accomplish. The “Example Serial Communication Sketch” in the “Writing Sketches for the Wixel Shield” section of the Wixel Shield for Arduino User’s Guide might be a good starting point.

- Jeremy


#19

how i can make a dc motor car which ran with wireless remote control.