View: 238|Reply: 5

Picar B motor and servo directions

[Copy link]

1

Threads

10

Posts

23

Credits

Newbie

Rank: 1

Credits
23
Post time 2020-2-13 02:58:45 From the mobile phone | Show all posts |Read mode
i have setup the car, but i have the first problem. the motor and servo direction are inverted with real client comands. what is my problem? elecrtical or configurations?
Reply

Use magic Report

1

Threads

13

Posts

49

Credits

Newbie

Rank: 1

Credits
49
Post time 2020-2-13 05:42:58 | Show all posts
everyone has had this problem, it's Adeept s/w issue. You can fix it in their s/w later.
Reply

Use magic Report

1

Threads

13

Posts

49

Credits

Newbie

Rank: 1

Credits
49
Post time 2020-2-13 05:49:39 | Show all posts
[tr][/tr]
[tr][/tr]
everyone has had this problem, it's Adeept s/w issue. You can fix it in their s/w later.







Reply

Use magic Report

1

Threads

13

Posts

49

Credits

Newbie

Rank: 1

Credits
49
Post time 2020-2-13 05:51:22 | Show all posts
another guy posted how to fix it....


I started looking at the bundled software and a few things don't make sense to me. The servo motors in this kit are these

http://www.ee.ic.ac.uk/pcheung/t ... /sg90_datasheet.pdf

so a 1msec pulse = full left, 1.5msec = middle and 2.0msec = full right, based on a 50Hz period.

The first thing is that the PWM frequency which is set in the file turn.py is set to 60 which does not look to be correct?

Also, the logic of the turn left and turn right commands as shown below looks to be the opposite of what I would expect. To turn further left, it looks like the duration of the pulse is increased up to a maximum value. Based on the spec above, I would be expecting this to be the other way around?

        elif 'l_le' in data:                   #Camera look left
            if hoz_mid< look_left_max:
                hoz_mid+=turn_speed
            turn.ultra_turn(hoz_mid)
            tcpCliSock.send('7'.encode())

        elif 'l_ri' in data:                   #Camera look right
            if hoz_mid> look_right_max:
                hoz_mid-=turn_speed
            turn.ultra_turn(hoz_mid)
            tcpCliSock.send('8'.encode())
Reply

Use magic Report

1

Threads

10

Posts

23

Credits

Newbie

Rank: 1

Credits
23
 Author| Post time 2020-2-13 07:18:13 From the mobile phone | Show all posts
Thank you, but i have the problem also with motor, If i click forwards the motor moves to backforwards and bforwards moves forwards.
Reply

Use magic Report

1

Threads

13

Posts

49

Credits

Newbie

Rank: 1

Credits
49
Post time 2020-2-16 08:27:20 | Show all posts
1581533511 replied at 2020-2-13 07:18 AM
Thank you, but i have the problem also with motor, If i click forwards the motor moves to backforwar ...

watch the video
adeept.com/video/detail-71.html

go to 1:00-1:20 (at 1:12) you will see the code that you can change.
swap the direction ==1:     -> direction ==0
...
..
elif direction == 0:      to -> direction ==1:

that will fix it

or, u can reverse the back axle..simply remove the back wheel, slide it out, reverse it, and put it back in the other way...you'll need to adjust the little golden piece with teeth, but that's it.

so, either way will do it. I have no idea why Adeept didn't check this b4.
Reply

Use magic Report

You have to log in before you can reply Login | Sign Up

Points Rules