Electric Vehicle C

TyBlood13
Member
Member
Posts: 7
Joined: September 13th, 2013, 3:15 pm
Division: C
State: KY

Re: Electric Vehicle C

Postby TyBlood13 » November 24th, 2015, 7:18 pm

Does anyone know a website or book about how to program an arduino.
Something like this? http://www.adafruit.com/products/1019
Adafruit is a very good source of microcomputer parts for both Pis and Arduinos.
Madison Central HS, Richmond, Kentucky
4th year Science Olympiad Veteran
This Year's Events [Electric Vehicle, Air Trajectory, Chem Lab]

User avatar
windu34
Moderator
Moderator
Posts: 1340
Joined: April 19th, 2015, 6:37 pm
Division: Grad
State: FL
Location: Gainesville, Florida

Re: Electric Vehicle C

Postby windu34 » November 25th, 2015, 6:46 am

Does anyone know a website or book about how to program an arduino.
Something like this? http://www.adafruit.com/products/1019
Adafruit is a very good source of microcomputer parts for both Pis and Arduinos.
Id recommend getting a starter kit and doing all of the examples on the Arduino site. It will give you a pretty good idea of whats going on
Boca Raton Community High School Alumni
Florida State Tournament Director 2020
National Physical Sciences Rules Committee Member
kevin@floridascienceolympiad.org || windu34's Userpage

Circuit Lab Event Supervisor for 2020: UT Austin (B/C), MIT (C), Solon (C), Princeton (C), Golden Gate (C), Nationals (C)

User avatar
UQOnyx
Exalted Member
Exalted Member
Posts: 274
Joined: November 28th, 2012, 2:23 pm
Division: C
State: NJ

Re: Electric Vehicle C

Postby UQOnyx » November 26th, 2015, 11:18 am

Does anyone have any opinion on what aspect of the score is more important- less time or accuracy in distance?

I'm inclined to believe that for sub-competitive teams, the better target to focus on is speed (shorter time) because it's easier to achieve a short amount of time in a manner of different ways, and then focus on calibration for accuracy.

Also, I read some talk about using PID loops to control motors. I understand how the PID loop works, but I don't understand how I would apply it to a motor.
Noor-ul-Iman School

2012 Events:
Forestry
Storm The Castle


2013 Events:
Boomilever
Shock Value
Forestry


I know the voices aren't real, but they have some great ideas..

User avatar
windu34
Moderator
Moderator
Posts: 1340
Joined: April 19th, 2015, 6:37 pm
Division: Grad
State: FL
Location: Gainesville, Florida

Re: Electric Vehicle C

Postby windu34 » November 26th, 2015, 1:10 pm

Does anyone have any opinion on what aspect of the score is more important- less time or accuracy in distance?

I'm inclined to believe that for sub-competitive teams, the better target to focus on is speed (shorter time) because it's easier to achieve a short amount of time in a manner of different ways, and then focus on calibration for accuracy.

Also, I read some talk about using PID loops to control motors. I understand how the PID loop works, but I don't understand how I would apply it to a motor.
Ill put it this way: 1 sec is equal to 10cm. Based on that, to be competitive, you must be able to get that time under 4-5 sec. If you can go 1 sec faster and sacrifice precision underneath 10cm, then do it.
PID control is the mechanism behind servos. It allows you to get your vehicle to close to exactly the distance by correcting for error. That's actually a really good idea that I hadn't thought of if you can find a way to execute it. The rules allow for moving backwards which is essentially exactly what you will need to do. My first thought is to use a rotary encoder attached to the axle(s). Post your plan and we can provide input!
Boca Raton Community High School Alumni
Florida State Tournament Director 2020
National Physical Sciences Rules Committee Member
kevin@floridascienceolympiad.org || windu34's Userpage

Circuit Lab Event Supervisor for 2020: UT Austin (B/C), MIT (C), Solon (C), Princeton (C), Golden Gate (C), Nationals (C)

TyBlood13
Member
Member
Posts: 7
Joined: September 13th, 2013, 3:15 pm
Division: C
State: KY

Re: Electric Vehicle C

Postby TyBlood13 » November 26th, 2015, 3:19 pm

Does anyone have any opinion on what aspect of the score is more important- less time or accuracy in distance?

I'm inclined to believe that for sub-competitive teams, the better target to focus on is speed (shorter time) because it's easier to achieve a short amount of time in a manner of different ways, and then focus on calibration for accuracy.

Also, I read some talk about using PID loops to control motors. I understand how the PID loop works, but I don't understand how I would apply it to a motor.
Considering that you're only timed on from .5m to 8.5m past the starting point, with the target being anywhere from 9m to 12m, you could set your motor(s) to slow down immediately after passing the 8.5m mark to increase you accuracy, or purposefully go past the target and have the vehicle back up to the target. Personally, I will have the vehicle brake by reversing motor direction very quickly. Luckily all of these options are easily programmable with the popular boards. So you really can have the best of both with some testing!
Madison Central HS, Richmond, Kentucky
4th year Science Olympiad Veteran
This Year's Events [Electric Vehicle, Air Trajectory, Chem Lab]

User avatar
windu34
Moderator
Moderator
Posts: 1340
Joined: April 19th, 2015, 6:37 pm
Division: Grad
State: FL
Location: Gainesville, Florida

Re: Electric Vehicle C

Postby windu34 » November 27th, 2015, 6:01 am

Does anyone have any opinion on what aspect of the score is more important- less time or accuracy in distance?

I'm inclined to believe that for sub-competitive teams, the better target to focus on is speed (shorter time) because it's easier to achieve a short amount of time in a manner of different ways, and then focus on calibration for accuracy.

Also, I read some talk about using PID loops to control motors. I understand how the PID loop works, but I don't understand how I would apply it to a motor.
Considering that you're only timed on from .5m to 8.5m past the starting point, with the target being anywhere from 9m to 12m, you could set your motor(s) to slow down immediately after passing the 8.5m mark to increase you accuracy, or purposefully go past the target and have the vehicle back up to the target. Personally, I will have the vehicle brake by reversing motor direction very quickly. Luckily all of these options are easily programmable with the popular boards. So you really can have the best of both with some testing!
If you could find a way to over shoot the target, and then come back to it, that would be the most ideal run because it would allow you to reach maximum speed and still get a decent distance score. That said, Its not going to be easy to figure out how and Depending on your vehicle, its gonna have to go pretty straight for this to work.
Boca Raton Community High School Alumni
Florida State Tournament Director 2020
National Physical Sciences Rules Committee Member
kevin@floridascienceolympiad.org || windu34's Userpage

Circuit Lab Event Supervisor for 2020: UT Austin (B/C), MIT (C), Solon (C), Princeton (C), Golden Gate (C), Nationals (C)

iwonder
Admin Emeritus
Admin Emeritus
Posts: 1112
Joined: May 10th, 2011, 8:25 pm
Division: Grad
State: TX

Re: Electric Vehicle C

Postby iwonder » November 27th, 2015, 1:21 pm

A properly tuned PID controller won't need to move backwards, only if the loop is what's called underdamped will it oscillate around the target point.

Yes, certain servos use PID loops, but I'd guess that cheaper ones or more basic servos don't, they just use a proportional control. That's only 1/3 of a PID loop, though few people actually use all three terms. The PID controller itself (depending on the mode it runs in) receives an error (difference between setpoint and process value) and uses the current difference between them (proportional), sum of the previous errors (integral) and rate of change of the error (derivative) to generate a control output which is fed back into the process. They run in three 'categories', overdamped, underdamped, and critically damped (it's technically a second order differential equation, to this is the dampening ratio). For slow moving things an overdamped loop works fine, which means forgoing at least the derivative gain. In most cases as well a small steady-state error isn't a big deal, so the integral gain vanishes. This leaves proportional gain, which is pretty straightforward and easy to tune for. (Tuning is the process of setting the scaling factors for proportional, integral, and derivative gains, they're almost impossible to calculate).

Image

In motion control like this, an overdamped loop won't work as well, since overdamped typically means it's slow to reach it's target setpoint, and while that might work fine, when you're in the shorter ranges of distance you want to wait as long as possible to break, and you'll want something much closer to critically damped. Underdamped is what windu34 referred to, which is valid, but unnecessary and might be confusing to judges, worst case.

Personally, my suggestion if you wanted to try PID would be, use whatever type of motor you feel so inclined to use, but be ready to control the velocity (first derivative of position) of the motor as an output. On the other axle put a quadrature encoder (nice, high count/rev one) and hook the controller and encoder into a microcontroller (actual microcontroller, the raspberry pi is a computer and won't work well for this) so you can watch the current position and control the speed. Now knowing the position you need to be at, you can feed a PID controller with the difference between those two, and the PID controller outputs a control value that feed directly into motor speed. The only thing that remains is a lot of testing to tune the loop. That amounts to zeroing all the gains, raising the proportional until it oscillates slightly around the target point, raising the derivative gain until the oscillation stops, and the adding integral gain until the final error goes away. Sounds simple?

Fair warning, there's a thing called integral windup you'll have to watch out for, and if you go through all the work to make it perfect, you'll find you might not honestly be much farther ahead of the team that runs flat out in the timed section, brakes fast and slowly creeps up on the target point. Still, I'd absolutely love to see someone do it and it'd make for some great college app material ;) ;) (it's a 400-level ECEN course here)
'If you're the smartest person in the room, you're in the wrong room' - Unknown

Gary
Member
Member
Posts: 1
Joined: November 30th, 2015, 2:02 pm

Braking System

Postby Gary » November 30th, 2015, 2:38 pm

What method are you guys using for braking the vehicle? I think using the rubber band is a good idea but I didn't know how to install it, what are the mechanics of the rubber band braking system?

User avatar
InfiniCuber
Member
Member
Posts: 171
Joined: October 20th, 2012, 6:15 am
Division: C
State: IN

Re: Braking System

Postby InfiniCuber » November 30th, 2015, 4:43 pm

What method are you guys using for braking the vehicle? I think using the rubber band is a good idea but I didn't know how to install it, what are the mechanics of the rubber band braking system?
I've never heard of this rubber band braking system. One of my teams is using a wingnut as they are using a dc motor to power their vehicle. I am using my motor itself to stop using some code, because my motor has a lot of torque. As far as that rubber band thing goes though, I'm not quite sure. Anyone know?
Scioly isn't a club, or an organization. It is a lifestyle.
~Munster High School Science Olympiad Captain 2016~

User avatar
windu34
Moderator
Moderator
Posts: 1340
Joined: April 19th, 2015, 6:37 pm
Division: Grad
State: FL
Location: Gainesville, Florida

Re: Braking System

Postby windu34 » November 30th, 2015, 5:08 pm

What method are you guys using for braking the vehicle? I think using the rubber band is a good idea but I didn't know how to install it, what are the mechanics of the rubber band braking system?
I believe I know what you are talking about. This style brake was used in scrambler to brake because it provided some negative acceleration before coming to a complete stop as opposed to a wingnut system which immediately locks up the axle thus being violent in nature and may result in skidding.
What I did was attach a piece of string to the axle and tie it to a slide (piece that is able to slide down the length of the chasis). Attach one end of a rubber band to the slide and the other to the beginning of the slide. As the axle turns, the slide travels down the center of the chasis (on a metal pole or some other piece). As it gets closer to the end of the slide, the rubber stretches and ideally results in negative acceleration of the vehicle as it approaches the target.
Boca Raton Community High School Alumni
Florida State Tournament Director 2020
National Physical Sciences Rules Committee Member
kevin@floridascienceolympiad.org || windu34's Userpage

Circuit Lab Event Supervisor for 2020: UT Austin (B/C), MIT (C), Solon (C), Princeton (C), Golden Gate (C), Nationals (C)


Return to “Electric Vehicle C”

Who is online

Users browsing this forum: No registered users and 1 guest