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

Postby Settingz85 » Sat 9. Mar 2013, 18:28

Hello!,
I just got this motor driver
http://www.ebay.com/itm/160954041846?ss ... 1439.l2649


From my understanding u can control two motor inependently (left and right). For each Motor u have one PWN and one DIR pin (pwn1/dir1 - pwn2/dir2). Sirnonames example uses one PWN and two Dir inputs. Obviously, Menis had the same problem, only one pin for DIR. Sirnoname said:
Du kannst den zweiten Anschluss einfach weglassen und nicht anschliessen.
Um es ganz genau zu machen musst du halt in der Source Code Fallunterscheidung eine eigene Pin Ansteuerung einbauen und im Falle von target=currentanalogue die Motorbremse ganz herausschmeissen. Muss aber nicht sein da der PID nachregelt wenn es falsch steht.
Der Code ist Open Source damit man die verschiedenen H-Brücken anpassen kann. Da geht es nicht um Programmierkenntnisse sondern um Ablaufkenntnisse die man einfach durch copy paste dort ausprobiert . Alles im Abteil "SetHBridgeControl" vom Source code. Die zwei "analogWrite(PWMPinM1, 255);" und "analogWrite(PWMPinM2, 255);" unter SetPWM solltest du löschen oder auf 0 statt 255 setzen.
Ich denke das werde ich im Code noch anpassen.

(sorry, no time to translate that * try google translator for now). In short: it is possible with 4 pins for two motors. But lets wait for sirnoname himself to clarify things.

Im a bit confused what exactly is meant by your drivers brake function and energy feedback.
Last edited by Settingz85 on Sat 9. Mar 2013, 18:35, edited 1 time in total.
Settingz85
 
Posts: 13
Images: 6
Joined: Sat 22. Dec 2012, 01:31
Has thanked: 1 time
Been thanked: 1 time

Re: Arduino Open Source X-PID firmware

Postby prilad » Sat 9. Mar 2013, 18:34

NeoTokyoNori wrote:Will i need to get another driver card?
The meaning of "dual" is confusing me like hell :!:


Hi, NeoTokyoNori !

I have the same DUAL H-Bridge. You can "find" it with Arduino on my video ;)


On my thread you can find connection diagram (for example)
http://x-sim.de/forum/viewtopic.php?f=39&t=695

Regards,
ALE
User avatar
prilad
 
Posts: 174
Images: 1
Joined: Tue 3. Apr 2012, 14:20
Location: Dubna, Moscow reg., Russia
Has thanked: 3 times
Been thanked: 37 times

Re: Arduino Open Source X-PID firmware

Postby NeoTokyoNori » Sun 10. Mar 2013, 17:19

Thanks for the pointers guys :!:

I have managed get xpid/xsim/arduino to get the driver to drive one of the motors, using 2 pins.
It is a good to know that it works, since I wasn't really sure what would happen with boards from china ;)
This driver may not be bad.

Next I need to figure out how to setup and attach the pots to the motor arm...!
User avatar
NeoTokyoNori
 
Posts: 62
Images: 12
Joined: Mon 28. Jan 2013, 15:02
Location: Japan
Has thanked: 6 times
Been thanked: 1 time

Re: Arduino Open Source X-PID firmware

Postby sirnoname » Wed 13. Mar 2013, 15:41

The firmware is now successfully tested with:
-Arduino UNO R2
-Arduino UNO R3
-Arduino Duemilanove
-Arduino Nano V3.0

Arduino UNO R3 is prefered because it has no automated reset and a faster communication.
If a answer is correct or did help you for a solution, please use the solve button.
User avatar
sirnoname
Site Admin
 
Posts: 1829
Images: 45
Joined: Thu 1. Sep 2011, 22:02
Location: Munich, Germany
Has thanked: 35 times
Been thanked: 128 times

Re: Arduino Open Source X-PID firmware

Postby RafBR » Wed 27. Mar 2013, 07:48

Could anyone tell if this DIY h-bridge would be suited for use with the arduino? It seemed to me to be pretty simple.

http://www.robotizando.com.br/artigo_ponte_h_pg1.php

I know it is a portuguese language website but as pcb drawings are "universal language" I think it wont be a problem.
And you can google translate the whole page as well ;)

By the way, I bought my ard R3. Will pick it up in the next few days :D and let the tests begin.
User avatar
RafBR
X-Sim Supporter
 
Posts: 136
Images: 24
Joined: Tue 20. Mar 2012, 21:53
Location: Brasil
Has thanked: 6 times
Been thanked: 4 times

Re: Arduino Open Source X-PID firmware

Postby sirnoname » Wed 27. Mar 2013, 11:03

No, you need three inputs:
inp1 = S1
inp2 = S2
PWM = ?
Also I do not think the switcher are arduino TTL compliant (max 5V, Pullup etc.).
If a answer is correct or did help you for a solution, please use the solve button.
User avatar
sirnoname
Site Admin
 
Posts: 1829
Images: 45
Joined: Thu 1. Sep 2011, 22:02
Location: Munich, Germany
Has thanked: 35 times
Been thanked: 128 times

Re: Arduino Open Source X-PID firmware

Postby RafBR » Wed 27. Mar 2013, 18:24

Ok understood, thanks to both of you :)
User avatar
RafBR
X-Sim Supporter
 
Posts: 136
Images: 24
Joined: Tue 20. Mar 2012, 21:53
Location: Brasil
Has thanked: 6 times
Been thanked: 4 times

Re: Arduino Open Source X-PID firmware

Postby dualin » Sun 31. Mar 2013, 14:06

Hi, I've bought this h-bridge

http://cgi.ebay.es/ws/eBayISAPI.dll?Vie ... 07&guest=1

I had the Prilad's firmware, and in his thread they said to me that I can't use this h-bridge without a circuit with a 74hc08. Now I've installed this firmware because someone says to me that with this firmware I don't need the supplementary circuit, I can connect directly the arduino with my bridges, but I'm not sure about the connections. In the description of bridges says:

"Just need four lines from MCU to driver module (GND. 5V. PWM1. PWM2);"

The bridge has 8 pins: VCC, GND, R_IS, L_IS, R_EN, L_EN, RPWM, LPWM. But I don't know How I must to connect the arduino to that bridges. VCC and GND are clear, but the arduino has PWM, Input1 and Input2 for each bridge, and I don't know which of the six pins of the bridge must I use.

Can you help me????

Thanks and best regards
Dualin
Last edited by dualin on Tue 2. Apr 2013, 01:25, edited 1 time in total.
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

Postby dualin » Tue 2. Apr 2013, 01:24

Can you help me, please???

Best regards and thanks in advance
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

Postby Tombo » Tue 2. Apr 2013, 21:20

Hi
i've got a question ive got 2 linear 10 Turn Pots. So can i paint them too or did i have to build som mechanics that it make 10 turns? I don't understand this.
Thanks for your help
Tombo
 
Posts: 97
Images: 36
Joined: Fri 22. Feb 2013, 20:52
Location: Germany
Has thanked: 6 times
Been thanked: 8 times

PreviousNext

Return to Controllers and Drivers Projects

Who is online

Users browsing this forum: No registered users and 1 guest