Pololu JRK 12v12 / 21v3 High Resolution Plugin

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.

Pololu JRK 12v12 / 21v3 High Resolution Plugin

Postby sirnoname » Wed 26. Dec 2012, 23:28




Hello together,

I did noticed that the usage of the Pololu JRK 12v12 and 21v3 interfaces, with the help of the USO, is not correct. This means there are two points that are not fitting, the first one is the devider by 2 of the 32bit output value and the second one is the half output of the whole value by not changing the $DD (221) first value which includes the lowest resolution values of the 32bit output value.
The JRK can handle 0 to 4095 (=12bit) position datas, the current USO values are limited to 0 to 127 (=7bit).
This means a very low resolution of about 128:4096 = 1/32 of the positions that a pololu can reach.
If you think 127 positions are much then remember: it is for totally left to totally right what leads to 64 position for one direction.
Of course, the USO is a first step solution and it is a little bit difficult to setup the complex pololu serial output with USO.

I have written a first version of an pololu plugin for the interface section. Only the interface section is the PnP way of X-Sim. There the boards will be automatically detected and disconnects are handled with a security stop of the whole simulator.
JRK 12v12 and 21v3 are the same board and are combined in this plugin.

Download:
PololuJRKV3.zip
(793.13 KiB) Downloaded 1313 times


After you have extracted the plugin into the x-sim sub-directory "/Interfacesplugins" you have to remove your old pololu USO setup and have a look into the interface section.



If you double click the pololujrk Entry on the right side you will get the rename dialog.

With this dialog you can rename your difficult "JRK on Comport name" to a actuator name. To make it easy for other members you should choose the names out of the drop down box. To enable the rename function you have to set the checkbox, enter or select with the dropdown a name and press the set button. With the pololu button you open the original pololu tool which can run at the same time as x-sim do. But remember: the polling of the tool will slowdown your jrk while the pololu plugin is open.

Setup the direct output:

Enter for each axis a fitting actuator in the synaptrix output like for the SCN5 actuators.

For the repeat speed of your new values you have to setup the artificial break in the program setup of the synaptrix like this:

The math thread can run faster with 1ms artificial break to insure a nearly realtime result that is sended to the output.
The PID period count of the JRK's is about 100 calculations per second (look into the Pololu tool) and it seems to be independend to the serial output speed. This means synaptrix delay values below a artificial break of 10ms (=100 times a second) is not helpfully. Compared to a AMC the pololu is very slow in changing the new target. This means not as good for vibration simulation than the AMC.
You have to setup the PID count in your JRK's Configuration Tool fitting to your send speed. A artificial break of the synaptrix (Program setup) with 10ms means you need at least a PID count (display:JRK tool upper middle area, setup: in the Jrk Software under the PID tab) that increases 100 PID cycles a second because you will send all 10ms a new value which are 100 values per second for the JRK PID calculator. A artificial time of 5ms leads to double the PID count to 200 pid calculations per second.
The Center option will insure a middle position on any simulator stop (i.e. Start-Stop Button).

You will get with this plugin a high resolution output of 0 to 4095.
The type of PnP setup is like for the SCN5 actuators. If your feedback pot does jitter you will also have a problem to reach the new high resolution. You can watch the pot feedback jitter in the pololu tool, it must be nearly static. To reach this you need to have short pot cables and for the best solution the pololu directly near the pot. Then the 5V of USB must be jitterfree. To reach this you have to insure the mass contact of your motor is not the same as for the GND line of USB and a HUB with a additional powersupply will avoid 5V spikes with his own power supply.

Please test this plugin so we can include this into the next release.
We need also importand a video tutorial.

Best regards,
SirNoName
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: Pololu JRK High Resolution Plugin

Postby motiondave » Wed 26. Dec 2012, 23:43

Thanks for that. I will give it a whirl.!
User avatar
motiondave
 
Posts: 997
Images: 1
Joined: Tue 20. Mar 2012, 16:36
Location: Sydney Australia
Has thanked: 11 times
Been thanked: 13 times

Re: Pololu JRK 12v12 / 21v3 High Resolution Plugin

Postby prodigy » Thu 27. Dec 2012, 00:28

Wow, this is great news!
User avatar
prodigy
X-Sim Supporter
 
Posts: 274
Images: 42
Joined: Tue 16. Oct 2012, 12:32
Location: Pula, Croatia
Has thanked: 20 times
Been thanked: 22 times

Re: Pololu JRK 12v12 / 21v3 High Resolution Plugin

Postby sirnoname » Thu 27. Dec 2012, 13:49

one note i disagree that the jrks are slow in changing target I run mine at 5ms and boy i can feel a hell of alot more in the seat.

Please open the Pololu JRK Configuration Tool. On the top you will find a PID counter. Each time there is one increasing number you have a new PID motor control like direction and power to reach the target. If you compare the increasing numbers you find out that all seconds the hundret place is increasing by one. This means the controller do 100 motor controls in a second like changing the direction. If you push all 1ms new datas over the serial port this will work but it will be only stored into the buffer and this value will wait for the PID.
How did you increase the speed of this counter?
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: Pololu JRK 12v12 / 21v3 High Resolution Plugin

Postby motiondave » Thu 27. Dec 2012, 14:06

BobBuilt wrote:Like to confim all working nicely, to me alot harder to setup but I poineered the known method first, with rc commands then converted it directy with the help of uso, Only tested with test plugin and once i set my jrks down to 5ms timings as well as the synaptrix thread down to 5ms it achieve the same smoothness as it originally worked at but im using a slightly flat 12v 8amp battry to test with, christmas suck all me sim building funds, hence development of my new joyrider been a little slow, nearly a no go.
Can do a simply vid setup but Dave will proberly beat me to that.



Ill get to the video eventually...dont wait too long for me....like Bob, its Christmas and school holidays, so 90% of my time is taken up with kids.
User avatar
motiondave
 
Posts: 997
Images: 1
Joined: Tue 20. Mar 2012, 16:36
Location: Sydney Australia
Has thanked: 11 times
Been thanked: 13 times

Re: Pololu JRK 12v12 / 21v3 High Resolution Plugin

Postby sirnoname » Thu 27. Dec 2012, 19:40

We really need a tut of you! Best as video tut.
I saw most of the PID setup do eliminate vibrations. Ok, good if you have a powerless motor but if you have floris setup this PID must be more agressive for more vibrations.

This can be achieved by changing the PID period (ms) in the Jrk Software under the PID tab

This changes my statements, I am not firm enough.
I change this in the text above.
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: Pololu JRK 12v12 / 21v3 High Resolution Plugin

Postby motiondave » Fri 28. Dec 2012, 00:20

I am not sure why most people set PID in utility or the old test tablet. I found it very twitchy and i got better PID results by using a "default setting" and then running some games and setting PID from there.
Wiper, 2/2 0/3 1/1
Big worm gear 4/4 0/3 4/4
winches ( when I ran them ) 3/3 0/3 3/3.
Actuators 3/3 0/3 4/4.
Power settings varied, but more or less around 250-350.
The utility slider and the old test tablet I thought, was to simply make sure the motors worked through jrk and x-sim, they were twitchy as a bastard, and caused errors, but in game it was a completely different story, a lot smoother and easier to sort.
I did this with wipers, big worm gears, half a winch motor, and the actuators.

But, thats just me ;)
User avatar
motiondave
 
Posts: 997
Images: 1
Joined: Tue 20. Mar 2012, 16:36
Location: Sydney Australia
Has thanked: 11 times
Been thanked: 13 times

Re: Pololu JRK 12v12 / 21v3 High Resolution Plugin

Postby motiondave » Fri 28. Dec 2012, 11:25

ok, now I am confused, I followed every step 3 times, but when I hit start on extractor and convertor, I get an error, saying "interface dll was not loaded"
What have I missd?
User avatar
motiondave
 
Posts: 997
Images: 1
Joined: Tue 20. Mar 2012, 16:36
Location: Sydney Australia
Has thanked: 11 times
Been thanked: 13 times

Re: Pololu JRK 12v12 / 21v3 High Resolution Plugin

Postby motiondave » Fri 28. Dec 2012, 12:14

motiondave wrote:ok, now I am confused, I followed every step 3 times, but when I hit start on extractor and convertor, I get an error, saying "interface dll was not loaded"
What have I missd?


Never mind, thanks to bob, I got them working, but the motors still sit in middle position even after x-sm programs are closed down.
The motors do not turn off and they have to be manually stopped in jrk utility.
are you still sending the 255 command at end to set jrk into standby mode so the motor driver turns off and doesn't get hot.
User avatar
motiondave
 
Posts: 997
Images: 1
Joined: Tue 20. Mar 2012, 16:36
Location: Sydney Australia
Has thanked: 11 times
Been thanked: 13 times

Re: Pololu JRK 12v12 / 21v3 High Resolution Plugin

Postby sirnoname » Fri 28. Dec 2012, 14:43

Nice found.
I will implement:
a.) shutdown with 255 at program shutdown
b.) configurable timeout in the dialog, i.e. you can input 30 seconds with no new input leads to a shutdown
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

Next

Return to Controllers and Drivers Projects

Who is online

Users browsing this forum: No registered users and 1 guest