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 Tombo » Mon 8. Jul 2013, 21:36

Hi,
if read a lot in the Forum and bought an Arduino uno. It was flashed with xpid Firmware and completly wired up with one Motor. The Arduino was detected right on the Pc and Xsim. Connection ok i startet with 10% set Output. The motor did not stop and everything crashed and my pc powered off.

Now when i put the Arduiono in the usb port the Leds will light up, but the pc don't recognize the chip. I tried to reset with the small button and all 3 usb ports no change.

Did i need to buy a ney on ore only the chip? Or is there a fix for my problem.
sry for my bad english
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 sirnoname » Mon 8. Jul 2013, 22:38

There are two chips on the arduino, one for USB-> Serial and one is the MCU. If it is not recognized the USB chip was burned or its power supply input is defective. Seems you need a new one.
It sounds like you have connected motor power to arduino.
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 incl.360°option

Postby RufusDufus » Tue 9. Jul 2013, 07:39

Hi, I have recently got my sim to a point where I have basic motion using the X-PID software and all seems to work well - :D

I was trying to tune the PID parameters via the x-sim plugin and was not noticing any significant change. I had a look at the arduino X-PID source and have concluded the commands listed in the header to change the PID parameters are not actually implemented in the code?

Is this correct or am I reading the code wrong - I was expecting to see them handled in the ParseCommand function?

Do they effect the results much anyway... the motion seems pretty good with the default parameters? I could look at adding these commands if they are missing as long as the windows plugin side is working and it will be of benefit?

Thanks for the great software!
RufusDufus
 
Posts: 25
Images: 0
Joined: Fri 26. Apr 2013, 14:39
Location: Australia
Has thanked: 1 time
Been thanked: 1 time

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

Postby sirnoname » Tue 9. Jul 2013, 11:54

The PID values are directly stored to the EEPROM and then you cann call a reread of the whole eeprom.
The GUI will control the values in the EEPROM.
For tuning you have to set the power offset to 0%, else you will not see a difference.
I think the power offset of 20% should be removed to 0% generally because this is a simulator only option. (aggressive, fast control)
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 incl.360°option

Postby Tombo » Tue 9. Jul 2013, 12:18

Hi,
no i didnt connect the Motor directly to the Arduino it's eures ob the H-bridge. when i turn the pots in x- sim the value goes from 0%-100% so i think everything is wired up correctly. where is the mistake that the Motor doesn't stopp.
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 RufusDufus » Tue 9. Jul 2013, 12:48

sirnoname wrote:The PID values are directly stored to the EEPROM and then you cann call a reread of the whole eeprom.
The GUI will control the values in the EEPROM.
For tuning you have to set the power offset to 0%, else you will not see a difference.
I think the power offset of 20% should be removed to 0% generally because this is a simulator only option. (aggressive, fast control)


Thanks for the quick response. That makes more sense *.. I'll give it a try next time I am testing.
RufusDufus
 
Posts: 25
Images: 0
Joined: Fri 26. Apr 2013, 14:39
Location: Australia
Has thanked: 1 time
Been thanked: 1 time

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

Postby timboo » Tue 9. Jul 2013, 23:59

Hi,
I bought two Pololu VNH2SP30 Motor Drivers. I have seen now that these need a 20khz pwm signal. Could someone help me and tell me what I have
to change in the firmware to get a 20khz pwm signal. Im a newbie in avr programming. Any help would be great!

Thanks.

Timboo
timboo
 
Posts: 5
Images: 0
Joined: Fri 21. Jun 2013, 01:35
Location: Switzerland
Has thanked: 1 time
Been thanked: 0 time

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

Postby sirnoname » Wed 10. Jul 2013, 00:13

not possible, only some special pwm frequency is possible
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 incl.360°option

Postby timboo » Wed 10. Jul 2013, 00:35

It's a maximum frequency. Is something below 20 khz possible?
timboo
 
Posts: 5
Images: 0
Joined: Fri 21. Jun 2013, 01:35
Location: Switzerland
Has thanked: 1 time
Been thanked: 0 time

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

Postby sirnoname » Wed 10. Jul 2013, 11:20

If you press the button with the lower frequency, yes.
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

PreviousNext

Return to Controllers and Drivers Projects

Who is online

Users browsing this forum: No registered users and 1 guest

cron