Arduino Open Source X-PID firmware incl.360°option

AMC, H-Bridge projects etc.
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: Arduino Open Source X-PID firmware incl.360°option

Postby jeroen » Fri 1. Nov 2013, 19:48

Hi there,

I have a arduino uno r3 and a polulu dual 14a (md03a). Should this setup work?

Connected it all... but no life in the motor controller.

Uploaded the firmware in the arduino... all works with the pots in x-sim.

I am sure I have connected it all the right way. Checked in the firmware for the pins.

Motor controller works fine with amc 1.5.

Any suggestions?
jeroen
 
Posts: 1
Joined: Sat 29. Sep 2012, 12:17
Has thanked: 0 time
Been thanked: 0 time

Re: Arduino Open Source X-PID firmware incl.360°option

Postby 3942368 » Sat 16. Nov 2013, 08:46

hellow

I want use this firmware but my Motor driver is not l298

l296 table is
 
IN1=H, IN2=L
forward
IN1=L, IN2=H
backward
 
IN1 = IN2
break
ENA=L
break

but my driver is

ENA = L
Idle
ENA=H, DIR(IN1)=don't care, STOP(IN2)=H, PWM
break
ENA=H, DIR(IN1)=H, STOP(IN2)=L, PWM=H
forward
ENA=H, DIR(IN1)=L, STOP(IN2)=L, PWM=H
backward

how to apply this driver in firmware ?
3942368
 
Posts: 1
Joined: Fri 15. Nov 2013, 10:25
Has thanked: 0 time
Been thanked: 0 time

Re: Arduino Open Source X-PID firmware incl.360°option

Postby dualin » Thu 28. Nov 2013, 02:16

Hi Sirnoname, I'm using your firmware but I want to upgrade my simulator to a 3dof with traction loss. Can I use a second arduino with your firmware with one hbridge to control the third motor?? I'll only use one of the new axis and left the other without use. My idea is assign the yaw effect to the third axis to get the traction loss effect.

Thanks in advance

Regards
Dualin
User avatar
dualin
 
Posts: 201
Images: 7
Joined: Tue 10. Jul 2012, 01:15
Has thanked: 1 time
Been thanked: 0 time

Re: Arduino Open Source X-PID firmware incl.360°option

Postby ericRacer » Thu 28. Nov 2013, 13:34

yes you can....i used 2 arduinos for 4 motors....no matter if you use only 1 axe on an arduino ! you will nead only a second USB port available on your PC

User avatar
ericRacer
X-Sim Supporter
 
Posts: 80
Images: 36
Joined: Wed 28. Mar 2012, 15:04
Location: Canada, Qc, Jonquiere
Has thanked: 3 times
Been thanked: 2 times

Re: Arduino Open Source X-PID firmware incl.360°option

Postby dualin » Thu 28. Nov 2013, 14:18

Ok, thanks for your answer.

Regards
Dualin
User avatar
dualin
 
Posts: 201
Images: 7
Joined: Tue 10. Jul 2012, 01:15
Has thanked: 1 time
Been thanked: 0 time

Re: Arduino Open Source X-PID firmware incl.360°option

Postby bebop33 » Thu 5. Dec 2013, 04:23

Someone PLEASE help, complete noob learning slowly. Here is a picture of my setup before sim build. wired everything direct pin 1 to pin1 etc... pots work perfect in X-Sim 0 to 1023 but I can't get any power to the motors. 1050W power supply, both motors tested working with direct power.
Attachments
bebop33
 
Posts: 2
Joined: Tue 11. Jun 2013, 22:45
Has thanked: 0 time
Been thanked: 0 time

Re: AW: Arduino Open Source X-PID firmware incl.360°option

Postby Tombo » Thu 5. Dec 2013, 10:12

You connected it Like shield pin1 to 1, Pin 2 to 2?
Thats wrong this is working for racing mats Firmware you have to change the Pins look into Arduino Code.

Gesendet von meinem GT-S5830 mit Tapatalk 2
Tombo
 
Posts: 97
Images: 36
Joined: Fri 22. Feb 2013, 20:52
Location: Germany
Has thanked: 6 times
Been thanked: 8 times

Re: Arduino Open Source X-PID firmware incl.360°option

Postby bebop33 » Sun 8. Dec 2013, 19:50

Thanks,I got it working and already upgraded to 24v wheelchair motors. Will post pics when done.
bebop33
 
Posts: 2
Joined: Tue 11. Jun 2013, 22:45
Has thanked: 0 time
Been thanked: 0 time

Re: Arduino Open Source X-PID firmware incl.360°option

Postby Bergison » Wed 11. Dec 2013, 22:18

Hi everybody and thanks sirnoname for this great work! I'm building myself a G-seat based on wiper motors, your x-sim plugin and arduino firmware:
http://x-sim.de/forum/viewtopic.php?f=37&t=1310

I'm trying to use the arduino UNO R3 coupled with this shield:
http://www.elechouse.com/elechouse/index.php?main_page=product_info&cPath=100_146&products_id=2179

According its documentation, the control works like this:

• Rotate forward: EN = HIGH, RPWM = PWM, LPWM = HIGH, DIS = vacant
• Rotate reverse: EN = HIGH, RPWM = HIGH, LPWM = PWM, DIS = vacant
• Stop and brake: EN = HIGH, RPWM = HIGH, LPWM = HIGH, DIS = vacant
• Stop but not brake: EN = 0, RPWM = HIGH, LPWM = HIGH, DIS = vacant
• Prohibit : EN = X, RPWM = X, LPWM = X, DIS = HIGH

For Arduino users:
Channel - Driver Module - Arduino Pin
A - EN - 2
A - RPWM - 3
A - DIS - 4
A - LPWM - 5
B - EN - 8
B - RPWM - 9
B - DIS - 7
B - LPWM - 6

I tried to understand your code as best as I could and changed the pinouts to this:

int portdstatus =PORTD; // read the current port D bit mask
int ControlPinM1Inp1 =3; // (was 2) motor 1 INP1 output, this is the arduino pin description
int ControlPinM1Inp2 =5; // (was 3) motor 1 INP2 output, this is the arduino pin description
int ControlPinM2Inp1 =9; // (was 4) motor 2 INP1 output, this is the arduino pin description
int ControlPinM2Inp2 =6; // (was 5) motor 2 INP2 output, this is the arduino pin description
int PWMPinM1 =2; // (was 10) motor 1 PWM output
int PWMPinM2 =8; // (was 9) motor 2 PWM output

The feedback works fine, but the motor only turns in one direction! :( Did I miss something?
I am a real beginner, and tried to read through the posts in this forum, but am stuck at this point.
I am greatful for any help!!!
User avatar
Bergison
 
Posts: 39
Images: 20
Joined: Wed 6. Nov 2013, 20:37
Location: Austria
Has thanked: 0 time
Been thanked: 9 times

Re: Arduino Open Source X-PID firmware incl.360°option

Postby Bergison » Fri 13. Dec 2013, 13:17

I gave up on changing the code and just wired the motor controller to the original pins without using it as an arduino shield. Now everything works!
User avatar
Bergison
 
Posts: 39
Images: 20
Joined: Wed 6. Nov 2013, 20:37
Location: Austria
Has thanked: 0 time
Been thanked: 9 times

PreviousNext

Return to Controllers and Drivers Projects

Who is online

Users browsing this forum: No registered users and 1 guest

cron