Pre-programmed RC car - Paid Job - Need help with something very simple.

Hey guys!

I was wondering if anyone would be willing to help me with a project of mine. I am doing a physics essay related to cars, so I am using this remote control car for my experiment to simulate real-life. I have assembled the whole car and have and Arduino UNO to pre-program a set route that it will repeat in every run-through. It is not a hard route at all it just needs to go forward and then turn right as its going forward, then go forward again and then stop. It needs to be able to do this slowly and at max speed.

You can see what the car looks like in the image below. I have a servo with three entry points for a jumper and a "fahrtregler" (see picture below) with three entry points. I grounded both of them to the arduino ground slots and I linked the servo and "fahrtregler" so that the servo gets power that way. Then for the signal I put the jumpers into 2 random slots, which won't really matter where they go. I can change the slots they are in depending on the code.

automodell-brushless-fahrtregler-reely.jpg

automodell-brushless-fahrtregler-reely.jpg

IMG_4842.JPG

It is not a hard route at all it just needs to go forward and then turn right as its going forward, then go forward again and then stop. It needs to be able to do this slowly and at max speed.

That is not an implementable set of requirements.

  1. Go forward for how long?

  2. Turn how much? For how long?

  3. After returning the steering to neutral? For how long?

  4. How long after doing this slowly should it do it as fast as possible?

If its 'very simple' how far did you get in writing your own code, can you show us ?

Are you prepared to provide a circuit diagram of how its all wired up, or do we need to guess ?

PaulS:
That is not an implementable set of requirements.

  1. Go forward for how long?

  2. Turn how much? For how long?

  3. After returning the steering to neutral? For how long?

  4. How long after doing this slowly should it do it as fast as possible?

Thanks for replying! The exact values for all the different variable do not matter much as long as it is the same each time. However here are the specifics:

-Go forward: 10 sec
-Turn: 60°
-Back to neutral just 2 sec

I just need to do it once slowly. The rest of the run throughs need to be at maximum speed.

How will you know that you have turned 60 degrees? Moving the turning servo some amount will result in different orientations depending on the speed of the car. You'll need to know how much your orientation has changed, so you know when to stop steering when you get to 60 degrees.

srnet:
If its 'very simple' how far did you get in writing your own code, can you show us ?

Are you prepared to provide a circuit diagram of how its all wired up, or do we need to guess ?

The point is its simple for people that know what they're doing, not for me. I just wanted to point out that it may not take long for someone who is skilled at this. I am more interested in physicss and mechanics than computer science. So in this area I was wondering if someone could write some code for me. If it would help I can always offer payment for helping me out, because I don't have the time to deepen my understanding of this area, since I need to write a very long essay, which makes a large contribution to your Final grade and will be sent in for university applications. So I have no code, but if it would help to have a diagram, I could provide that for you. Let me know. Thanks.

Jluca:
So in this area I was wondering if someone could write some code for me. If it would help I can always offer payment for helping me out, because I don't have the time to deepen my understanding of this area, since I need to write a very long essay, which makes a large contribution to your Final grade and will be sent in for university applications.

Oh dear.

So you want someone else to write the code which you intend to present as your own ?

Jluca:
-Go forward: 10 sec
-Turn: 60°
-Back to neutral just 2 sec

I just need to do it once slowly. The rest of the run throughs need to be at maximum speed.

Go forward at max speed for 10 seconds. That could be a very long distance.

vinceherman:
Go forward at max speed for 10 seconds. That could be a very long distance.

Just ask Danny Thompson.

srnet:
Oh dear.

So you want someone else to write the code which you intend to present as your own ?

I don't intend to present this as my own. The essay is what matters. We are even allowed to write an essay using data already provided, however the personal engagement marks will be slightly lower.

Jluca:
The point is its simple for people that know what they're doing, not for me.

The people that know what they're doing also know it's NOT simple.

Running a car in a straight line is not simple, as cars tend to veer off course very quickly. You have to compensate for this.

Making a specific amount of turn is not simple, as you have to know how fast you go, what radius you want to do, measure constantly how far you are in that turn as again you have to compensate for imperfections to stay on track.

You don't offer any details of the car: how it knows where it is, how it knows which direction it's pointing or how it knows how fast it's going. Only when you can measure those parameters correctly, you stand a chance of running the car along a set course. Then to actually operate the car you have to know how to control its speed and direction, which you also didn't tell about. Do you have any of this working already?

Could someone help me out?

Btw it needs to be over a long distance so that the differences are bigger, but thats beside the point. I am looking for someone to write the code for me. And they can be paid if they want to be.

wvmarle:
The people that know what they're doing also know it's NOT simple.

Running a car in a straight line is not simple, as cars tend to veer off course very quickly. You have to compensate for this.

Making a specific amount of turn is not simple, as you have to know how fast you go, what radius you want to do, measure constantly how far you are in that turn as again you have to compensate for imperfections to stay on track.

You don't offer any details of the car: how it knows where it is, how it knows which direction it's pointing or how it knows how fast it's going. Only when you can measure those parameters correctly, you stand a chance of running the car along a set course. Then to actually operate the car you have to know how to control its speed and direction, which you also didn't tell about. Do you have any of this working already?

Thank you for highlighting these issues. And I don't understand why everyone has to be so hung op on me saying that it was simple. I'd be happy to provide any details if someone is actually interested in the project. Everyone prior to your post decided to focus on all the wrong things. I have already fully assembled and wired the car, I just need to upload the code. Could you let me know what you'd like to know?

Delta_G:
And you want this code to cause this mystery car to perform some mystery action that you have only vaguely hinted at. Can I write it with a random number generator so it goes a different distance each time? Are you still going to pay me once you realize that you should have given the specs BEFORE asking me to write code? Cause I can't guarantee I'll meet specs you don't provide. But I will expect to be paid either way.

If you're actually interested let me know what you need to do it successfully. It would be helpful if you could give me a list of everything you need,

Well... start with details about the car in question - such as how its speed and direction are controlled and which exact sensors it has - and what it has to do (actual distance/time/speed/angles/etc). You offer NO useful details whatsoever.

wvmarle:
Well... start with details about the car in question - such as how its speed and direction are controlled and which exact sensors it has - and what it has to do (actual distance/time/speed/angles/etc). You offer NO useful details whatsoever.

I know I don't offer any useful details, because no one will tell me what is useful in writing the code for this.

Direction is controlled by a servo and speed by the motor. The motor works through the "fahrtregler" (not sure of the exact english term) which is connected to the arduino. The servo is also connected to the arduino. The servo is powered through power provided by a Lipo battery which runs through the fahrtregler. It has no sensors, because it doesn't need to pick anything up and then react on that. It simply needs to follow steps that are loaded onto the arduino (which is what needs to be written). So the servo needs to be controlled and the motor needs to be controlled. The servo must be controlled to go left. The motor only needs to go forward. I think it would work best to have to seperate files of code, that are essentially the same, but one is at max speed and the other is at a low speed. The servo must turn left 60° physically. I'm not sure if this helps in the coding but this is what needs to happen physically, so let me know what you need here. For the motors what would you need to know? It would go forward for the entire run, then the servo engages after 5 seconds and stays on for 1 second. Then the car continues going straight, before stopping after another 3 seconds. What will you need and are you genuinely interested in doing this?

Or post a picture?

OP DID post a picture. It looks like an Electronic Speed Controller, so it operated just like a servo.

It has no sensors, because it doesn't need to pick anything up

Tell me where you are. I'm going to fly there, blindfold you, put you in your car, and give you very specific "go this fast, for this long, then turn this amount..." instructions, and see how well you do driving to the grocery store. I'll follow, and post the video on youtube, so you can see just how stupid the idea of being able to follow a course with NO feedback is.

PaulS:
OP DID post a picture. It looks like an Electronic Speed Controller, so it operated just like a servo.
Tell me where you are. I'm going to fly there, blindfold you, put you in your car, and give you very specific "go this fast, for this long, then turn this amount..." instructions, and see how well you do driving to the grocery store. I'll follow, and post the video on youtube, so you can see just how stupid the idea of being able to follow a course with NO feedback is.

Again, as I have had to tell everybody. It doesn't need to follow a course. Its not hard to get. Why is everyone making it so much more complex than it is. It literally just needs to perform this task. I could drive blindfolded and go forward for a certain amount of time, then turn the steering wheel a certain amount and turn it back. I might not get to the grocery store, but I don't need to get to the grocery store.

I might not get to the grocery store, but I don't need to get to the grocery store.

Let me guess. You need to get to the liquor store.

What is the purpose of operating the drive wheels for a fixed amount of time, apparently regardless of the speed, then operating the servo to move a fixed amount, then moving the servo back, then operating the drive wheels for a fixed amount of time and then coasting to a stop?

Go sit in your car, drive straight forward for a bit, then hold the steering wheel in a fixed position, and see how straight you go.

Spoiler: you don't. Same for your automatic car. Without any feedback on direction it's not going straight. You probably don't realise it but to drive straight you're constantly making corrections.

Actually the code for your car to go forward without feedback is dead simple - just try it out. Connect the stuff, create a Servo object in your code, then a Servo.write(130); line (amend the 130 to get the speed you like), and see how straight it goes. The loop() function can remain empty. It's really that simple. You can probably adapt one of the servo examples - I suppose your two wheels have independent controls so add a second servo object for the other wheel. If you set one servo to 130, you probably have to set the other to a different number for it to go more or less straight as they will turn at different speeds. The range of this number is from 0 (full speed one direction) to 180 (full speed other direction).

Do note that even though this is reply #24 already your specs are insufficient for me to even give this simple an example code. No info on the servo things you use. No info on which pins they're connected. No info on how fast they (should) go. Did you even get them to run at all? Or how can you be sure that the hardware is in full working order?

It seems you know awfully little about your car and what you want it to do and how it could be done for someone for who it's an integral part of a major school project.