Re: missed keystrokes problem, back with a vengeance.

2017-01-30 Thread Christopher Barry
On Sun, 29 Jan 2017 12:47:34 -0500
Gene Heskett  wrote:

>On Sunday 29 January 2017 11:58:57 Paul Wise wrote:
>
>> On Sun, Jan 29, 2017 at 9:47 PM, Gene Heskett wrote:  
>> > However, I have now had 5 different keyboards plugged into it, some
>> > wired, some wireless, and none of them can give me a dependable
>> > response to a key, and the error seems much worse for the key-up
>> > event.  
>>
>> Check the different layers of the problem:
>>
>> CPU: login via SSH and make sure things are running.  
>
>My home network is isolated from the internet by NAT-ing thru a dd-wrt 
>router, so all my addresses are 192.168.xx.yy, and this machine has an 
>ssh -Y pi@raspi link up at all times unless I haven't restarted it
>since the last pi reboot. Over that link, the echo's are noticeably
>faster, and the typo's are all mine.
>
>> USB protocol: use wireshark to see if the keyboard event packets are
>> reaching the device.  
>
>I'll have to install these tools.  And I'll report what I find.  I was 
>not aware that wireshark could tap into a usb circuit.
>
>> Linux input layer: use input-events from input-utils to monitor
>> events
>>
>> evdev Linux layer: use libevdev-tools or evemu-tools to monitor
>> events
>>
>> libinput Wayland/Xorg layer: use libinput-debug-events from
>> libinput-tools to monitor events
>>
>> Xorg layer: use xev to monitor events  
>
>I'll print this and see if I can do some troubleshooting (and report
>what I find)while makeing a second clamp ring to fit the rear hub of
>the chuck's backer, as insurance against unscrewing the chuck by a 
>potentially violent reversal of the spindle. This chuck and backer are 
>screwed onto the spindle nose as 70 years ago, lathes weren't expected 
>to run backwards, so no provision to pin it, hence drawbolt closed 
>clamps. 2, bolted together, to join the spindles thrust flange to the 
>hub extension. That should hold at least to the rhapsody. :)
>
>This is quite thourough, thank you.
>
>Cheers, Gene Heskett

What your doing here has serious legs Gene! I mean it. It's a goldmine.
80 and kickin ass! I can only hope... 

So, take a page from Frank here[1], and make your thing happen too. Nice
cashflow augmentation, /and/ a great way to pass on your wisdom. Setup
automatic video[2] to capture what you're doing.

I for one will definitely come watch it!

[1] https://www.youtube.com/user/urbanTrash?feature=mhee
[2] https://www.youtube.com/watch?v=fHWJTVCOhBs


Cheers,
-C
(an infant graybeard by your standards)


pgpiv2BjVl4uc.pgp
Description: OpenPGP digital signature


Re: missed keystrokes problem, back with a vengeance.

2017-01-30 Thread Alan Corey
> Biscuit tin or similar would do, ocuple of large ferrite cores and wind the
> usb cables toroidally?
>

I was thinking that as someone with a lathe he must know some metal
dealers around.  I found a nice 2x4 foot piece of 1/8" aluminum at my
local dump.  Can't bring myself to cut into it.  But we have this
place about half an hour away, it's probably where it came from :
http://www.thesteelshed.com/products.html  Such places are fairly
common I think, one servicing each geographical area as determined by
competition.  Or McMaster-Carr as a last resort and shipped
https://www.mcmaster.com/

One question I've had  for years about using big toroids for
suppression is this: If you've got a cord that you don't want to take
the connector off to fit through the toroid, does it do the same
amount of good to just double a few feet of it back on itself and feed
 that through the toroid?  Or do the magnetic fields oppose each other
because the currents are flowing in opposite directions?

http://www.surpluscenter.com might have something in toroids but I
don't see anything quickly.  Herbach and Rademan?  Electronics
Goldmine?  Very marketable item because it's a quick fix.  Go to a
good ham flea market.

Yeah, I've only been at it for 48 years.  Worked 20 years as an
electronics technician then shifted to computers.
http://devio.us/~ab1jx/bio.html and
http://devio.us/~ab1jx/files/resume.pdf  I've looked at your website,
mine's at http://ab1jx.1apps.com/



Re: missed keystrokes problem, back with a vengeance.

2017-01-30 Thread Gene Heskett
On Monday 30 January 2017 10:52:39 Alan Corey wrote:

> There's electrostatic shielding and electromagnetic shielding, I'm not
> sure which is which type.  A radio signal has both components, the
> electrostatic doesn't carry far.  A shielded loop antenna is mostly
> electrostaticly shielded and made from shielded wire (coax) wire but a
> good receiving antenna in noisy environments like a city.
>
> Where you've got those individual wires going to terminal strips try
> braiding as much as you can of them, because that makes them into
> twisted pairs.  Especially for the wires in differential pairs an
> induced noise spike will cause currents in opposite directions that
> cancel each other.

Chuckle.  Alan, you are typing to a electronics tech, with 68 years 
experience, and a broadcast engineer with 53 years experience. :) 

And I am gradually getting this thing wrapped in suitable noise 
cancelation means. I'll get there, and I may yet ask more questions.

But I'll freely admit this is the worst case I have ever dealt with.

I came home today with enough stuff from the electrical aisle to put the 
vfd in well isolated filtering on both sides of it, metallic conduit all 
the way to the motor, and brick wall filtering in series with the line 
power.  And it will all be done before power is re-applied. 7i90's are 
59 USD each.

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 



Re: missed keystrokes problem, back with a vengeance.

2017-01-30 Thread Andrew M.A. Cater
On Sun, Jan 29, 2017 at 05:59:17PM -0500, Gene Heskett wrote:
> On Sunday 29 January 2017 13:56:53 Tzafrir Cohen wrote:
> 
> > On Sun, Jan 29, 2017 at 12:47:34PM -0500, Gene Heskett wrote:
> > > On Sunday 29 January 2017 11:58:57 Paul Wise wrote:
> > > > USB protocol: use wireshark to see if the keyboard event packets
> > > > are reaching the device.
> > >
> > > I'll have to install these tools.  And I'll report what I find.  I
> > > was not aware that wireshark could tap into a usb circuit.
> >
> > See https://www.kernel.org/doc/Documentation/usb/usbmon.txt on
> > instructions for checking it manually without wireshark. It would do
> > for a go/no-go test.
> 
> But I forgot to say Thank you.
> 
> Thank You.
> 
> 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 

Biscuit tin or similar would do, ocuple of large ferrite cores and wind the
usb cables toroidally?

You got a couple of amateurs around you anywhere - put in a group order 
of decent suppression toroid cores?

Fair-Rite 5977002701 - available from Mouser as p/n 623-5977002701 come
recommended for the KiwiSDR radio - itself based on a Beaglebone.

HTH,

Andy C



Re: missed keystrokes problem, back with a vengeance.

2017-01-30 Thread Alan Corey
There's electrostatic shielding and electromagnetic shielding, I'm not
sure which is which type.  A radio signal has both components, the
electrostatic doesn't carry far.  A shielded loop antenna is mostly
electrostaticly shielded and made from shielded wire (coax) wire but a
good receiving antenna in noisy environments like a city.

Where you've got those individual wires going to terminal strips try
braiding as much as you can of them, because that makes them into
twisted pairs.  Especially for the wires in differential pairs an
induced noise spike will cause currents in opposite directions that
cancel each other.



Re: missed keystrokes problem, back with a vengeance.

2017-01-30 Thread Gene Heskett
On Monday 30 January 2017 09:48:10 Lennart Sorensen wrote:

> On Sun, Jan 29, 2017 at 01:48:50PM -0500, Gene Heskett wrote:
> > Alan, ALL of the motor drivers are switchmode, with the current
> > regulation running at or above 20 KHz. And these noise spikes are
> > ringing at nominally 100 MHz. I have managed to get the xy motor
> > noise under control by takeing out the switchmode psu's, and putting
> > in tordoid transformers, bridge rectifiers, and the biggest
> > electrolytic I had in the drawers that had sufficient withstand
> > voltage.  Its a star ground system, and the output cables to the
> > motors are shielded, and the shield grounded as it goes by this
> > single bolt ground on its way out of the box. The shielding extends
> > both ways from that point but is not connected either at the motor,
> > or at the driver, just at the bolt.  This is std in such noisy
> > machinery.
>
> Well the USB would probably be at either 12MHz (USB 1.x) or 480MHz
> (for USB 2), but most likely USB1 for your keyboard.  That certainly
> is a potential place to hit with noise if you are getting spikes into
> the 100MHz range.  And USB cables don't appear to be that well
> shielded in general (they seem to aim for cheap).

Another understatement. You folks are getting good at that. :)

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 



Re: missed keystrokes problem, back with a vengeance.

2017-01-30 Thread Lennart Sorensen
On Sun, Jan 29, 2017 at 01:48:50PM -0500, Gene Heskett wrote:
> Alan, ALL of the motor drivers are switchmode, with the current 
> regulation running at or above 20 KHz. And these noise spikes are 
> ringing at nominally 100 MHz. I have managed to get the xy motor noise 
> under control by takeing out the switchmode psu's, and putting in 
> tordoid transformers, bridge rectifiers, and the biggest electrolytic I 
> had in the drawers that had sufficient withstand voltage.  Its a star 
> ground system, and the output cables to the motors are shielded, and the 
> shield grounded as it goes by this single bolt ground on its way out of 
> the box. The shielding extends both ways from that point but is not 
> connected either at the motor, or at the driver, just at the bolt.  This 
> is std in such noisy machinery.

Well the USB would probably be at either 12MHz (USB 1.x) or 480MHz (for
USB 2), but most likely USB1 for your keyboard.  That certainly is a
potential place to hit with noise if you are getting spikes into the
100MHz range.  And USB cables don't appear to be that well shielded in
general (they seem to aim for cheap).

-- 
Len Sorensen



Re: missed keystrokes problem, back with a vengeance.

2017-01-30 Thread Gene Heskett
On Monday 30 January 2017 04:51:59 Jonathan Wilson wrote:

> On Sun, 2017-01-29 at 13:10 -0500, Gene Heskett wrote:
> > On Sunday 29 January 2017 12:16:52 Jonathan Wilson wrote:
> > > On Sun, 2017-01-29 at 08:47 -0500, Gene Heskett wrote:
> > > > Greetings everybody;
> > > >
> > > > I am in the process of bringing a nearly 70 yo Sheldon lathe
> > > > back to life, useing an raspberry-pi 3b for the machine
> > > > controller.
> > > >
> > > > However, I have now had 5 different keyboards plugged into it,
> > > > some wired, some wireless, and none of them can give me a
> > > > dependable response to a key, and the error seems much worse for
> > > > the key-up event. When driving the machine by hand as we often
> > > > do for one-offs, missing a keyup event can be disastrous for the
> > > > part being made because it keeps on cutting until you've given
> > > > that, or another key, a quick tap to stop the unwanted motion.
> > >
> > > I'm wondering if the problem is noise on the power, or RFI noise
> > > being picked up/interfering with the usb cable and/or PI in
> > > general. I'm guessing that the lathe is probably kicking out a
> > > shed load of RF noise into the air or on to the power line and the
> > > pi is not overly hardened for such a harsh environment.
> >
> > Understatement of the month... :)
> >
> :-) Its a good old British tradition to always understate ;-)
> :
> > This application, linuxcnc, is largely written in python, but I'm
> > not fam enough with python to go mucking about in its internals. And
> > the fact that 3 other installations of the same code on x86 boxes do
> > not have this problem tends to point a pretty stiff finger at the
> > pi.
>
> Yeah, the PI is made down to a price point (Although I'm fairly sure
> it meets some CE requirements:
> https://www.element14.com/community/docs/DOC-43262/l/updated-29-march-
>frequently-asked-questions-about-raspberry-pi   but it may be that any
> standards regarding "input noise", as opposed to it generating RFI,
> are possibly not met, likewise input shielding, de-coupling, etc.) ...
> X86 boards not only have to meet Intel standards but also a host of
> International and US standards and I'm guessing that some of the
> standards, either international or Intel, exceed the minimum
> legal/ISO/CE requirements (for being able to sell into markets) when
> taken as a whole.
>
> > > > There is something funkity in the usb keyboard handling that can
> > > > get much worse with a reboot, or get almost perfect with a
> > > > reboot.
> > > >
> > > > Its all uptodate a/o yesterday. The psu is a 4 amp box, making
> > > > 5.07 volts solidly. Verified with a 100 Mhz scope.
> > > >
> > > > What can I do to fix this?
> > > >
> > > > Cheers, Gene Heskett
> >
> > Thank you. There might be the seeds of a fix in this.
>
> You're welcome.
>
> > Cheers, Gene Heskett

There was that kernel of truth in it. I put a couple clamp-on ferrite 
chokes on the usb cable in the first 2" beyond the end molding of the 
cable where it plugs into the pi, problem totally solved.

For about an hour.

So I next fished out the UVW wires leaving that fake ebay VFD, and put a 
bigger copy of one of them on that group of wires, about 4 inches from 
its output terminals. When I came around in front of the machine, and 
re-enabled the VFD's power, the pyvcp tachometer went to full scale and 
nothing would move. It appears I have totalled the 7i90 i/o card.  So I 
have to call that vendor and get a couple more. The power of this noise 
had already blown two of the 4 stepgen modules in that one.  Its not 
rated for more than 5 volts, and is internally a 3.3 volt card.  And 
I've seen it at well above 15 volts p-p when I had switching power 
supplies for the motors.

I've also been given a link to a different way to construct the spi 
cable, out of a piece of cat5e or cat6 and two std IDC connectors. Much 
more compact than 2 pieces of ribbon with a junction pcb between them. 
The only potential problem I can see is that the conductors in the cat 
cable are 23 or 24 gauge whereas the ribbon cable is smaller, 28 gauge 
IIRC. But it works 3 feet long w/o any sources terms, whereas I only 
need 7". What I could use is a bigger box so I could spread this out 
another 2 or 3". But bigger boxes, new, start at 250 USD so this old 
rusty salvage will have to do. And my local home store to carry a BX 
style conduit so I could replace two pieces of plastic with loose wire 
in them. They are excellent broadcast antennas for this switchmode crap 
and the spindle motors wiring, which currently shares some conduit with 
the rest of the power wiring is going to get its own conduit at least 
above the machines chip pan. I also bought a pair of 20 amp Corcom brick 
wall filters for the VFD's inputs but have not installed them yet, I 
need to make room for them in that junction box by putting a 4square 
extension ring on it, making it a true 4x4x4.  Or better yet, find a 4x6 
box.  Sigh It never ends.

Tha

Re: missed keystrokes problem, back with a vengeance.

2017-01-30 Thread Jonathan Wilson
On Sun, 2017-01-29 at 13:10 -0500, Gene Heskett wrote:
> On Sunday 29 January 2017 12:16:52 Jonathan Wilson wrote:
> 
> > On Sun, 2017-01-29 at 08:47 -0500, Gene Heskett wrote:
> > > Greetings everybody;
> > >
> > > I am in the process of bringing a nearly 70 yo Sheldon lathe back to
> > > life, useing an raspberry-pi 3b for the machine controller.
> > >
> > > However, I have now had 5 different keyboards plugged into it, some
> > > wired, some wireless, and none of them can give me a dependable
> > > response to a key, and the error seems much worse for the key-up
> > > event. When driving the machine by hand as we often do for one-offs,
> > > missing a keyup event can be disastrous for the part being made
> > > because it keeps on cutting until you've given that, or another key,
> > > a quick tap to stop the unwanted motion.
> >
> > I'm wondering if the problem is noise on the power, or RFI noise being
> > picked up/interfering with the usb cable and/or PI in general. I'm
> > guessing that the lathe is probably kicking out a shed load of RF
> > noise into the air or on to the power line and the pi is not overly
> > hardened for such a harsh environment.
> 
> Understatement of the month... :)

:-) Its a good old British tradition to always understate ;-) 


> This application, linuxcnc, is largely written in python, but I'm not fam 
> enough with python to go mucking about in its internals. And the fact 
> that 3 other installations of the same code on x86 boxes do not have 
> this problem tends to point a pretty stiff finger at the pi.

Yeah, the PI is made down to a price point (Although I'm fairly sure it
meets some CE requirements:
https://www.element14.com/community/docs/DOC-43262/l/updated-29-march-frequently-asked-questions-about-raspberry-pi
   but it may be that any standards regarding "input noise", as opposed to it 
generating RFI, are possibly not met, likewise input shielding, de-coupling, 
etc.) ... X86 boards not only have to meet Intel standards but also a host of 
International and US standards and I'm guessing that some of the standards, 
either international or Intel, exceed the minimum legal/ISO/CE requirements 
(for being able to sell into markets) when taken as a whole.

> 
> > > There is something funkity in the usb keyboard handling that can get
> > > much worse with a reboot, or get almost perfect with a reboot.
> > >
> > > Its all uptodate a/o yesterday. The psu is a 4 amp box, making 5.07
> > > volts solidly. Verified with a 100 Mhz scope.
> > >
> > > What can I do to fix this?
> > >
> > > Cheers, Gene Heskett
> 
> Thank you. There might be the seeds of a fix in this.

You're welcome.

> 
> Cheers, Gene Heskett