Robot Tour C

3pantz
Member
Member
Posts: 1
Joined: September 5th, 2023, 4:21 pm
Division: C
State: FL
Has thanked: 0
Been thanked: 0

Re: Robot Tour C

Post by 3pantz »

brian9640 wrote: September 13th, 2023, 5:35 am
In case anyone needs it, here is a build that I am recommending with parts that can 100% be purchased on amazon:

Chassis, Wheel, and Motors - YIKESHU 2WD Chassis Kit - https://www.amazon.com/gp/product/B073VHQT6P/
Microcontroller - MEGA R3 Board ATmega 2560 - https://www.amazon.com/gp/product/B01H4ZDYCE/
Motor Controller - L298N Motor Driver Controller Board Module - https://www.amazon.com/gp/product/B07BK1QL5T/
Speed Measurement - Infrared Slotted Optical Optocoupler Module - https://www.amazon.com/dp/B08977QFK5
Connection Wires - 120pcs Multicolored Dupont Wire - https://www.amazon.com/gp/product/B01EV70C78/

This comes to about $65 at the time of this posting. You could save a little money by using an Uno microcontroller clone, but you would be trading off programming flexibility. Also, some of the items comes in multiple pieces packs. If you are buying more than one robot, keep that in mind when purchasing (i.e., for a two wheeled robot, you need only 1 of the indicated motor controller module, only two wheel rotation sensors, etc). This kit will require the participant to do Arduino programming, and clearly there are no assembly instructions so they will also have to learn the basics of the control circuitry. All of this is easy to find via Google.
This is a good starting kit. I purchased many of these parts back in 2020 when Robot Tour first started as a trial event. The wiring diagram on TopFinishKits.com (https://topfinishkits.com/pdf/RobotVehi ... 230830.pdf) is very close to the circuitry required.

The sample program on TopFinishKits.com would work. But would need some changes as the wheel encoder on the above kit only has 20 pulses per wheel rotation. The sample program uses the encoder pulses for speed control. My students replaced the motors above with a motor with a built in encoder. See Amazon link (https://a.co/d/g1suQpr). Because the encoder is before the gear box, my students are getting between 300 to 1000 pulses per wheel rotation. This depends on the gearbox selected.
Hi Brian,

The motors you linked are 12V, but the chassis kit linked only has 6 (4*1.5) V, so I am confused whether it will be able to work with half the voltage. Does having higher RPM motors lose accuracy? Also, why do you need more pulses per rotation?

Sorry for so many questions, thank you!
brian9640
Member
Member
Posts: 64
Joined: April 11th, 2016, 9:14 am
State: OH
Has thanked: 2 times
Been thanked: 20 times

Re: Robot Tour C

Post by brian9640 »

3pantz wrote: January 18th, 2024, 9:38 am
Hi Brian,

The motors you linked are 12V, but the chassis kit linked only has 6 (4*1.5) V, so I am confused whether it will be able to work with half the voltage. Does having higher RPM motors lose accuracy? Also, why do you need more pulses per rotation?

Sorry for so many questions, thank you!
Good question. I'm surprised more individuals have not asked the question about the 12V motors.

You are correct that the voltage is only 9V (6 x 1.5V) or 7.2V (6 x 1.2V rechargeable). The motor will rotate at these lower voltages but slower. A rough example is a 300 RPM motor at 9V would only rotate at (9/12 *300 =) 225 RPM. Being DC motors, the rotating speed (RPM) will vary based on load or torque required. For example, the same DC motor will rotate at different speeds for a light weight robot vs a heavy weight robot. The heavy robot takes more energy to move. Which causes the DC motor to slow down versus the light weight robot.

A higher RPM motor is not loosing accuracy. The higher RPM has less torque available. This is where a heavy robot could have more speed variations due to more torque required.

This where the higher encoder counts helps. These counts allow the robot program to calculate the current RPM of the motor. If the motor is below the required speed, then the voltage to the motor is increased. Below is the Serial Plotter output from one of my students robots. I changed some values to hide their actual results.

Image

The blue line is the desired speed the DC motor should be rotating at. The red line is the speed calculated by counting the number of encoder pulses for a given time. Clue: that time should be below 50msec. A PID loop is used to convert the desired speed & actual speed into a voltage supplied to the motor. The voltage to the motor is the green line (PWM). You can see the PWM output (voltage) is adjusting as the motor increases speed from 0 RPM to the desired running speed.

You can see the actual speed (red) and voltage (green) are not smooth. This is because there are not enough encoder counts to accurately calculate the motor speed. This causes an oscillation in the motor speed. Typically these oscillations are too small for the robot to feel. But less oscillations will mean better robot performance. Hence why higher counter counts are better.

I hope that helps.
Last edited by brian9640 on January 22nd, 2024, 1:24 pm, edited 1 time in total.
User avatar
onshape
Member
Member
Posts: 101
Joined: January 28th, 2023, 11:42 am
Division: C
State: VA
Pronouns: Ask My Pronouns
Has thanked: 17 times
Been thanked: 24 times
Contact:

Re: Robot Tour C

Post by onshape »

How would the "programmable" aspect work? Can we change the wire arrangement, or should we bring the device we programmed it with to change code?
"I know two kinds of audiences only - one coughing, and one not coughing." -Artur Schnabel
"In the beginning was rhythm." -Hans von Bulow
"The art of music entombed a rich possession, but even far fairer hopes." -Franz Grillparzer
brian9640
Member
Member
Posts: 64
Joined: April 11th, 2016, 9:14 am
State: OH
Has thanked: 2 times
Been thanked: 20 times

Re: Robot Tour C

Post by brian9640 »

onshape wrote: February 14th, 2024, 6:07 am How would the "programmable" aspect work? Can we change the wire arrangement, or should we bring the device we programmed it with to change code?
Most teams bring a laptop into the event as their programming tool to make changes. Please make sure the laptop has a full charge before your time slot. I have seen too many dead laptop batteries this year.

Per Rule 6.c., teams are expected to make programming changes during their event time. This includes during the Setup Time and more importantly during their Track Time. Multiple runs are allowed during their Track Time (2 successful or 3 failed, whichever comes first). Unless a team's run is perfect on the 1st run, a team should be determining what changes or adjustments should be made after each run.
These users thanked the author brian9640 for the post:
onshape (February 14th, 2024, 6:37 am)
Post Reply

Return to “Robot Tour C”

Who is online

Users browsing this forum: No registered users and 1 guest