Re: [Emc-users] STM32 Blue Pill

2019-03-08 Thread Chris Albertson
The easy way to program a "Blue Pill" is with the Arduino IDE.  Arduino is
VERY well documented but
for more complex work mBed is just as well documented is not so limiting as
Arduino.

The little $3 board can completely replace an Arduino.  Most pins are 5
volt So it plays
well with ether 5V or 3.3v parts.   Except for the names of the pins the
"blue pill"
can run Arduino code.  But it is about 20x faster with about 20x more
memory at 1/4 the price.

The way you program this is to just connect them to the USB port like an
Arduino.   But the key is
you need to first load a boot loader into the chip.

A step up from using the Arduino IDE is to use ARM's "mbed".  This is a
system for programming the full range
of STM32 chips and is pretty easy.  It includes an RTOS that makes like
easy. and gives you multitasking,
queues and drivers and Arduino-like ease of use.

There are two ways to program in the mbed environment.  (1) use the online
compiler.  This is simple because there is nothing to install on the local
PC. and the environment is very Arduino-like with one-click access to
example code and documentation. and the second way is to compile on the
local PC.  You can use a command line to do that or set up Eclipse.

mBed devices are easy to program.  When you plug them into a USB port they
appear to be a thumb drive.  You simply drag the binary executable file to
the device and it gets copied into the chip's flash ROM.   This works the
same way in Windows, Mac or Linux.

mbed is open source and is backed by Arm Holdings, the owner of the ARM
architecture.  It is their OS for STM32.

There are other MUCH more powerfull STM32 boards that are all source code
compatible.  I have one that is 200 MHz with hardware floating point.
 The chips (even the low-end "blue pill" can generate pulses in hardware
with no CPU overhead and they can read quadrature also in hardware.  The $3
chip can track an A/B encoder at about 5 MHz.with no CPU usage.

I have one running now on my desk that is bussy running some sonars and an
array of switches and turning the data into a serial stream.

I have another that is a PID loop to control a pair of motors. It presents
a serial command interface to the next level up controller.

These are so cheap and easy to use that I use them just to save wire.  Run
all the switch leads into a "blue pill" then just have I2C or SPI


For simple stuff look at using Aruduino IDE with these for more
sophiticated work look at using mBed.
https://www.mbed.com/en/platform/mbed-os/

I would NOT bother trying to program these  from "bare metal".  You will
spend all yurtime readinf the STM32F103 documents.Thenif ever
tou chagechips yu need to re-read the book.   the mbed os (and arduino)
 interpose alaer that standardizes the hardware across the entire STM32
line.

HINT:   While the "blue pill" is cheap and more than you need for many
uses, for only about $13 tyu can buy a "STM32F446 Nucleo" which is an order
of magnitude more capable and importently the Nucleor comes with a
programmer/hardware debugger that can beuse with Blue Pill type boards.
This programmer presents the "drang and drop" programming interface.

Yes this is applicable to machine tools.  put o on a moter and now you have
amoter that accepts serial commands


On Fri, Mar 8, 2019 at 9:48 PM Kirk Wallace 
wrote:

> I have used AVR chips to add features to LinuxCNC that where not easy to
> do with a parallel port alone. Now I would like to take a try at using
> one of these Blue Pills:
> > https://www.ebay.com/itm/222676944274
>
> So far I have used this link:
> >
> https://github.com/rogerclarkmelbourne/Arduino_STM32/wiki/Programming-an-STM32F103XXX-with-a-generic-%22ST-Link-V2%22-programmer-from-Linux
>
> to get OpenOCD installed, configured and running. I am able to telnet to
> port  and play with some of the commands. Next, it seems that I need
> to come up with a way to develop and compile C files to flash to the
> STM32, but a lot of the STM32 information on the Web is old or conflicts
> with different methods from various sources. If someone here has a
> simple development system, I would appreciate any links or hints.
>
> Thank you.
>
> --
> Kirk Wallace
> http://www.wallacecompany.com/machine_shop/
> http://www.wallacecompany.com/E45/
>
>
> ___
> 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] STM32 Blue Pill

2019-03-08 Thread Kirk Wallace

I wish I had found this earlier:

https://www.youtube.com/watch?v=K-jYSysmw9w


This seems to be the shortest path to getting a blink program working. 
The steps in this video seem to work so far. I just need to dig up a USB 
to serial adapter from my breadboarding stash rather than use the 
ST-Link adapter.


On 3/8/19 9:46 PM, Kirk Wallace wrote:
I have used AVR chips to add features to LinuxCNC that where not easy to 
do with a parallel port alone. Now I would like to take a try at using 
one of these Blue Pills:

https://www.ebay.com/itm/222676944274


So far I have used this link:
https://github.com/rogerclarkmelbourne/Arduino_STM32/wiki/Programming-an-STM32F103XXX-with-a-generic-%22ST-Link-V2%22-programmer-from-Linux 



to get OpenOCD installed, configured and running. I am able to telnet to 
port  and play with some of the commands. Next, it seems that I need 
to come up with a way to develop and compile C files to flash to the 
STM32, but a lot of the STM32 information on the Web is old or conflicts 
with different methods from various sources. If someone here has a 
simple development system, I would appreciate any links or hints.


Thank you.




--
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/


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


[Emc-users] Air line for Gene

2019-03-08 Thread Greg Bentzinger via Emc-users
I hope the link will survive the paste.
https://www.automationdirect.com/adc/shopping/catalog/pneumatic_components/flexible_pneumatic_tubing_-a-_hoses/straight_polyurethane_(pur)_tubing/8_mm_(5-z-16_inch)

  
|  
|   |  
8 mm (5/16 inch) | Pneumatic Components | Products | AutomationDirect
 8 mm (5/16 inch) from AutomationDirect, the best value in industrial 
automation - low prices, fast shipping, and...  |  |

  |

 

What you need is likely 8mm OD Polyurethane pneumatic rated tubing.
Hope this helps
Greg/

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


[Emc-users] STM32 Blue Pill

2019-03-08 Thread Kirk Wallace
I have used AVR chips to add features to LinuxCNC that where not easy to 
do with a parallel port alone. Now I would like to take a try at using 
one of these Blue Pills:

https://www.ebay.com/itm/222676944274


So far I have used this link:

https://github.com/rogerclarkmelbourne/Arduino_STM32/wiki/Programming-an-STM32F103XXX-with-a-generic-%22ST-Link-V2%22-programmer-from-Linux


to get OpenOCD installed, configured and running. I am able to telnet to 
port  and play with some of the commands. Next, it seems that I need 
to come up with a way to develop and compile C files to flash to the 
STM32, but a lot of the STM32 information on the Web is old or conflicts 
with different methods from various sources. If someone here has a 
simple development system, I would appreciate any links or hints.


Thank you.

--
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/


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


Re: [Emc-users] new thread on cnc probes

2019-03-08 Thread Gene Heskett
On Friday 08 March 2019 20:53:48 jrmitchellj wrote:

> Maybe you need a stronger spring in the unit.

Not that much vibration. Almost has to be noise pickup in the cable. I'll 
find it tomorrow.  Thats the first high impedance input hooked up, and 
that always shows up poor grounding. It possible the cable shield isn't 
grounded, and when I cut it, I made it long enough to string it thru the 
cable chain, which it is not ATM.
>
> --J. Ray Mitchell Jr.
> jrmitche...@gmail.com
>
>
> "No problem can be solved from the same level of consciousness that
> created it"Albert Einstein
>
> On Fri, Mar 8, 2019 at 5:35 PM Gene Heskett  
wrote:
> > Got it together, and adjusted for a usable runout. Got a spoil board
> > + about 5/8" of usable clearance now.  Thats about an inch of
> > working room I didn't have when it came out of the box.
> >
> > But my wireing is to the pin 15 of the sainsmart bob on p2 of the
> > 5i25, hm2_5i25.0.gpio.033.in_not, figured that was faster than
> > getting a field io in over sseriel from the 7i76D.
> >
> > And it appears I'm going to need to check my grounding, the probe is
> > tripping when its away from any contact while moving rapidly.  Only
> > noise can do that.  But my knee and back are about done again. I am
> > only moderately sure I grounded the shielding of that cable so thats
> > about the first thing I check tomorrow.
> >
> > Progress? Maybe.
> >
> > What to you folks think of the Wild Horse probe? The reviews I've
> > read are pretty glowing for the money, but I'd like to hear from
> > other users of it...
> >
> > 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)
> > Genes Web page 
> >
> >
> >
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
>
> ___
> 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)
Genes Web page 



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


Re: [Emc-users] new thread on cnc probes

2019-03-08 Thread jrmitchellj
Maybe you need a stronger spring in the unit.

--J. Ray Mitchell Jr.
jrmitche...@gmail.com


"No problem can be solved from the same level of consciousness that created
it"Albert Einstein


On Fri, Mar 8, 2019 at 5:35 PM Gene Heskett  wrote:

> Got it together, and adjusted for a usable runout. Got a spoil board +
> about 5/8" of usable clearance now.  Thats about an inch of working room
> I didn't have when it came out of the box.
>
> But my wireing is to the pin 15 of the sainsmart bob on p2 of the 5i25,
> hm2_5i25.0.gpio.033.in_not, figured that was faster than getting a field
> io in over sseriel from the 7i76D.
>
> And it appears I'm going to need to check my grounding, the probe is
> tripping when its away from any contact while moving rapidly.  Only
> noise can do that.  But my knee and back are about done again. I am only
> moderately sure I grounded the shielding of that cable so thats about
> the first thing I check tomorrow.
>
> Progress? Maybe.
>
> What to you folks think of the Wild Horse probe? The reviews I've read
> are pretty glowing for the money, but I'd like to hear from other users
> of it...
>
> 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)
> Genes Web page 
>
>
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>

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


[Emc-users] new thread on cnc probes

2019-03-08 Thread Gene Heskett
Got it together, and adjusted for a usable runout. Got a spoil board + 
about 5/8" of usable clearance now.  Thats about an inch of working room 
I didn't have when it came out of the box.

But my wireing is to the pin 15 of the sainsmart bob on p2 of the 5i25, 
hm2_5i25.0.gpio.033.in_not, figured that was faster than getting a field 
io in over sseriel from the 7i76D.

And it appears I'm going to need to check my grounding, the probe is 
tripping when its away from any contact while moving rapidly.  Only 
noise can do that.  But my knee and back are about done again. I am only 
moderately sure I grounded the shielding of that cable so thats about 
the first thing I check tomorrow.

Progress? Maybe.

What to you folks think of the Wild Horse probe? The reviews I've read 
are pretty glowing for the money, but I'd like to hear from other users 
of it...

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)
Genes Web page 



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


Re: [Emc-users] I hate to admit it, but I found the problem with the rpi v sheldon.

2019-03-08 Thread Gene Heskett
On Friday 08 March 2019 11:29:09 Jon Elson wrote:

> On 03/07/2019 10:13 PM, Gene Heskett wrote:
> > Embarrassing is what it is...
>
> Well, I've made some seriously embarrassing mistakes too!
> Some of them even involved a little bit of blood being spilled.
>
> Jon
>
I've paid my dues in blood too.  don't think you get to retirement age 
without some of that... :{>
>
> ___
> 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)
Genes Web page 



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


Re: [Emc-users] I hate to admit it, but I found the problem with the rpi v sheldon.

2019-03-08 Thread Jon Elson

On 03/07/2019 10:13 PM, Gene Heskett wrote:

Embarrassing is what it is...

Well, I've made some seriously embarrassing mistakes too!  
Some of them even involved a little bit of blood being spilled.


Jon


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