Suggestions wanted. How to build an inexpensive robot with really accurate wheel encoders

Many years ago, I reprogrammed a scribbler robot from parallax so that physics students could control its motion with kinematic graphs drawn on a GUI on their computers. This has proven to be a fun and effective tool for teaching basic kinematics and I’ve sold the software to several hundred other physics teachers. Now the software is out of date, and the scribble robots are more expensive and have a great deal on board that is not necessary for this purpose. I am looking for advice on the best way to create an inexpensive robot or robot kit with accurate wheel encoders (1/4mm is what I currently have). Ideally it would be programmable from a GUI that runs on all the current platforms common in schools, PC, MAC, chromebooks, etc. What suggestions do you have for me?
UPDATE: Nomi looks possible. I programmed the scribbler in assembly language to track coder counts against target counts generated from the dynamics function, such that all of the calculations were done within one width of the PWM motor control. I would then decide whether to drop a pulse or keep it in order to keep the two wheels in sync and accelerating according to the kinematic function. Would C++ programming with Nomi be equally fast and efficient?

What is your definition of inexpensive? It must be less than the ~$230 USD that Parallax wants for the current Scribbler bot but how much less?

Pololu has wheel encoder enabled kits under that price (~$150):

How low do you need to go?

It’s hard to say for sure. Low enough that teachers will be able to purchase a class set. That will depend on school budgets, and I don’t have the capability to do a market survey. I can say that when the scribbler was in the $130 to $150 range, teachers were willing to purchase a class set to run the software.

The 3 pi looks like a good start. Even the turtle version is twice as fast as the scribbler and probably what I want for precise control of velocity and position. If I can get it to work, then as a second stage of the project I can think about the minimum number of components necessary and see about reducing cost.

I do have another question. In the current software, students draw a graph using the graphical user interface. The python program interprets the graph and creates a text file with the program instructions for the robot, which is passed to a compiler and sent to the robot through the USB port. With the Pololu robots, is it possible to have a similar tool chain that works on all the typical school platforms, PC, Mac, chromebook, etc?

Hello.

That sounds like an ambitious project. It might be possible to create a system that has a work flow similar to what you described for the 3pi+ 32U4 Robot, but unfortunately, we do not have any specific resources for doing something like that.

If you are considering undertaking that kind of project, you might consider our new 3pi+ 2040 Robot instead of the 32U4 versions. This new version of the 3pi+ robot uses a Raspberry Pi RP2040 microcontroller (like the one on the Raspberry Pi Pico), and has a few other benefits over the 32U4 versions. Since the RP2040 has a powerful processor, native USB, and a large amount of storage, then it should be generally possible to implement software that sends commands to it over USB, and you wouldn’t need to have a compiler on the PC side because the RP2040 is powerful enough to compile and interpret complex languages. Also, the USB bootloader makes it easy to download a complete new firmware on any OS.

Currently, we only have early adopter version of the standard edition of the 3pi+ 2040 Robots available, but the others (including the Turtle) are coming soon.

By the way, I noticed you edited your original post to mention a “Nomi”. Was that a typo and you were talking about our Romi Robot, or are you referring to something else?

Brandon

Yes. I meant ROMI. Would it be possible for me to be considered an early adopter for the 3pi+ 2040 and get one to start testing with? It might even be possible to have the program running and installed and just send the data over from the GUI. No need to recompile every time. I think I would like the 75:1 motors, though. Should I just get a kit plus additional motors, or would you be willing to sub in the other motors?

I noticed there was just one kit left in stock, so I went ahead and placed the order for that plus the LP 75:1 motors. Please advise if I should cancel that and wait for the turtle version or if another purchase seems better.

It sounds like you figured it out, but yes, anyone can order the early adopter version; it is mostly an indicator that we might not have all of the documentation and software finalized yet.

Your plan for getting the #5004 3pi+ 2040 Robot Standard Edition Kit with 30:1 MP Motors and substituting in some #2209 75:1 LP 6V Micro Metal Gearmotors is a good way to essentially get a turtle edition early.

Brandon

Thanks! We’ll see how it goes. I realize you don’t have official documentation yet, and I’m sure I can figure it out, but do you have suggested references or resources for learning how to program the raspberry pi and reference the inputs and outputs to get me started?

The 3π+ 2040 User’s Guide can be found here:

The bot will ship with MicroPython examples already on it. They can be accessed by connecting the bot to your PC with a USB cable which will make the robot show up as a USB mass storage drive containing these examples and the libraries on which they depend. The latest versions of these examples and libraries can be found at the following GitHub repository which you can peruse while waiting for the kit to arrive:

If you want to learn more about MicroPython on the RP2040 then you can start with the PDF found on this page:

I hope that helps.

Thanks for the guidance! I think this will be a productive direction to pursue. In the first iteration of this project I settled on the scribbler after trying half a dozen different robots and robot kits. Now that it’s been working in the classroom for many years, I have a better idea of what is required, and I can be fairly sure this will be able to achieve what I want at a more reasonable price. I especially like the idea that a numerical data and/or a text program in a higher level language can be sent over to the robot and compiled there. That will make it much easier to write the GUI in a platform independent fashion.