Putting robotics at your service™

Free shipping on orders over $75

p2 controlled Jeep 1/8 scale

Print view Share :
Previous topicNext topic

Page 2 of 3 [ 37 posts ]

1, 2, 3
Rookie ( offline )
Posts: 25
Posted: 2018-02-22 15:42 
Pictures


Attachment:
File comment: I replace the front steering motor with servo
IMG_1930.JPG
IMG_1930.JPG [ 1000.92 KiB | Viewed 93 times ]
Attachment:
File comment: Breadboard
IMG_1935.JPG
IMG_1935.JPG [ 967.18 KiB | Viewed 93 times ]
Attachment:
File comment: Steering servo I'm using
IMG_1941.PNG
IMG_1941.PNG [ 965.09 KiB | Viewed 93 times ]
User avatar
Admin ( offline )
Posts: 1607
Posted: 2018-02-26 15:41 
Hi,

Thank you for the pictures and details.

It would also be helpful if you could post an attachment of the code you are currently using.

Sincerely,

_________________
Sébastien Parent-Charette
Robotics Software Specialist

RobotShop inc.
Putting Robotics at your service!™
www.robotshop.com

Lynxmotion
Imagine it. Build it. Control it.™
http://www.Lynxmotion.com


Rookie ( offline )
Posts: 25
Posted: 2018-02-26 20:27 
this is the code im currently using.... i did not implement the safety commands yet i been kinda having a difficulty with that
referring to your post about boolean........
an I've noticed the wheels do keep spinning if the ps2 controller disconnects


Attachment:
endgame2.ino [7.02 KiB]
Downloaded 15 times
User avatar
Admin ( offline )
Posts: 1607
Posted: 2018-02-27 11:05 
Hi,

Here are a few comments concerning your code:
At line 29 you have
Code:
myservo.attach(9);
We assume this is the Servo object that will control turning?

At lines 93-124 you left code for a Guitar Hero controller. Are you using one of these? If not, we recommend removing the code for clarity / simplicity.

At line 126 you perform a read using the read_gamepad(boolean, byte) function
Code:
ps2x.read_gamepad(false, vibrate); //read controller and set large motor to spin at 'vibrate' speed
This call should work as is, but the point of using the version of the function with parameters is to use the returned value to determine if the controller is still connected. Here is an example of what would help your situation:
Code:
boolean value = read_gamepad(false, 0x00);
if(value)
{
[...]do something[...]
}
else
{
[...]do something else[...]
}
We recommend that you at the very least read the value returned (boolean) and see if that is helpful (i.e.: is it different when the controller is connected/disconnected, which you can simulate by turning it off).

For the rest of the code, you may be better off isolating your input code from your output code to make everything more clear.

We hope this helps you moving forward.

Sincerely,

P.-S.: For easing sharing of code and contributions from others, we recommend that you place your code on a code-sharing / version tracking website/server, such as GitHub, BitBucket, etc. These are typically free for open/public projects. That being said, even if it is visible publicly, you still have full control of what changes are made. But, it makes it easy to share and have others propose updates/etc.

_________________
Sébastien Parent-Charette
Robotics Software Specialist

RobotShop inc.
Putting Robotics at your service!™
www.robotshop.com

Lynxmotion
Imagine it. Build it. Control it.™
http://www.Lynxmotion.com


Rookie ( offline )
Posts: 25
Posted: 2018-02-27 17:06 
ill definitely try what u suggested... & give u a feedback
and as far as the code ill see if i can post it on GitHub
but anything to help the next person, as i was helped
an if i can give a review about your help id love to
the that to.........& again anything to help the next person


Rookie ( offline )
Posts: 25
Posted: 2018-02-27 17:19 
And yes the servo is for steering an no im not using the guitar hero so ill take that out


Rookie ( offline )
Posts: 17
Posted: 2018-03-05 06:01 
Seems to me like you dont have common GND between the UNO and the motor cotroler.
Try to ADD a jumper wire from arduino's GND to the (-) of the motor controler.


Rookie ( offline )
Posts: 25
Posted: 2018-03-06 21:45 
Thank u For your feedback borbos I will definitely try that
As soon as possible an will let u know if it was the problem


Rookie ( offline )
Posts: 25
Posted: 2018-03-06 21:46 
But instead of the L298n I'm buying a ESC
So the code will change a little an I will post updates once I have things a little more organized


Rookie ( offline )
Posts: 17
Posted: 2018-03-07 08:04 
L298n can perform like an ESC with the appropriate code. There is no need to buy an ESC.
My opinion is that in your case ESC is needed if you dont have pins left on the arduino (since ESC uses one, and the L298n uses 4)


Rookie ( offline )
Posts: 25
Posted: 2018-03-07 23:10 
Well the l298n keeps overheating for some reason... so even if I got it to work correctly it would only work for about 5min before burning out


Rookie ( offline )
Posts: 25
Posted: 2018-03-08 00:21 
one more thing...with the current setup the car performs great but when i put it on the floor or carpet it has a hard time moving forward an backwards.....the servo performs good when it was put on the floor for a few test runs

with that being said the L298n overheats drastically.

if i put it back on the car holder the wheels spin fast in either direction i select
the H bridge seems to only get warm, until its put on the floor

it might need a bigger motor, witch is coming with the ESC
60 amp ESC and A 4700kv brusless motor 4 poles


Attachment:
419-Hh+fkwL._AC_US218_.jpg
419-Hh+fkwL._AC_US218_.jpg [ 7.77 KiB | Viewed 56 times ]
Rookie ( offline )
Posts: 17
Posted: 2018-03-08 05:03 
of ur l298n over heats, means that either of the following needs to be modified / replaced
1. motor gearing
2. weak motor power
3. wire thicknes (over heat?).
4. weight of the car
5. final gear ratio / wheel size (change with smaller)


Rookie ( offline )
Posts: 25
Posted: 2018-03-12 00:04 
yes u are right about everything u mentioned so the question would be
wouldn't u agree to use the esc i just posted with the motor


Rookie ( offline )
Posts: 17
Posted: 2018-03-12 03:38 
seems fine if you can fit it on the chassis


1, 2, 3

All times are UTC - 5 hours [ DST ]. It is currently 2018-04-22 00:55