Re: [Emc-users] Another Mesa vhdl question (STMBL summary with added pico-pi?)

2021-01-23 Thread Chris Albertson
On Fri, Jan 22, 2021 at 1:42 PM Ralph Stirling <
ralph.stirl...@wallawalla.edu> wrote:

> I don't think you are going to use an ADS1256 for
> servo feedback.  30khz sounds good, but when you
> look at the datasheet fine print, there are caveats.
> First, the inputs are multiplexed, so cycling the
> multiplexer drops your 30khz data rate to an effective
> 4.3khz rate.  There is also a 0.2msec settling time
> for the digital filter (which would be per channel).
> I'm not sure how much it affects CNC control, but
> I know in robotics applications non-simultaneous
> sampling causes problems.  The sequential multiplexing
> causes each axis to be sampled at a different time.
>

With robots, the way this is fixed is that the ROS "TF" or geometry
transform messages are timestamped.   Then the TF package can interpolate
the transform for any desired time.  So if say you have an arm with 6
joints and each sensor is sampled at different rates it still works.   THis
works because the parts have mass and can't teleport instantly to random
places.  so you can compute the position of the "fingers" even if all the
joints are sampled at random times.   The TF package hides all this

Basically if you know the transfom at any two points in time then you can
estimate the transform at any point in time near those two measured
points.  And again, this is all hidden inside the infrastructure.

I say "transform" because in general even though mostly we use rotation
(angle) only it might be any kind of linear transform.   Yes it is a lot of
real-time math but 16-core Xeon computers are cheap now.

>
> A precision single-turn pot for a linear axis sounds
> like a problem for other reasons.  You would have a
> giant discontinuity every revolution.
>
> Anyway, this ADS1256 on these Chinese cards does
> look very interesting for other, non-realtime applications.
>
> -- Ralph
>
> 
> From: Gene Heskett [ghesk...@shentel.net]
> Sent: Friday, January 22, 2021 12:45 PM
> To: emc-users@lists.sourceforge.net
> Subject: Re: [Emc-users] Another Mesa vhdl question (STMBL summary with
> added pico-pi?)
>
> On Friday 22 January 2021 14:37:56 andy pugh wrote:
>
> > On Fri, 22 Jan 2021 at 18:41, Gene Heskett 
> wrote:
> > > What comparison can be made between the very limited, fixed scale
> > > A-D conversion of a mesa card's 1st 4 inputs on say a 7i76, and the
> > > A/D speed and scaling that $4 pico-pi might be able to do when
> > > running the STMBL code, and how fast could it do it?
> >
> > If you want lots of high resolution A to D, have a look for ADS1256
> > boards on eBay.
>
> That's a sweet price for that much precision, and 30ksps sounds like its
> plenty fast enough to run a servo feedback from precision pots. Good
> thing about the precision being 24 bits, as the max of 3 volts full
> scale says it will need scaled at the inputs to live with 5 volt or
> higher circuits. With an SPI interface, working that out to cohabit with
> a 7i90 looks to be an interesting project. And I just ordered a 4
> channel digital scope so I can see this stuff better. A 2GS input gets
> pricey though.
>
> Thanks Andy.
>
> Cheers, Gene Heskett
> --
> "There are four boxes to be used in defense of liberty:
>  soap, ballot, jury, and ammo. Please use in that order."
> -Ed Howdershelt (Author)
> If we desire respect for the law, we must first make the law respectable.
>  - Louis D. Brandeis
> Genes Web page <
> https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgeneslinuxbox.net%3A6309%2Fgene&data=04%7C01%7Cralph.stirling%40wallawalla.edu%7C7b16a513d0b74475828608d8bf16aa15%7Cd958f048e43142779c8debfb75e7aa64%7C0%7C0%7C637469451362247427%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=DjcpC5qnBuyCYsgQU71FG8kTK7DNym23XrYlK277ItQ%3D&reserved=0
> >
>
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
>
> https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Femc-users&data=04%7C01%7Cralph.stirling%40wallawalla.edu%7C7b16a513d0b74475828608d8bf16aa15%7Cd958f048e43142779c8debfb75e7aa64%7C0%7C0%7C637469451362247427%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=a20RBPKaM0pedhfPRU4R6WsbazAyJpUMdYABIiImbs8%3D&reserved=0
>
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>


-- 

Chris Albertson
Redondo Beach, California

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Another Mesa vhdl question (STMBL summary with added pico-pi?)

2021-01-22 Thread Gene Heskett
On Friday 22 January 2021 16:12:00 andy pugh wrote:

> On Fri, 22 Jan 2021 at 20:47, Gene Heskett  
wrote:
> > thing about the precision being 24 bits, as the max of 3 volts full
> > scale says it will need scaled at the inputs to live with 5 volt or
> > higher circuits.
>
> The boards always seem to have lots of unpopulated pads. I assume that
> these are for voltage dividers, but haven't bothered to check as the
> project that I am using with them is 3.3V throughout.

$DayJob, or your stuff? Since I haven't had a $DayJob in going on 19 
years, I sometimes forget the difference.  My bad in that case.

What I see for us, is a need for a higher voltage, equally efficient 
version of the 7 dollar or less, BTS-7960 boards. Zero heat while 
running a 100watt, 24 volt motor from 24 volts, yet its only rated for 
27 volts max. Run it by a mesa pwmgen in mode 2, and it just works. 
Sweet.

But if the PID is tuned wrong, gets into windup and it overshoots, it 
will attempt to reverse the motor at speed, and that will crowbar a 400 
watt 24 volt switcher.  Shuts itself down for about 3 minutes to cool.

But since the BTS-7960 has a 43 Amp rating, It isn't bothered a bit, even 
by that.

Thanks Andy.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Another Mesa vhdl question (STMBL summary with added pico-pi?)

2021-01-22 Thread Ralph Stirling
I don't think you are going to use an ADS1256 for
servo feedback.  30khz sounds good, but when you
look at the datasheet fine print, there are caveats.
First, the inputs are multiplexed, so cycling the
multiplexer drops your 30khz data rate to an effective
4.3khz rate.  There is also a 0.2msec settling time
for the digital filter (which would be per channel).
I'm not sure how much it affects CNC control, but
I know in robotics applications non-simultaneous
sampling causes problems.  The sequential multiplexing
causes each axis to be sampled at a different time.

A precision single-turn pot for a linear axis sounds
like a problem for other reasons.  You would have a
giant discontinuity every revolution.

Anyway, this ADS1256 on these Chinese cards does
look very interesting for other, non-realtime applications.

-- Ralph


From: Gene Heskett [ghesk...@shentel.net]
Sent: Friday, January 22, 2021 12:45 PM
To: emc-users@lists.sourceforge.net
Subject: Re: [Emc-users] Another Mesa vhdl question (STMBL summary with added 
pico-pi?)

On Friday 22 January 2021 14:37:56 andy pugh wrote:

> On Fri, 22 Jan 2021 at 18:41, Gene Heskett 
wrote:
> > What comparison can be made between the very limited, fixed scale
> > A-D conversion of a mesa card's 1st 4 inputs on say a 7i76, and the
> > A/D speed and scaling that $4 pico-pi might be able to do when
> > running the STMBL code, and how fast could it do it?
>
> If you want lots of high resolution A to D, have a look for ADS1256
> boards on eBay.

That's a sweet price for that much precision, and 30ksps sounds like its
plenty fast enough to run a servo feedback from precision pots. Good
thing about the precision being 24 bits, as the max of 3 volts full
scale says it will need scaled at the inputs to live with 5 volt or
higher circuits. With an SPI interface, working that out to cohabit with
a 7i90 looks to be an interesting project. And I just ordered a 4
channel digital scope so I can see this stuff better. A 2GS input gets
pricey though.

Thanks Andy.

Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 
<https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgeneslinuxbox.net%3A6309%2Fgene&data=04%7C01%7Cralph.stirling%40wallawalla.edu%7C7b16a513d0b74475828608d8bf16aa15%7Cd958f048e43142779c8debfb75e7aa64%7C0%7C0%7C637469451362247427%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=DjcpC5qnBuyCYsgQU71FG8kTK7DNym23XrYlK277ItQ%3D&reserved=0>


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Femc-users&data=04%7C01%7Cralph.stirling%40wallawalla.edu%7C7b16a513d0b74475828608d8bf16aa15%7Cd958f048e43142779c8debfb75e7aa64%7C0%7C0%7C637469451362247427%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=a20RBPKaM0pedhfPRU4R6WsbazAyJpUMdYABIiImbs8%3D&reserved=0


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Another Mesa vhdl question (STMBL summary with added pico-pi?)

2021-01-22 Thread andy pugh
On Fri, 22 Jan 2021 at 20:47, Gene Heskett  wrote:

> thing about the precision being 24 bits, as the max of 3 volts full
> scale says it will need scaled at the inputs to live with 5 volt or
> higher circuits.

The boards always seem to have lots of unpopulated pads. I assume that
these are for voltage dividers, but haven't bothered to check as the
project that I am using with them is 3.3V throughout.

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Another Mesa vhdl question (STMBL summary with added pico-pi?)

2021-01-22 Thread Gene Heskett
On Friday 22 January 2021 14:37:56 andy pugh wrote:

> On Fri, 22 Jan 2021 at 18:41, Gene Heskett  
wrote:
> > What comparison can be made between the very limited, fixed scale
> > A-D conversion of a mesa card's 1st 4 inputs on say a 7i76, and the
> > A/D speed and scaling that $4 pico-pi might be able to do when
> > running the STMBL code, and how fast could it do it?
>
> If you want lots of high resolution A to D, have a look for ADS1256
> boards on eBay.

That's a sweet price for that much precision, and 30ksps sounds like its 
plenty fast enough to run a servo feedback from precision pots. Good 
thing about the precision being 24 bits, as the max of 3 volts full 
scale says it will need scaled at the inputs to live with 5 volt or 
higher circuits. With an SPI interface, working that out to cohabit with 
a 7i90 looks to be an interesting project. And I just ordered a 4 
channel digital scope so I can see this stuff better. A 2GS input gets 
pricey though.

Thanks Andy.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Another Mesa vhdl question (STMBL summary with added pico-pi?)

2021-01-22 Thread Gene Heskett
On Friday 22 January 2021 14:10:22 Ralph Stirling wrote:

> I really don't know yet how much work it would be to
> port STMBL to the Pico.  A stock STMBL drive, with
> an STM32F405VG processor has four analog inputs
> (as far as I can tell).  Those are 12bit, and can be scaled
> in stmbl's local hal.  I haven't investigated the sampling
> rate for those conversions.  The STM32F4xx processors
> have a lot more analog inputs available, but teasing out
> which ones don't conflict with needed digital i/o, and how
> to route them inside the stmbl code is more than I've done.
> The Pico pinout seems to indicate only 3 analog inputs.

Thanks Ralph, but all my mills are 4 axis. And the pico is probably too 
slow for that to be used as servo feedback anyway.  So do carry on.  Its 
an interesting discussion for sure.

> -- Ralph
> 
> From: Gene Heskett [ghesk...@shentel.net]
> Sent: Friday, January 22, 2021 10:38 AM
> To: emc-users@lists.sourceforge.net
> Subject: Re: [Emc-users] Another Mesa vhdl question (STMBL summary
> with added pico-pi?)
>
>
> What comparison can be made between the very limited, fixed scale A-D
> conversion of a mesa card's 1st 4 inputs on say a 7i76, and the A/D
> speed and scaling that $4 pico-pi might be able to do when running the
> STMBL code, and how fast could it do it?
>
> Having those figures at hand would determine just how usefull the
> pico-pi might be.
>
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/gene>


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Another Mesa vhdl question (STMBL summary with added pico-pi?)

2021-01-22 Thread andy pugh
On Fri, 22 Jan 2021 at 18:41, Gene Heskett  wrote:

> What comparison can be made between the very limited, fixed scale A-D
> conversion of a mesa card's 1st 4 inputs on say a 7i76, and the A/D
> speed and scaling that $4 pico-pi might be able to do when running the
> STMBL code, and how fast could it do it?

If you want lots of high resolution A to D, have a look for ADS1256
boards on eBay.

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Another Mesa vhdl question (STMBL summary with added pico-pi?)

2021-01-22 Thread Ralph Stirling
I really don't know yet how much work it would be to
port STMBL to the Pico.  A stock STMBL drive, with
an STM32F405VG processor has four analog inputs
(as far as I can tell).  Those are 12bit, and can be scaled
in stmbl's local hal.  I haven't investigated the sampling
rate for those conversions.  The STM32F4xx processors
have a lot more analog inputs available, but teasing out
which ones don't conflict with needed digital i/o, and how
to route them inside the stmbl code is more than I've done.
The Pico pinout seems to indicate only 3 analog inputs.

-- Ralph

From: Gene Heskett [ghesk...@shentel.net]
Sent: Friday, January 22, 2021 10:38 AM
To: emc-users@lists.sourceforge.net
Subject: Re: [Emc-users] Another Mesa vhdl question (STMBL summary with added 
pico-pi?)


What comparison can be made between the very limited, fixed scale A-D
conversion of a mesa card's 1st 4 inputs on say a 7i76, and the A/D
speed and scaling that $4 pico-pi might be able to do when running the
STMBL code, and how fast could it do it?

Having those figures at hand would determine just how usefull the pico-pi
might be.


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Another Mesa vhdl question (STMBL summary with added pico-pi?)

2021-01-22 Thread Gene Heskett
On Friday 22 January 2021 12:24:14 Ralph Stirling wrote:

> I finally succeeded in getting the STMBL code on a STM32F407
> Discovery eval board talking to a Mesa 7I90 via sserial.  The
> final issue was assuming the wrong pin for sserial tx on the F407.
>
> Here is my final summary of everything necessary to replicate
> what I did, for anybody else trying this.
>
> Steps on F407 end:
> 1. Compile STMBL code following their docs.
> 2. Plug in F407 Discovery st-link usb cable.
> 3. Copy obj_boot/blboot.bin to the F407 st-link drive
> 4. Plug in F407 Discovery otg usb cable (micro-b)
> 5. Run "make all_btburn", which should give flashing progress
> 6. Connect F407 ground to 7I90 ground
> 7. Connect F407 PA0 pin to sserial rx pin on 7I90
> 8. Connect F407 PA10 pin to sserial tx pin on 7I90
> 9. Run STMBL servoterm and connect
> 10. Edit config to have these lines:
>load sserial
>sserial0.rt_prio = 2.0
>sserial0.frt_prio = 2.0
> 11. Save config and type "reset"
> 12. On linuxcnc computer, run "halcmd -I"
> 13. Type:
> loadrt hostmot2
> loadrt hm2_x config=" sserial_port_0=0XXX"
>
> I believe this will work with a variety of STM32F4xx chips and
> boards.  It looks like the stock stmbl code is about 303K in size,
> so a 512K flash cpu is probably the minimum.  The stats given
> by servoterm seem to indicate that cpu usage is low, though,
> so a slower clock may be OK.  I wonder if it would run on the
> new RPi Pico with modest modifications?

What comparison can be made between the very limited, fixed scale A-D 
conversion of a mesa card's 1st 4 inputs on say a 7i76, and the A/D 
speed and scaling that $4 pico-pi might be able to do when running the 
STMBL code, and how fast could it do it?

Having those figures at hand would determine just how usefull the pico-pi 
might be. 

> Thanks for the help and suggestions from Andy and Peter.
> -- Ralph
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Another Mesa vhdl question (STMBL summary)

2021-01-22 Thread Ralph Stirling
I finally succeeded in getting the STMBL code on a STM32F407
Discovery eval board talking to a Mesa 7I90 via sserial.  The
final issue was assuming the wrong pin for sserial tx on the F407.

Here is my final summary of everything necessary to replicate
what I did, for anybody else trying this.

Steps on F407 end:
1. Compile STMBL code following their docs.
2. Plug in F407 Discovery st-link usb cable.
3. Copy obj_boot/blboot.bin to the F407 st-link drive
4. Plug in F407 Discovery otg usb cable (micro-b)
5. Run "make all_btburn", which should give flashing progress
6. Connect F407 ground to 7I90 ground
7. Connect F407 PA0 pin to sserial rx pin on 7I90
8. Connect F407 PA10 pin to sserial tx pin on 7I90
9. Run STMBL servoterm and connect
10. Edit config to have these lines:
   load sserial
   sserial0.rt_prio = 2.0
   sserial0.frt_prio = 2.0
11. Save config and type "reset"
12. On linuxcnc computer, run "halcmd -I"
13. Type:
loadrt hostmot2
loadrt hm2_x config=" sserial_port_0=0XXX"

I believe this will work with a variety of STM32F4xx chips and
boards.  It looks like the stock stmbl code is about 303K in size,
so a 512K flash cpu is probably the minimum.  The stats given
by servoterm seem to indicate that cpu usage is low, though,
so a slower clock may be OK.  I wonder if it would run on the
new RPi Pico with modest modifications?

Thanks for the help and suggestions from Andy and Peter.
-- Ralph

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users