Finished 2DOF 12V DC wiper arduino playseat

Running simulator build projects.
Please use the image gallery for your pictures, a short tutorial can be found here.
The first image in the first post will be shown in the project gallery.

Re: Finished 2DOF 12V DC wiper arduino playseat

Postby RacingMat » Tue 17. Sep 2013, 13:59

my setup is the same of you

Ok, it will be easier ;-)

when i manualy turn the pot to roll one motor, the 2 motors turn with the same pot


That's abnormal !
Each pot has to be wired like this :
Right pot middle pin to analogic A4 pin
Left pot middle pin to analogic A5 pin
Pot's side pins : one to gnd, the other to 5V

Could you take a picture of your wiring ?
Mat
2 DOF playseat : arduino, motomonster, 12V truck wiper motors
http://www.x-sim.de/forum/viewtopic.php?f=37&t=943
User avatar
RacingMat
X-Sim Stage 2 edition
 
Posts: 456
Images: 147
Joined: Wed 20. Feb 2013, 21:30
Location: Marseille - FRANCE
Has thanked: 4 times
Been thanked: 130 times

Re: Finished 2DOF 12V DC wiper arduino playseat

Postby mleunam » Tue 17. Sep 2013, 16:55

I can take picture later, but i connect exactly,

I connect the midle pin A4 and A5 and the motors go to mid position and stop, i go to arduino and send one String comand and nothing moves :?

PS: if i remove 1 pot from A4 or A5 the power go shut down it is strange
mleunam
 
Posts: 11
Joined: Wed 10. Apr 2013, 20:58
Has thanked: 2 times
Been thanked: 0 time

Re: Finished 2DOF 12V DC wiper arduino playseat

Postby kalarius » Tue 17. Sep 2013, 17:10

Hi,

at one pin of the pot (right or left) you must add a resistor 470R because if you go from one side to other then the pot will destroyed.
If you have all ready done this (without the resistor) then check the wires of 5V if they are ok.
without the resistor you have a short-circuit and this destroy the power line of 5V.

Kalarakis
kalarius
X-Sim Supporter
 
Posts: 22
Joined: Mon 5. Aug 2013, 18:17
Has thanked: 1 time
Been thanked: 3 times

Re: Finished 2DOF 12V DC wiper arduino playseat

Postby mleunam » Tue 17. Sep 2013, 17:14

I'm always learning :D

I remove the block of pot to rotate 360, have a problem ?
mleunam
 
Posts: 11
Joined: Wed 10. Apr 2013, 20:58
Has thanked: 2 times
Been thanked: 0 time

Re: Finished 2DOF 12V DC wiper arduino playseat

Postby kalarius » Tue 17. Sep 2013, 18:28

you will destroy the midlle point of the pot
for 270 to 0 you will not have a value from the pot.
then the motor will rotate right or left depend on the previous commands
this program and this circuit are not for 360


kalarakis
kalarius
X-Sim Supporter
 
Posts: 22
Joined: Mon 5. Aug 2013, 18:17
Has thanked: 1 time
Been thanked: 3 times

Re: Finished 2DOF 12V DC wiper arduino playseat

Postby RacingMat » Tue 17. Sep 2013, 18:37

@mleunam : i have understood that you modified your pot. You have removed the hardware limit.

If you did this : as Kalarakis told you, it could be a problem (short circuit probably).
Can you use "normal" pot and have a new try ?

How are they mounted ? Why did you need such a hack ?
Mat
2 DOF playseat : arduino, motomonster, 12V truck wiper motors
http://www.x-sim.de/forum/viewtopic.php?f=37&t=943
User avatar
RacingMat
X-Sim Stage 2 edition
 
Posts: 456
Images: 147
Joined: Wed 20. Feb 2013, 21:30
Location: Marseille - FRANCE
Has thanked: 4 times
Been thanked: 130 times

Re: Finished 2DOF 12V DC wiper arduino playseat

Postby mleunam » Tue 17. Sep 2013, 19:38

Himm, im afraid to motor destroy pot,

i go put new pots right now, wen i turn on they will no destroy the pot ?

I test manual the pot and the pot A5 control the 2 motors and the A4 the same, and they no reverse , why ? i have

7,4 right motor
8,9 Left Motor
5 pwm right
6 pwm Left
A5 - pot right
A6 - Pot Left

Why 1 pot control 2 motors ?
mleunam
 
Posts: 11
Joined: Wed 10. Apr 2013, 20:58
Has thanked: 2 times
Been thanked: 0 time

Re: Finished 2DOF 12V DC wiper arduino playseat

Postby kalarius » Tue 17. Sep 2013, 20:12

a5 and a4 are the pots
kalarius
X-Sim Supporter
 
Posts: 22
Joined: Mon 5. Aug 2013, 18:17
Has thanked: 1 time
Been thanked: 3 times

Re: Finished 2DOF 12V DC wiper arduino playseat

Postby mleunam » Tue 17. Sep 2013, 20:16

yes is totaly conected, wen i turn on and i move left pot, the 2 motors turn from the same side and dont invert :S
IF i use only one pot the 2 motors invert, but the two same time
mleunam
 
Posts: 11
Joined: Wed 10. Apr 2013, 20:58
Has thanked: 2 times
Been thanked: 0 time

Re: Finished 2DOF 12V DC wiper arduino playseat

Postby RacingMat » Tue 17. Sep 2013, 22:02

Beware, what a mess : your wiring was wrong !

Do not attach pot on motor now ! follow the instructions below first.

Mat

First : your pot are not mounted onto the motor
you can see the expected behaviour in this video
http://www.youtube.com/watch?v=oFnLDR2xGgg
and please find the explanation of the code here :

The code is written to put the simulator on middle position at start :
/* init position value*/
int DataValueL=512; //middle position
- if your pot is fully turned to max, as Arduino "reads" potentiometer value as motor position, Arduino believes that motor is in max position.
- but the order is to be in middle position
- so the Arduino will ask the motor to go reverse in order to go to middle position
- your motor is turning
- but while your pot keeps still, the motor will turn non stop !

- when you manually turn the pot backward to min, Arduino reads that motor is in min position
- but the order is still middle position, so Arduino will tell the motor to go forward
- motor runs non stop until the pot is in middle position

In the code, you have a "tolerance" parameter : when the pot is around middle position (<middle+tolerance and >middle-tolerance), the motor stops.
You can broader Tolerance value to stop your motor more easily manually.
2 DOF playseat : arduino, motomonster, 12V truck wiper motors
http://www.x-sim.de/forum/viewtopic.php?f=37&t=943
User avatar
RacingMat
X-Sim Stage 2 edition
 
Posts: 456
Images: 147
Joined: Wed 20. Feb 2013, 21:30
Location: Marseille - FRANCE
Has thanked: 4 times
Been thanked: 130 times

PreviousNext

Return to Motion simulator Projects in progress

Who is online

Users browsing this forum: No registered users and 2 guests