Shop OBEX P1 Docs P2 Docs Learn Events
wire a Quadrature Encoder to a Propeller Activity Board — Parallax Forums

wire a Quadrature Encoder to a Propeller Activity Board

doug.taylordoug.taylor Posts: 31
edited 2014-12-29 18:36 in Learn with BlocklyProp
I need to connect a quadrature encoder from the Motor Mount & Wheel Kit to a Propeller Activity Board.
There are two sets of three wires. Each set has a red, black, and white wire.

The two black wires go to ground.
Do the two red wires go to 5V or to 3.3V?
Do you pull the white wires up or down?
To pull up or down should I use 100ohms resistors?
Do I need an additional smaller resistor between the white wire and the pin?

Comments

  • dgatelydgately Posts: 1,621
    edited 2014-02-11 14:47
    I need to connect a quadrature encoder from the Motor Mount & Wheel Kit to a Propeller Activity Board.
    There are two sets of three wires. Each set has a red, black, and white wire.

    The two black wires go to ground.
    Do the two red wires go to 5V or to 3.3V?
    Do you pull the white wires up or down?
    To pull up or down should I use 100ohms resistors?

    Should be similar to the ActivityBot tutorial at:

    http://learn.parallax.com/activitybot/electrical-connections

    That config uses 2 20K Ohm resistors. I'm not sure if the quadrature encoders on the ActivityBot are exactly the same as the ones with the Motor Mount & Wheel Kit. So, be advised...

    dgately
  • doug.taylordoug.taylor Posts: 31
    edited 2014-02-11 15:28
    dgately wrote: »
    Should be similar to the ActivityBot tutorial at:

    http://learn.parallax.com/activitybot/electrical-connections

    That config uses 2 20K Ohm resistors. I'm not sure if the quadrature encoders on the ActivityBot are exactly the same as the ones with the Motor Mount & Wheel Kit. So, be advised...

    dgately

    dgately, Thanks for the quick reply. I hadn't looked at the Activity Bot before asking the question. Thanks for the pointer.

    As I see it, the red wires are to 5V, The white wires are pulled up to 3.3V with 2 20KOhm resistors. Assuming the Motor Mount & Wheel Kit Quadrature Encoders work like the Activity Bot Encoders. I also don't seem to need an additional resistor to the pin.

    Can anyone confirm that the Motor Mount & Wheel Kit Quadrature Encoders can be treated like the Activity Bot Encoders?
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-02-11 15:46
    Can anyone confirm that the Motor Mount & Wheel Kit Quadrature Encoders can be treated like the Activity Bot Encoders?

    The ActivityBot encoders are single channel not quadrature.

    It looks like you can power the encoders with 3.3V or 5V. If you use 3.3V you don't need series resistors. If you power the encoders with 5V you need to make sure and add either 4.7K or 10K series resistors to protect the Propeller.

    It doesn't look like you need pull-up (or down) resistors.
  • doug.taylordoug.taylor Posts: 31
    edited 2014-02-11 18:06
    Duane Degn wrote: »
    The ActivityBot encoders are single channel not quadrature.

    It looks like you can power the encoders with 3.3V or 5V. If you use 3.3V you don't need series resistors. If you power the encoders with 5V you need to make sure and add either 4.7K or 10K series resistors to protect the Propeller.

    It doesn't look like you need pull-up (or down) resistors.

    Duane,

    Thanks for the quick reply. I was hoping to use four of the Servo Ports on the North East corner of the Activity Board. If I understand you, that won't be possible, because there is no 3.3V option with those ports and since the data (white) wire connects directly with the pin, there is no way to put a 4.7K or 10K series resistor.

    Doug
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-02-11 18:18
    Duane,

    Thanks for the quick reply. I was hoping to use four of the Servo Ports on the North East corner of the Activity Board. If I understand you, that won't be possible, because there is no 3.3V option with those ports and since the data (white) wire connects directly with the pin, there is no way to put a 4.7K or 10K series resistor.

    Doug

    I just checked the AB's schematic, it has 3.9K resistor on the signal line. This is enough to protect the Prop at 5V.

    As long as you don't need pull-ups on the lines, you should be good to go. At least it won't hurt anything to try.
  • doug.taylordoug.taylor Posts: 31
    edited 2014-02-11 18:32
    Duane Degn wrote: »
    I just checked the AB's schematic, it has 3.9K resistor on the signal line. This is enough to protect the Prop at 5V.

    As long as you don't need pull-ups on the lines, you should be good to go. At least it won't hurt anything to try.

    Duane,

    Fantastic! Thanks for looking that up for me. I'll give it a try and let you know.

    Doug
  • doug.taylordoug.taylor Posts: 31
    edited 2014-02-14 14:04
    Duane,

    I used an old quadrature encoder from an old robot that used the original Motor Mount & Wheel Kits. This encoder has the two three-wire connections for the encoders just like the new ones, but it also has an additional three-wire connection that goes to an HB-25 controller.

    That robot was a tele-presence robot and I didn't use the encoders so I thought I could hook up my Activity Board and write a little Proof-of-concept program.

    I hooked one wire set to one of the encoder headers and the other end to the pin 15 servo header of my Activity Board. I then wrote a little code that continuously read pin 15 with the "input(15)" command. While running this code, I manually turn the wheel.

    It constantly stays high.

    Are you sure I don't need to pull this pin down?

    Can the older quadrature encode behave differently?

    Can you think of anything else I can check?

    Doug
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-02-14 14:42
    My suggestions were based on the assumption you were using this quadrature encoder kit.

    It's very possible a different set of encoders would behave differently.

    I don't know if you need pull-down resistors or not. I can't see how it would hurt to try them.

    Your monitoring of the input pin seems like a good idea. You could also monitor the output from the encoder with a multimeter.

    If you can find documentation on your encoders we could take a look at it to see if there's anything you should be doing differently.
  • doug.taylordoug.taylor Posts: 31
    edited 2014-02-14 16:08
    Duane,
    Duane Degn wrote: »
    My suggestions were based on the assumption you were using this quadrature encoder kit.

    Yes, I anticipate using the newer encoders, but I haven't bought them yet. The older ones are the ancestors and I was hoping I could use them for some testing.
    Duane Degn wrote: »
    I don't know if you need pull-down resistors or not. I can't see how it would hurt to try them.

    That is good to know. I'm not an engineer as you probably guessed. I'll try pulling them down.
    Duane Degn wrote: »
    If you can find documentation on your encoders we could take a look at it to see if there's anything you should be doing differently.

    Parallax doesn't seem to support these anymore. I'll try to locate some hard copies from when I originally bought it.

    Doug
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-02-14 16:27
    Parallax doesn't seem to support these anymore. I'll try to locate some hard copies from when I originally bought it.

    You could email or call Parallax tech support and explain what you have. Every time I've spoken with someone at Parallax, they have treated me like an old friend even though we've never spoken or met before. They could probably help you find documentation if you can't find it yourself.
  • doug.taylordoug.taylor Posts: 31
    edited 2014-02-14 16:53
    Duane,
    Duane Degn wrote: »
    You could email or call Parallax tech support and explain what you have. Every time I've spoken with someone at Parallax, they have treated me like an old friend even though we've never spoken or met before. They could probably help you find documentation if you can't find it yourself.

    Great idea. I did just that. It turns out that the "blue" quadrature encoder is completely different than the old "green" (I forgot what he called it) even though they look very similar. The old one has an onboard microprocessor and you can give it commands and it can control the HB-25 directly. I guess I'll need to get the newer encoders to do what I want.

    Doug
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-12-29 18:36
    Hey Doug, Are you still around?

    I've been very busy working on the OPP#8 and I've become very familiar with the blue quadrature encoders. I've also acquired a couple of sets of the green encoders. I'm still learning how the green encoders work, but I bet I could help you with your project if you're still working on this.
Sign In or Register to comment.