Yes, that tells me that the holes for the servo horn are radial. I was debating whether to orientate them in-line or radial. I went with radial as well, if for no other reason then it looks cool! But it does somewhat determine the “mid-range” position of the servo. I assume your horizontal (coxa) angles are all at 90 degrees then, since your servo center lines are arranged on a square. I’ll have to use a table to get my angles, as they are not simply 60 degrees (Phoenix), nor 90 degrees. No big deal.
Yup, radial it is. Radial looks better as it is symetrical around the center point, while inline would make it look mirror, which is not great.
Since the quad will be walking in omnidirection, radial would be more suitable. For that reason, I prefer the leg to sit at 45 deg, but since the body is not square, so it would make about 48.3 deg.
Some updates:
I have the PWM generator up, generating 6 pulse per chip. So I need 2 chips. Currently in the midst of rewriting the code so that it would fit 12 PWM in 1 chip.
I went to one of the local RC store last Thursday, was looking for battery charger actually (I didn’t buy from Lynxmotion cause over here we use 240V outlet), and somehow bought myself a 2.4ghz Tx and Rx, china product. Relatively cheap, and so it the quality.
And here’s another picture during earlier PWM code development. The LCD let me know which servo I am controlling (up to 6), current position and pulse step in microsec, and to verify that the channels are transmitting…
There were actually waste (wire insulation, jumper wire, etc) scatter outside of this field of vision. Anyway, that was just to test the radio module. Back to progress.
Some update, I manage to code 12 PWM into 1 PIC, with accuracy of +/-0.4us. I also manage to squeeze in the IK equation (but only for 1 leg) into the chip. The code still need much work before posting (if anyone interested at all), so I’ll share a brief summary.
In a single cycle of 20ms, this is what was prepared:
0.0 - 2.6ms : simultaneous PWM generation for servo 1, 2, 3
2.6 - 5.2ms : simultaneous PWM generation for servo 4, 5, 6
5.2 - 7.8ms : simultaneous PWM generation for servo 7, 8, 9
7.8 - 10.4ms : simultaneous PWM generation for servo 10, 11, 12
10.4 - 16.6ms: Read from input pin, IK calculation
16.4 - 17.0ms: Post-process the leg position in X, Y, Z (in mm) and display onto LCD.
17.0 - 20.0ms: Spare
From the beginning is was about code optimization and timing, so I observed and timed the execution time using MPLAB Debugged Sim stopwatch. The timing is approximated with tolerance of +/- 0.1ms.
The first code was run on 16F877A @ 10Mhz. For the IK, I prepared a lookup table for cosine with size of 200, and further improved with simple linear interpolation. The accuracy is 0.04 deg (the largest I have encounter). Whats important is that it cutdown the calculation from start to finish in less than 400 instruction cycle (equivalent to 160us).
I have also included cordic division and cordic squareroot into my code. With that, the entire IK calculation takes approximately 5ms. Still not quite there yet.
Next, I transfer to PIC18F. Had some very very weird problem with the code, doesn’t seem to be compatible at all. Stuck.
Once I have that figure out, I was hoping to bump the speed to 40Mhz, IK calculation would go down to 1.25ms!!! Which means I can actually solve 4 IK equations in single cycle, with few milisec spare for polling from Rx and do something else!!! Maybe some LED flashing
That’s quite a good start. I coded an 8-servo controller in a pic, along with a simple sequencer, but it’s a jump to go over 8. I see you’ve done it!
If you said, I didn’t find it. I take it you’re using ‘C’? Which compiler?
I’m sure there are several of us that would be interested in studying your code, when you’re ready. Especially the cordic division and cordic squareroot. But, if you need that, then maybe you are using BASIC? Which BASIC? Now you have me curious!
I upgrade from 16F877A to 18F458, still using 10 Mhz. It polls input from the tack switches, display on LCD, compute the IK calculation, generates 3 PWMs and position the leg. At this stage, I’m still using 1 leg for debugging and troubleshooting.
After seeing innerbreed photos and video, I too got the legs up. It looks empty without the electronics though, and lacking of some paint job. Anyway, I bumped the frequency to 40Mhz and it works!
I attempted to etch my own PCB using toner transfer method. The first try didn’t go well, with some missing pattern at the bottom. One thing I discover here is that toner transfer work well up to 0.012". http://img218.imageshack.us/img218/7223/p1020956resizer.jpg
This is my first time designing PCB, and for playing it safe, I put a lot of space between the traces, and no common ground as well.
I’m using the same mounting from phoenix, so the board is also sized accordingly. Eventually I have to drop some component and split the board into 2; mainly due to the board size, and lack of space for trace since I’m using single side PCB. I don’t want to increase the quad body size either, any bigger and it won’t look that aggressive. It was a very tough decision.
For now, I need to find that 0.8mm drill bit, which is a bit difficult. If not have to settle with 1.0mm. That’ll be the plan for next weekend.
Wish I have that kind of machine. Anyway, the PCB I got is typical. I wanted 2oz, but the owner isn’t sure of the thickness. End up asking and searching over 20+ shops asking the same question and got the same answer.
Anyway, I just simply bought one, end up with large traces on the PCB. Any idea how to test the thickness?