You are correct about setting the channels to input mode; any channel that has a sensor connected to it should be configured as an input, which can be done in the "Status" tab of the Maestro Control Center.
As far as modifying to code, if you want all of your servos to react to the same 2 sensors, you could just add "dup n servo" to the end of the updated code (before "repeat") for each additional servo, where n is the servo channel that the extra servos are connected to. Alternatively, you could leave the code unchanged and split the signal coming from channel 0 to each servo.
If you run into additional questions about doing this, or would like to share your project when it is finished, you might consider posting on our forum.
I am glad you like my line follower. It is not clear to me what part of the robot you are requesting more details about, but if you are mostly interested in the line following code, I would suggest looking at our example line follower code for the Zumo Robot for Arduino, v1.2 (which is what my code is based on).
I have never made an advanced line following robot quite like the one you described. I recommend getting the basic line following working before connecting additional sensors.
Please let me know if I misunderstood your request or if you have more specific questions about my robot.
By the way, if you have more general questions about building your line follower, you might try posting them on our forum to see if anyone there has suggestions.
The board has a pull-up resistor between SHDN and VIN, so you can leave the SHDN pin disconnected if you want the board to be permanently enabled. Alternatively, the board can be driven low to put the board into a low-power state and turn off the output.
You can find more information about this in the "Using the regulator" section of the product page for each version of the D24V5Fx step-down voltage regulator. Links to these product pages can be found in the "Related products" at the end of the blog post.
It is not entirely clear to me what you mean, but if you are asking if the robot can turn, the answer is yes. Black Mamba is a differential wheeled robot. In short, since it uses two separate motors (one on each side of the robot), running them at different speeds causes the robot to turn, so running one motor forwards and the other backwards at the same rate causes it to turn in place.
If this is not what you are asking, can you try rephrasing your question?
I am glad you found the video helpful. When setting the current limit, you do not need have any code running or stepper motor connected. If you are referring to the part in the video where Claire uses the multimeter to measure the current draw of the stepper motor, stepping the motor during this process will make it difficult to measure, since the current through the coil will change as the motor is stepped.
Our magnetic encoders are standard quadrature encoders, so any libraries intended to work with quadrature encoders should work; there are several listed on Arduino's "Reading Rotary Encoders" page.
One way that you might try smoothing out the motion of the servo could be using some combination of an acceleration and a speed limit, which can be configured in the "Channel Settings" tab of the Maestro Control Center.
Your project looks like it is coming along nicely; thank you for sharing it with us! You might also consider sharing it on our forum when it is done.
Most of the robots in this particular maze-solving competition used a "right hand on wall" or "left hand on wall" method to learn the maze, then simplified it to skip unnecessary turns. You might find the sample maze-solving program for the 3pi that Ben linked to in his last post helpful; it covers the "left hand on wall" strategy as well as simplifying the solution.
Thank you for the kind words; I am glad you find our website helpful!
As you mentioned, we typically recommend using a driver that can handle the stall current of your motor continuously since this results in a more robust system. You can generally get away with a lower-power driver than this, but then you have to be more careful with how you use your motor since it would be capable of exceeding the abilities of the driver. I think the idea of using an external current sensor is a good one since you can use the feedback to stay within the rated continuous current of your motor (which the VHN5019 shield should be able to comfortably handle in single-channel mode).
Your strategy of monitoring the current sounds good, but keep in mind that current spikes can be very quick and, depending on your system, might trigger an over-current condition in your power supply or driver before your system has a chance to react to them. A good way to avoid such current spikes is to limit motor acceleration (e.g. don't just apply full power to the motor while it is stationary or rotating in the opposite direction; wait for the motor to come to a stop and then gradually ramp up the speed until it reaches the target specified by the joystick input). We do not have any examples for adding that kind of throttling to a system like that, but you might start out by having a correction factor based on the current sensor readings that you subtract from your target speed to get your actual motor speed (e.g. a higher current reading would result in a higher correction factor).
If you try adding in this correction factor into your code and have trouble, I suggest posting on our forum for additional help.
I talked to you earlier today when you called, but I wanted to post the answer here for anyone else who might have the same questions.
It looks like the example you posted is the "Using an analog input to control servos" from the Maestro user's guide. The modified version of that example script that we used in this project can be found in the blog post above. Please note that this script expects the output from the muscle sensor to be connected to channel 0 on the Maestro and the servo to be connected to channel 1. If you want the script to work with the sensor connected to channel 5, you will need to modify it to do so. If you try to modify the script and continue to have trouble, you can post your modified script on our forum, and I would be happy to continue troubleshooting there.
Also, please note that we used two 1S LiPo batteries in our setup, so the analog output of the muscle sensor in our demo was from 0V to roughly 3.7V. If you are using 9V batteries, your signal could be upwards of 9V, which is higher than the Maestro inputs support and could result in damage. You might consider reducing the voltage by either adjusting the gain potentiometer on the Muscle Sensor V3, or using a voltage divider circuit.
Motion tracking skull Halloween prop
- 22 March 2016Hello.
You are correct about setting the channels to input mode; any channel that has a sensor connected to it should be configured as an input, which can be done in the "Status" tab of the Maestro Control Center.
As far as modifying to code, if you want all of your servos to react to the same 2 sensors, you could just add "dup n servo" to the end of the updated code (before "repeat") for each additional servo, where n is the servo channel that the extra servos are connected to. Alternatively, you could leave the code unchanged and split the signal coming from channel 0 to each servo.
If you run into additional questions about doing this, or would like to share your project when it is finished, you might consider posting on our forum.
-Brandon
Brandon's line following robot: The Chariot
- 3 March 2016Hello, Pedro.
I am glad you like my line follower. It is not clear to me what part of the robot you are requesting more details about, but if you are mostly interested in the line following code, I would suggest looking at our example line follower code for the Zumo Robot for Arduino, v1.2 (which is what my code is based on).
I have never made an advanced line following robot quite like the one you described. I recommend getting the basic line following working before connecting additional sensors.
Please let me know if I misunderstood your request or if you have more specific questions about my robot.
By the way, if you have more general questions about building your line follower, you might try posting them on our forum to see if anyone there has suggestions.
-Brandon
New versions of our 500mA D24V5Fx step-down voltage regulators
- 7 January 2016Hello, Ross.
The board has a pull-up resistor between SHDN and VIN, so you can leave the SHDN pin disconnected if you want the board to be permanently enabled. Alternatively, the board can be driven low to put the board into a low-power state and turn off the output.
You can find more information about this in the "Using the regulator" section of the product page for each version of the D24V5Fx step-down voltage regulator. Links to these product pages can be found in the "Related products" at the end of the blog post.
-Brandon
Brandon's mini sumo robot: Black Mamba
- 28 December 2015Hello, Bob.
It is not entirely clear to me what you mean, but if you are asking if the robot can turn, the answer is yes. Black Mamba is a differential wheeled robot. In short, since it uses two separate motors (one on each side of the robot), running them at different speeds causes the robot to turn, so running one motor forwards and the other backwards at the same rate causes it to turn in place.
If this is not what you are asking, can you try rephrasing your question?
-Brandon
Video: Setting the Current Limit on Pololu Stepper Motor Driver Carriers
- 12 October 2015Hello, Ross.
I am glad you found the video helpful. When setting the current limit, you do not need have any code running or stepper motor connected. If you are referring to the part in the video where Claire uses the multimeter to measure the current draw of the stepper motor, stepping the motor during this process will make it difficult to measure, since the current through the coil will change as the motor is stepped.
-Brandon
New products: Magnetic quadrature encoders for micro metal gearmotors
- 8 October 2015Hello, Dejan.
Our magnetic encoders are standard quadrature encoders, so any libraries intended to work with quadrature encoders should work; there are several listed on Arduino's "Reading Rotary Encoders" page.
-Brandon
Motion tracking skull Halloween prop
- 2 October 2015Hello, Ken.
One way that you might try smoothing out the motion of the servo could be using some combination of an acceleration and a speed limit, which can be configured in the "Channel Settings" tab of the Maestro Control Center.
Your project looks like it is coming along nicely; thank you for sharing it with us! You might also consider sharing it on our forum when it is done.
-Brandon
Video: LVBots May 2014 maze solving competition
- 14 September 2015Hello, Sasi.
Most of the robots in this particular maze-solving competition used a "right hand on wall" or "left hand on wall" method to learn the maze, then simplified it to skip unnecessary turns. You might find the sample maze-solving program for the 3pi that Ben linked to in his last post helpful; it covers the "left hand on wall" strategy as well as simplifying the solution.
-Brandon
New revision of the Dual VNH5019 motor driver shield for Arduino
- 11 August 2015Hello, Sean.
Thank you for the kind words; I am glad you find our website helpful!
As you mentioned, we typically recommend using a driver that can handle the stall current of your motor continuously since this results in a more robust system. You can generally get away with a lower-power driver than this, but then you have to be more careful with how you use your motor since it would be capable of exceeding the abilities of the driver. I think the idea of using an external current sensor is a good one since you can use the feedback to stay within the rated continuous current of your motor (which the VHN5019 shield should be able to comfortably handle in single-channel mode).
Your strategy of monitoring the current sounds good, but keep in mind that current spikes can be very quick and, depending on your system, might trigger an over-current condition in your power supply or driver before your system has a chance to react to them. A good way to avoid such current spikes is to limit motor acceleration (e.g. don't just apply full power to the motor while it is stationary or rotating in the opposite direction; wait for the motor to come to a stop and then gradually ramp up the speed until it reaches the target specified by the joystick input). We do not have any examples for adding that kind of throttling to a system like that, but you might start out by having a correction factor based on the current sensor readings that you subtract from your target speed to get your actual motor speed (e.g. a higher current reading would result in a higher correction factor).
If you try adding in this correction factor into your code and have trouble, I suggest posting on our forum for additional help.
-Brandon
New product: Advancer Technologies Muscle Sensor v3
- 17 July 2015Hello, Jesse.
I talked to you earlier today when you called, but I wanted to post the answer here for anyone else who might have the same questions.
It looks like the example you posted is the "Using an analog input to control servos" from the Maestro user's guide. The modified version of that example script that we used in this project can be found in the blog post above. Please note that this script expects the output from the muscle sensor to be connected to channel 0 on the Maestro and the servo to be connected to channel 1. If you want the script to work with the sensor connected to channel 5, you will need to modify it to do so. If you try to modify the script and continue to have trouble, you can post your modified script on our forum, and I would be happy to continue troubleshooting there.
Also, please note that we used two 1S LiPo batteries in our setup, so the analog output of the muscle sensor in our demo was from 0V to roughly 3.7V. If you are using 9V batteries, your signal could be upwards of 9V, which is higher than the Maestro inputs support and could result in damage. You might consider reducing the voltage by either adjusting the gain potentiometer on the Muscle Sensor V3, or using a voltage divider circuit.
-Brandon