Encoder questions

Hi All

Since my LiPo battery question, we have finished assembling the basic DFRobotShop Rover; with the addition of soldered XBee headers on XBee2 and the Encoder Pair for Tamiya Twin Motor Gearbox RB-Rbo-122. And the LiPo battery of course. So kind of a Modified “basic” setup.
For now, leaving XBee module off while we do break-in testing.

So, initial power-up with motors gives us a working 'Bot - it runs a routine with the tank going slightly forward, then reverse, and repeat endlessly. I think I read this is the default sketch loaded?

My Encoder questions: (Yes I watched the video)

]I have the little black boxes on the mini PCB facing the white slotted wheel on the drive shaft, about 1 mm apart. I see no overt activity - are they infra-red? i.e. no visible light emitted when working?/:m]
]The jumpers on the board: A1 appears to come default not engaged (i.e. of the 3 pins, the jumper is closer to the centre of board); A0 appears to have the jumper across the pins (i.e., of the 3 pins, the jumper is towards outside of board). What is the correct selection / position of jumpers?/:m]
Thanks again folks! This kit is great!

Geoff

Correct - it’s uploaded in the quality check to ensure the board can accept code and that the motor controller works.

Yes, the “little black box” is an infrared detector (no visible light). If there is something blocking it, it should go “high”. You should have the cable connected to the 3 pins next to the motor controller, and ensure they are oriented correctly.

If you are using the encoders, the jumpers should be over the two pins labeled “A0” and “A1” (as you have them); this connects the encoder pins to analog pins A0 and A1.

Looking forward to seeing a video of it in use!

Thanks Coleman!

But currently, A0 encoder jumper is not seated across the PCB pins / trace that show as a little white bracket. How to explain… OK Jumper A0 has 3 pins. The jumper is sitting in the 2 pins farthest away from where the motor encoders plug in; or put another way the jumper is in the inboard configuration; or put another way looking at PCB the A0 diagram silk-screened on PCB would seem to indicate you should have the jumper across the two pins closest to the edge, not the two closer to the centre.

For comparison, A1 jumper is sitting across the silk-screen image of the two outer A1 pins; or put another way closest to edge / encoder analogue plug-in.
Note these jumpers are as I received them from factory. So I should move that A0 jumper 1 pin over, to the two outer pins? Sorry to overthink this… just trying to remove mechanical/physical issues before we get down to coding!

And yes, Video coming shortly :mrgreen: indeed!

In the mean time, here is a teaser pic of Arduino being programmed using Linux Mint 17 (yay!) note my “COM” port is /dev/ttyACMO Not exactly a Windows picture, is it! :laughing:

http://i293.photobucket.com/albums/mm68/dantes_taco/Arduino/Screenshot-wasd_move|Arduino1105dfsg2-2_zps30603ebe.png

Oh Hey, is there a copy somewhere of that “factory Sketch” that I’m over-writing, just for my records? From what I could read on the Arduino site, you can’t “read back” off of your Uno, back to your PC. Wouldn’t mind having a copy
of it for my files…

Thanks so much for your speedy replies!

Geoff

Try it as you received it :slight_smile: Once again, the more important note is to ensure the pins line up correctly with the encoder PCB.

Thanks, will do.

Yes, I marked the 5V pin on the actual encoder PCB and made that my “yellow” wire which leads to the “+” pin on the main board. In both cases. I also noted in the video the encoders do not plug in symmetrical - they cross over to opposite sides of main board; and from underside, the 5V pins are also not mirror images of each other. If that is what you meant by ensuring I got the encoders wired properly? I can take pics if needed.

After our WASD program (which will use to make you a little video :wink: ) we’ll add the encoder sketch & see what data it’s sending in Serial Monitor. Maybe grab a X-window capture for the group.

Cheers and today is first programming day! My Son wants to do it in Windows, haha. Oh well.

Geoff & Sons LTD.

Correct. Looking forward to the video. Make it climb over stuff! :wink: