Open latest posts
motion simulator DIY community 

2DOF Arduino miniature motion platform w 2-servos

Community DIY motion simulator projects with X-Simulator. Share your projects with reproduction hints and learn from others. No commercial projects. - Gemeinnützige DIY Bewegungssimulatoren Projekte mit X-Simulator. Präsentiert hier eure Fortschritte inklusive Nachbau Tips und lernt von anderen. Keine kommerziellen Projekte.
on 13.10.2011, 09:57

2DOF Arduino miniature motion platform w 2-servos

Postby jamesdio on 13.10.2011, 09:57

Hi. Every X-SIMMERS.

This is Jason from Korea.
I'd like to introduce my work in process to bulid wiper motor based motion simulator.
This miniature is just the first step.

I'll post arduino source codes and X-Sim profiles later.



This is an arduino miniature motion simulator which is going to be scaled up to wiper motor powered one such as DERIY(SATO)

2dof-wiper-motor-car-simulator-by-deriy-sato-...

or ua6aak
2dof-simple-wipermotor-chair-by-ua6aak-t2512-...

these guys fantastic work inspires and motivates me!
of course there are many masters such as Thanos, SirNoName and so on...sorry i can't remember the others.. :(
and also big thanks to them!
If there were no their awesome works, I've naver ever tried to build a homebrew motion simulator even thought of it :(

it'll be a step by step process which is following Thanos work for AMC, DSMhb and take quite some time.
because, I have no idea on electronics.
So, I have a lot of things to learn to build homebrew motion sim.

Honestly I'm having a hard time to gathering information regarding building Motion simulator and to find the place to buy necessary parts in Korea.

Hope for the success!

Sorry for my english.

Regard Jason.


P.S. I have one question for those who know about current consumtion of 2 wiper motors with load.
I'm going to use my old ATX pc power supply which is 510W with 12V-34A (38A peak-single rail) as a PSU for 2 wiper motors.
The image of my PSU specs is attached.

Can one ATX power supply handle 2 wiper motors with load?
Attachments
pcpower510-specs.gif
ATX Power Supply for 2 wiper motors
pcpower510-specs.gif (8.45 KiB) Viewed 11953 times
User avatar
jamesdio
new member
 
Posts: 12
Joined: 04.02.2009, 10:00
Location:Korea, Republic of KOREA
Local time: 20.05.2013, 11:15
Obtained thanks: 8


on 13.10.2011, 16:45
Re: 2DOF Arduino miniature motion platform w 2-servos

Postby eaorobbie on 13.10.2011, 16:45

should be ok mate but ya could use one per motor.
Well done on mini. Time to build the real thing because i dont think it would last if ya sat on it, lol, sorry could help myself.
Well Done, Ask away.
User avatar
eaorobbie
X-SIMER
 
Posts: 274
Joined: 26.05.2009, 15:02
Location:Australia Bullsbrook Western Australia
Local time: 20.05.2013, 10:15
Obtained thanks: 67


on 13.10.2011, 23:19
Re: 2DOF Arduino miniature motion platform w 2-servos

Postby bsft on 13.10.2011, 23:19

Yes a great job there, well done.
Can you please share the code?
Also power supply, yes one each per motor would be sufficient. Otherwise run one power supply in parallel with a car battery for both motors. Several of us use that set up. Good to handle big spikes in current draw.
User avatar
bsft
X-SIMER
 
Posts: 1198
Joined: 18.02.2011, 01:54
Location:Australia Sydney Australia
Local time: 20.05.2013, 12:15
Obtained thanks: 117


on 14.10.2011, 01:50
Re: 2DOF Arduino miniature motion platform w 2-servos

Postby jamesdio on 14.10.2011, 01:50

thank you guys for the answers.

Normally, a car wiper motor(DC12V-30W) consumes 10A on its specification.

but I learned before that P = VI,
then 30W = 12V * y A.

Therefore
y = 2.5 A.

is that right?

if it's right, one PSU can easily handle 2 wiper motors
So, I thought one PSU can handle 2 wiper motors w a payload of nearly 130kg.

if I'm wrong,
I should buy a car battery or another PSU. :(

plz correct me if I'm wrong.
Thanks in advance

Anyway, Here is my code.
the origin source codes come from herctrap and juiou.

Many thanks to herctrap, juiou and their source codes. :clap:

Code: Select all

/*
* 2DOF Motion Platform with 2 Servos
* -------------------------------------
* Thanks to herctrap and his source
* http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1280139142
*
* and also thanks to juiou and his source
* http://www.x-simulator.de/forum/arduino-and-x-sim-t2773-30.html
*
* I just combined their sources.
*
*/

#include <Servo.h>

Servo myservo1;
Servo myservo2;

int Degree;
int Gforce = 0;
int Gforce1 = 0;
int Gforce10 = 0;
int Gforce100 = 0;

char kind_of_data;

void setup() {
 
  //set servo pins
  myservo1.attach(2);
  myservo2.attach(3);
 
  //align servos center postision
  myservo1.write(90);
  myservo2.write(90);
 
  //open serial connection
  Serial.begin(115200);
}

void loop() {

  // wait for serial input (min 3 bytes in buffer)
  while(Serial.available() > 0) {
   
    kind_of_data = Serial.read(); //string from USO --> L~a01~ R~a02~ 8bit resolution\decimal output
    if(kind_of_data == 'L') {
      Read_Pos(kind_of_data);
    }
    if(kind_of_data == 'R') {
      Read_Pos(kind_of_data);
    }
  }
}
   
void Read_Pos(char which_servo){
  delay(2);
  int Gforce100 = Serial.read()- '0';
  delay(2);
  int Gforce10 = Serial.read()- '0';
  delay(2);
  int Gforce1 = Serial.read()- '0';
 
  //Verifica se e centena dezena ou decimal... =]
  if (Gforce1 < 0) { Gforce = Gforce10 + 10*Gforce100; }
  if (Gforce1 < 0 && Gforce10 < 0) { Gforce = Gforce100; }
  if (Gforce100 < 0) { Gforce = 127; }
  if (Gforce1 >=0 && Gforce10 >= 0 && Gforce100 >= 0) { Gforce = 100 * Gforce100 + 10 * Gforce10 + Gforce1; }

  if (which_servo == 'L') {
    Degree = map(Gforce, 0, 255, 180, 0);   
  }
  if (which_servo == 'R') {
    Degree = map(Gforce, 0, 255, 0, 180);
  }

  if (which_servo == 'L') {
    myservo1.write(Degree);
  }
  if (which_servo == 'R' ){
    myservo2.write(Degree);
  }
}

User avatar
jamesdio
new member
 
Posts: 12
Joined: 04.02.2009, 10:00
Location:Korea, Republic of KOREA
Local time: 20.05.2013, 11:15
Obtained thanks: 8
The following user would like to thank jamesdio for this post
juniou


on 14.10.2011, 02:15
Re: 2DOF Arduino miniature motion platform w 2-servos

Postby bsft on 14.10.2011, 02:15

Hello dude, in regards to power supplies and wiper motors.
When a wiper motor is doing what it usually does, that being turn one way to swing a wiper arm, it draws a quick bit of high current to start it then uses a little bit after that.
Example being an air-conditioning compressor. Mine is 9kw cooling, so when I start it up, it draws 72amps for about 1/2 second and then 10-12amps running after that.
A wiper motor constantly having its direction and speed changed draws a LOT more current than what it lists as actually using. A safe bet would be to use either one psu per motor, or use one psu wired in parallel with a decent size car battery. I use a cheap 500w pc psu, which really runs more like 330w (it runs about 18amps on 12v) and a second hand car battery rated at 330cca. The two of them together handle the spikes of 22amps through my JRK controllers very well. I run two motors.
Also, thanks for sharing the code. :clap:
Cheers, David.
User avatar
bsft
X-SIMER
 
Posts: 1198
Joined: 18.02.2011, 01:54
Location:Australia Sydney Australia
Local time: 20.05.2013, 12:15
Obtained thanks: 117
The following user would like to thank bsft for this post
jamesdio


on 14.10.2011, 03:51
Re: 2DOF Arduino miniature motion platform w 2-servos

Postby jamesdio on 14.10.2011, 03:51

Thank you bsft for your kind answer.
Now I can see in power consumption of motors more then before.

Anyway does "the spikes" you wrote mean peak current?

The two of them together handle the spikes of 22amps through my JRK controllers very well. I run two motors.


In your case the power consumption of 2 wiper motors is 264W(=12V * 22A) at maximum.
Am I wrong? 22 amps in each?

If the spikes of 22A is for 2 wiper motors, There is one thing I can't understand is that My PSU which can handle 12V-34A(510W) on the average, 12V-38A(650W) at peak is not enough to turn 2 wiper motors on in severe situation you said.

I think the spikes of 22A is quite lower than the capacity of my PSU, 34A.

sorry for bothering you to explain.
Thanks in advance.

Regard, Jason.
User avatar
jamesdio
new member
 
Posts: 12
Joined: 04.02.2009, 10:00
Location:Korea, Republic of KOREA
Local time: 20.05.2013, 11:15
Obtained thanks: 8


on 14.10.2011, 12:36
Re: 2DOF Arduino miniature motion platform w 2-servos

Postby bsft on 14.10.2011, 12:36

Hello Jason, sorry, I'd better explain myself better. Yes I mean peak current, in this case my boards are set at 22.5 amps peak, each. I can go up to 30amps, but they would stress the boards.
Yes I mean 22amps per motor. So perhaps allow up to 50 amps total. My suggestion would be to use your power supply with a car battery in parallel. This will cover peak current bursts and perhaps save a few dollars in getting another power supply.
With the motion, if you harden up the motion or add more forces, you add more power needed, hence the higher current needed.
It took me ages to figure out power requirements and cost to do it. Eaorobbie, suggested a car battery in parallel with my current power supply. It works a dream. I got a good second hand battery for $30, and modified a pc psu $40, cheap overall and very effective.
User avatar
bsft
X-SIMER
 
Posts: 1198
Joined: 18.02.2011, 01:54
Location:Australia Sydney Australia
Local time: 20.05.2013, 12:15
Obtained thanks: 117
The following user would like to thank bsft for this post
jamesdio


on 16.10.2011, 07:40
Re: 2DOF Arduino miniature motion platform w 2-servos

Postby bsft on 16.10.2011, 07:40

Heres a photo of what I did in regards to a power supply setup.
http://img258.imagevenue.com/img.php?im ... 2_28lo.jpg
I re-wired a cheap pc psu $40 to have only 12v http://web2.murraystate.edu/andy.batts/ ... supply.htm and then wired it in parallel with a second hand car battery, this one rated at 330cca. It runs both motors more than fine, as well as a fan on the control boards and a fan on each motor to keep them cool.
User avatar
bsft
X-SIMER
 
Posts: 1198
Joined: 18.02.2011, 01:54
Location:Australia Sydney Australia
Local time: 20.05.2013, 12:15
Obtained thanks: 117
The following user would like to thank bsft for this post
jamesdio


on 16.10.2011, 22:39
Re: 2DOF Arduino miniature motion platform w 2-servos

Postby juniou on 16.10.2011, 22:39

Hi jamesdio great job!
now let's port it to an PID proccess, with Arduino pid library... :)
www.arduino.cc/playground/Code/PIDLibrary
j u n i o u
[]'s
User avatar
juniou
new member
 
Posts: 12
Joined: 08.01.2011, 23:01
Location:Brazil Brazil
Local time: 19.05.2013, 22:15
Obtained thanks: 3


on 17.10.2011, 01:00
Re: 2DOF Arduino miniature motion platform w 2-servos

Postby BartS on 17.10.2011, 01:00

Hi,
To do this you are going to need a fixed time base for the PID, the way to do it is to set the PID sample time to 0 and run an interrupt timer of a chosen period on the PID. This is the hard part as you will have to work out how long everything takes to execute and build your timebase from there.
Bart
User avatar
BartS
X-SIMER
 
Posts: 157
Joined: 10.10.2010, 23:47
Local time: 20.05.2013, 03:15
Obtained thanks: 17



Next

Similar topics

Return to DIY motion simulator projects


Add this Thread to:
Add this page to Mr. Wong Add this page to Del.icio.us Add this page to Webnews Add this page to Icio Add this page to Oneview Add this page to Linkarena Add this page to Newskick Add this page to Folkd Add this page to Yigg Add this page to Digg Add this page to Reddit Add this page to Simpy Add this page to StumbleUpon Add this page to Slashdot Add this page to Netscape Add this page to Furl Add this page to Yahoo Add this page to Spurl Add this page to Google Add this page to Blinklist Add this page to Blogmarks Add this page to Diigo Add this page to Technorati Add this page to Newsvine Add this page to Blinkbits Add this page to Ma.Gnolia Add this page to Smarking Add this page to Netvouz

Who is online

Users browsing this forum: No registered users and 0 guests

cron