One HUGE problem I see is that the halscope does not show the actual
encoder pulses.   The encoder has THREE outputs and each is a 50% duty
cycle square wave and the A and B waves are 90 degrees out of phase.
Halscope is not showing the encoder output.       I suspect it is showing
highly processed version of the encoder data and I suspect the processing
is wrong.  Can you make it show the actual input signals?

Old analog scopes are dirt cheap.  Even good ones made by HP or Tektronix
are on eBay for around $100

The way to debug this is to take it apart and verify the parts all work
then connect some of them together and verify the assembly works and
continue until the entire system is assembled.   This is how
professional engineers work.   In my experience building the full up system
then applying power rarely works except in very simple systems.  Test each
part independently and then again after assembly each assembly step

So for example, I'd place the encoder with a DC motor (or chuck it in a
drill) and look at its output.  Then attach the level converter and look
again.   Then put the encoder on the real spindle and look again.  Make one
change at a time and test.    Having a real scope means you don't need to
have a computer to test.

At this point we don't know where the error is.  The encoder itself could
be the problem.    But I doubt that.   May gues in now a software/config
issue.    I would keep that gues until I was able to see the raw encoder
data.



On Mon, Oct 11, 2021 at 2:19 AM Peter Hodgson <peterjohnhodg...@gmail.com>
wrote:

> Hi Chris,
>
> I've added the encoder part number to the schmeatic and also added
> datasheets and 'Halscope' screen shot to the webpage:
>
>
> https://www.purbrookengineering.com/index.php?option=com_content&view=article&id=11
>
> I don't have an oscilliscope so am relying on Halscope at the moment.
>
> Thanks,
>
> Pete
>
>
> On 11/10/2021 02:58, Chris Albertson wrote:
> > sorry there was no part number on the encoder. I figured it was the
> generic
> > Omron clone that is 5 to 12 volts.   But there are two kinds that other
> is
> > 12 to 24. volts.   See in the link below
> > https://www.ia.omron.com/products/family/486/specification.html
> >
> > Is the encoder "open collector" or voltage output.   If open  colector
> pull
> > the outputs up to 5 volts.
> >
> > Placing an encoder part number of the schematic would help.
> >
> > Can you post a picture of "ghost pulses", if using an analog scope just
> use
> > you phone camera, most digitalscopes can save the scree to USB drive.
> > Noise like this is best eliminated at the source
> >
> >
> > On Sun, Oct 10, 2021 at 1:04 PM Peter Hodgson <
> peterjohnhodg...@gmail.com>
> > wrote:
> >
> >> Hi Chris,
> >>
> >> The encoder datasheet gives a voltage range of 10-30vdc so I don’t think
> >> direct connection with 5vdc would be an option.
> >>
> >> Would a direct connection via voltage dividers eliminate the ‘ghost
> >> pulses’ being picked up by the Pico board?
> >>
> >> The encoder won’t be running above 3,000 rpm.
> >>
> >> Pete
> >>
> >>> On 10 Oct 2021, at 19:00, Chris Albertson <albertson.ch...@gmail.com>
> >> wrote:
> >>> Is your math right?   Yes, I get 83 KHz for a 500 line encoder at
> 10,000
> >>> RPM.  Yes that is < 1% of the isolator's rated speed (of 10 MHz)
> >>>
> >>> But the schematic had an RC low pass filter in the encoder output that
> >>> would have prevented the system from working above about 1000 RPM.  I
> see
> >>> this is gone now.
> >>>
> >>> But why are these isolators even needed?  Why not simply operate the
> >>> encoder at 5 volts?
> >>>
> >>> Or if you must run the encoder at 12 volts, you can do level
> translation
> >>> with a resistor voltage divider.
> >>>
> >>> There is nothing yo isolate.  The entire system runs on a common ground
> >> and
> >>> there is no high power devices in the schematic and I assume the entire
> >>> system is in one building with no long (100 meter) cables
> >>>
> >>> If you are worried about accidents blowing up the controller, use
> diodes
> >> to
> >>> shunt any transients.  But  really there are no inductive loads
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> On Sun, Oct 10, 2021 at 10:25 AM John Dammeyer <jo...@autoartisans.com
> >
> >>> wrote:
> >>>
> >>>>> From: Gene Heskett [mailto:ghesk...@shentel.net]
> >>>>
> >>>>
> >>>>> If the opto's are fast enough, you should be
> >>>>> fixed. A 500 ppr encoder s/b fine. A 1024 or 1000 requires a faster
> >>>>> opto.
> >>>>>
> >>>> HI Gene,
> >>>> Comparing the cheap far east BoB optos with the HCPL2621 is apples and
> >>>> oranges.
> >>>>
> >>>> A 2500 line encoder still only creates 2500 pulses.  The quadrature
> just
> >>>> looks at two lines and 2 edges for 10,000 edges.  But the max speed of
> >> his
> >>>> encoder is 10,000 RPM which in RPS is 166.7 and would result in 417kHz
> >>>> which is 4% of the opto max 10 Mbps  capabilities if the encoder was
> >> 2500
> >>>> line.
> >>>>
> >>>> But his is 500 line so at 166.7 RPS is 83kHz which is 0.8% of opto
> >>>> capabilities.
> >>>>
> >>>>
> >>>> John
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>> 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
> >>
> >> _______________________________________________
> >> 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
>


-- 

Chris Albertson
Redondo Beach, California

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

Reply via email to