Topics

question encoder on a dual shaft motor

koal01
 

Hi all,
I'd like to control PEC on my G11 mount using an encoder at the back of my RA motor but this  encoder needs 5 V.
I tested it on a bench on a MiniPCB shunting the + on a + 5V pin and it works fine
I'd like to reproduce that on a MaxPCB but before do you think it would be risky.
Thank you

Koal01

Howard Dutton
 

On Wed, Mar 25, 2020 at 04:23 AM, koal01 wrote:
I'd like to reproduce that on a MaxPCB but before do you think it would be risky.
I will not comment as to the risk but I'm sure it's possible to do.

Two comments:
1. With a MaxPCB2 you can jumper to bring 5V out on the DB9 connector.
2. If using a Teensy3.6 you must be sure the PEC signal is in the 3.3V logic level range.

koal01
 

2. If using a Teensy3.6 you must be sure the PEC signal is in the 3.3V logic level range.
On the minipcb where i did tests i could read a signal every 4 minutes in SkyP with a pec indexed recorded.
The signal is weak around 1 V but that seems enough to create the record.
In the config i have to set the pec_sense_pullup and pec_sense_state_high 

Thank you Howard

Howard Dutton
 
Edited

On Wed, Mar 25, 2020 at 05:52 AM, koal01 wrote:
The signal is weak around 1 V but that seems enough to create the record.
Ok, but that's a really low voltage to call a logic HIGH.  I don't feel like digging through the T3.5/T3.6 specs to figure out exactly what the required voltage is but I seriously doubt that is in spec, something in the > 2V to <= 3.3V range (or 5V for T3.5) is more like it.

If the rise from ~0V to ~1V signals the arrival of the index perhaps you should consider using analog mode and specify a value of 200 (0.65V) or so (310 counts/volt.)

#define PEC_SENSE 200

Howard Dutton
 

Note that for my Teensy based designs the same pin can operate in digital or analog mode, no re-wiring needed.

koal01
 

The signal is between 0.98 and 1.4 V so i set the analog reading  Pec_sense 280 in the config and launched a couple of rounds.
The index is detected correctly.

Thank you Howard

koal01
 

After longer tests the best detection seems to be Pec_sense_pullup even with a weak signal.
With pec_sense 280 Onstep was ignoring 1 and 1,5 volts signals measured directly on the pin 23 on the Teensy 3.6
The pullup option seems very sensitive and the best option  but this behaviour is not logical since i'm expecting a analogic detection with this encoder.
I'm preparing outside tests to see if is working in real conditions.
Thank you

Koal01