This topic has 7 replies, 2 voices, and was last updated 8 years, 9 months ago by SuperDroid.
- AuthorPosts
- February 9, 2016 at 2:22 pm #2914DanParticipant
Hello-
I recently purchased a few quadrature encoder buffers from your website. I am connecting them to the ig52 motors that I also got from you guys. I believe that I have it hooked up correctly, but the data I getting from the encoder doesn’t make sense.
I am using an arduino mega for my mcu. My setup is as follows.
Front Right (FR) motor encoder is connected to Encoder buffer. Front Left (FL) motor encoder is not hooked up yet.
The encoder buffer is hooked to the 5v and gnd from the mcu.
Since I am using a arduino mega, the MISO, MOSI and SCK are hooked to pins 50, 51 and 52 respectively.I used the code from your website to initialize the encoder (and set it to quadrature mode). I also use the code I got from your website to read the SPI data.
// Read encoder digitalWrite(encoder,LOW); // Begin SPI conversation SPI.transfer(0x60); // Request count count_1 = SPI.transfer(0x00); // Read highest order byte count_2 = SPI.transfer(0x00); count_3 = SPI.transfer(0x00); count_4 = SPI.transfer(0x00); // Read lowest order byte digitalWrite(encoder,HIGH); // Terminate SPI conversation // Combine (4) 8-bit parts into (1) 32-bit value count_value = (count_1 << 8) + count_2; count_value = (count_value << 8) + count_3; count_value = (count_value << 8) + count_4;
When I read the data from the buffer, I get a count_value of -1. count_1, count_2, count_3, count_4 all return values of 255.
I get this same value when I connect to both chips on the buffer. Again, only one of these chips actually has an encoder hooked up to it.
Any thoughts on what I am doing wrong? Thanks in advance, Dan
February 9, 2016 at 2:53 pm #2916SuperDroidKeymasterAre the pull up solder jumpers being used? You need pull resistors for hall effect encoders. If using optical encoders, you do not need them.
From the item description: “There are a series of solder jumpers next to the encoder headers. These solder jumpers provide 1k pull-ups to the LFLAG, A channel, and B channel inputs. For use with our hall-effect motors the solder pads need to be connected. The output of the encoder is grounded as it senses the rotating magnet. These 1k pull-ups are required to pull the signal high so that the encoder pulses return to 5V after the magnet passes the sensor.”
February 9, 2016 at 3:55 pm #2917DanParticipantI am using the board how it came from superdroidrobots. I tested with a multimeter and thought that the solder jumpers came pre-soldered. Is this correct? Also, I have the motor encoders hooked up with the following pull up board.
I do not have the I (index) pin on the encoder buffer hooked to anything, but what I have read from the documentation, setting the MDR0 to 0x03 makes the index pin unused. Is this correct?
Thanks
DanFebruary 10, 2016 at 10:26 am #2919SuperDroidKeymasterThe solder jumpers have to be configured to suit your encoders. You don’t need to using the index pin. The jumpers need to be checked and should be bridged of using hall effect encoders. They should be removed for optical encoders.
February 10, 2016 at 1:02 pm #2920DanParticipantDo the jumper need to be bridged even when using the encoder pull up board? This would put 2k of resistance between the a & b sensors and the encoder buffer chip.
February 10, 2016 at 1:20 pm #2921SuperDroidKeymasterif you are using the pull up board, you should open the jumpers. You do not need the pull up boards with the buffer board, but if you already have them wired in, you can just open the jumpers. You don’t want both on, it will pull it up too hard and never go low…
February 16, 2016 at 9:06 am #2948DanParticipantThank you for your help. I have the Arduino mega reading the SPI signal from the encoder buffers. For some reason, I was having a problem with my USB host shield that was breaking the SPI signal. When I switched the USB host shield to a different one, I started getting a valid connection.
I am having a different problem now. One of the LS7366R chips does seem to run in 4x quadrature mode. I set the MDR0 to 0x03 and then read that register just to make sure. The motor on this pin always returns an encoder reading that is half of the other motors even though the motors are running at the same speed. Again, I am using the IG52 motors with hall effect sensors. I checked the pull up resistors on the board and I get an impedance reading across the 5v pin to the A, B and LFLAG pins of around 880-940 ohms on both chips. The issue does not seem to be with the pullup resistors, but with the LS7366R chip. I also tried swapping the SS pins to see if it was the motor, but whatever motor is connected to that chip gets a 2x reading.
Any thoughts? Thanks
DanFebruary 16, 2016 at 9:20 am #2950SuperDroidKeymasterHi. Send it back with a copy of the order and a note. Put your RMA[order number]-1 on the package. We will take a look at it and repair or replace it if the board has a manufacturing issue. If the board was damaged by a short, power surge, static, etc. it will not be covered by warranty.
- AuthorPosts
You must be logged in to reply to this topic.