pulsin then servo

alband

Senior Member
Thanks for the encouragement, although I think it should be saved until I drop it [on the floor] again (yep, I said again).

I've been looking around and have got the impression that there are differences between gyro's and accelerometers, and when I say gyro's I mean gyro IC's. This is by the fact that the "gyro IC's" out there, seem to use a spinning or oscillating sensor element that can therefore measure angular momentum. e.g. Accelerometer and gyro? I could well be wrong though :rolleyes:.

I've full adjusted the gain limit and the extra channel the gyro needs with no success.

I am just testing now using a massive standard servo so that shouldn't be an issue. It is attached by screw too, so it wont wobble.

I't might be the inertia thing though. Not sure how I'd get past that in the real thing but I can try it now.

Thanks.
David.
 
Last edited:

alband

Senior Member
Sorry, I forgot to say; those freescale things you were talking about jglenn, sound quite nice. Can you post a link to them? :)
 

alband

Senior Member
Well, a lot has happened. :)

It is now working, not the gyro's though, everything but. I have successfully switched to 2.4GHz and I've got to say; it's a blast.
I've got an SMT 08M in the hull reading the pulses and taking to: a DIP 08M in the turret that controls the servo (new servo as well gives much smoother motion) and the laser. The whole system is running at 8MHz to... well, er... make it faster really (quite obvious that one :p).

I have given up on using gyro's (for the moment at least) because after doing masses of trial-and-error on this new gyro, I've concluded that it is designed for something completely different and will always oscillate (even to a very small degree would still render it useless).

However, the tank is now PICAXE'ed and ready for anything. I have noticed though, that the 08M, even at 8Mhz cannot read the pulse timings accurately and will circle around three or so digits. To solve this, I have currently got some "if's" and such in the turret so it only changes positions if two sequential variables are the same, but it is still not perfect.

I also recently bought a 28X2 and whilst reading some of the improvements is more accurate servo related command. After trying it, I can say it is loads better, and it also reads the pulses from the Rx a bit better. Another strategy I've tried with my shiny new 28X2 is to increase the speed to em16 using a 4MHz resonator that we all have lying around somewhere. This gives more accuracy when using the pulsin command but of course without exceeding the timeout (0.65536sec / 16 = 0.04096sec, max servo pulse = 0.00225sec). This almost completely solves the problem cause when using pulsin on the 08M. However, if the PICAXE is run at em16, it reeks havoc with the servo command (which has to be used because the pulsout would be too larger number and the servo command is now far more accurate).
There is a way to solve this though, after reading the manual for a bit, i found the section in the servo command where it say that the servo command can be run at em32. This would make the pulsin even more accurate and leave plenty of time between to allow lots of other stuff (come back to what that is later). Unfortunately I haven't got any 8MHz's so I've ordered some and they are winging there way here as I type. Also unfortunately, I can use this in the tank because it will require the SMT 20X2 in the hull (smallest X2 available) and since the normal 20X2 isn't around, it's going to be a long wait. :(

Now remember I said about leaving time in between for some other processing?

Take a look at this.
I'm planning on bidding on it, under the assumption not many others in the eBay community will want it so it could be quite cheap. It uses a simple analogue output, so I think it would be perfect for the gun.
The question is ("thank God! he's finally got to the point"), is this what i would need, is it as simple as it looks, and would there be enough time every 20ms to read the analogue pin and process and edit the servo value, when running at em32?

Thank's again for reading another lengthly post! :eek:

I've attached the current X2 in case (because) my explanation was rubbish.
 

Attachments

Top