With Instructables you can share what you make with the world, and tap into an ever-growing community of creative experts.
Tell us about yourself!
That's a good circuit. But have you double, triple, quadruple checked the circuit? That's usually a source of mistakes and it's hard to debug because there's no way to tell if the circuit is correct.I usually build 3 of them to end up with 1 that works. And then when I know that the software is correct I fix the other circuits. I usually forget to solder a wire, or short something, or use the wrong IC... (there's a difference between the 74LS241 and the 74HC241, for exemple).
What circuit are you using to do the uart tx/rx multiplexing?And it really shouldn't be a problem, but just in the interest of debugging, have you tried moving a motor with ID 0?
Hi Katherine.Did you look through some of the other comments here?One common problem that people have been having is that configuring the serial port on newer Raspian versions is different than when I wrote the instructable. First thing I'd try is check if ttyAMA0 is working.Then, also make sure the code reflects the number of motors you have, and each motor has its own address. If you try to run the code for 6 motors with less motors, it will probably crash when it waits for the response.
Which variables in which code?If I recall correctly, base angles are the positions of the center of the motors on the base, and betas are the directions which the motors face, relative to the center of the motors, but using the same frame of reference as the base angles.
Cool. I'm going to add a note about it to the Instructable.
qi are the coordinates of the platform connectors relative to the base coordinate system. I think I used mm to measure. You can measure with a ruler. It's the (x,y,z) distance from the origin in the center of the base, at the height of the motor arms.Makes sense for the home position be 0, no? This is the angle of the servo arm, which varies from -90 to 90 (or 0 to 180). I defined home position to be servo arm parallel to the base and platform, and called this 0 degrees. The arms then go -90 degrees (when the arm swings down) to 90 degrees when they swing up.Beta is the angle of rotation of the motor itself relative to the base. In your drawing, the angle labeled "Base Angle" is the beta for that one motor. You have to measure that one and all others.
Cool.Make sure each motor has its own address. I forgot to do that once and wasted a lot of time debugging something that wasn't a bug....
For TX_DELAY_TIME, do you mean from 0 to 5 seconds ?I think too long a delay is also bad. Did you try just varying it a bit, like from 0.00002 to 0.00005 or 0.00001?What about RPI_DIRECTION_SWITCH_DELAY ? That one is also a bit of hack...If none of the functions are working, or they kind of work once, but then give timeouts, double check the uart circuit, maybe.... Because moveSpeedRW() and setAngleLimit() are all over our code, and they use readData(). They do still give some timeouts from time to time, but it's due to how often we send commands to the motors.We haven't used functions like readTemp() or readPosition(), so they could be buggy, specially in the op commands being sent to the motors (the variables checksum and outData, for example).
Hi.What circuit are you using between the RPi and the motors?There're some nice hard-coded delays in the code that are specific to my circuit. Different circuits might need slightly different numbers.Also, if you have multiple motors, make sure you set them up to have different id numbers. (looks like you're only using one, but I figured I'd mention this anyway)The purely read...() functions were not very extensively tested.... there could be a bug in those, but move(), moveSpeed(), moveRW(), moveSpeedRW(), etc have been tested and used.
Become Your Own 3D Printer
Becoming a Human 3D Printer
Laser Guided Hammer
Join 2 million + to receive instant DIY inspiration in your inbox.
© 2016 Autodesk, Inc.