How can i use a microprocessor in Robotics.?
Sidrock
Posts: 1
If you know difference b/w microcontroller and microprocessor then continue else exit.:thumb:
I'm used to using picaxe and propeller microcontroller but now i want to do something big, like using ATOM / CORTEX 8/9 etc. Now the problem is they are just microprocessor and thus cannot interact with servos, leds directly so what I have to do to make them usable for me. Beside i wanted to include a concept of master and slaves in the system, i mean using atom as a master and propeller as slaved so that an unambiguous, self-capable, artificial, system(better than drone) can be made to fly at high speed. The main problem is it is not possible for propeller to do such fast calculations and i know nothing of microprocessor.
I'm used to using picaxe and propeller microcontroller but now i want to do something big, like using ATOM / CORTEX 8/9 etc. Now the problem is they are just microprocessor and thus cannot interact with servos, leds directly so what I have to do to make them usable for me. Beside i wanted to include a concept of master and slaves in the system, i mean using atom as a master and propeller as slaved so that an unambiguous, self-capable, artificial, system(better than drone) can be made to fly at high speed. The main problem is it is not possible for propeller to do such fast calculations and i know nothing of microprocessor.
- WHAT ARE YOUR VIEWS ON IT, IS IT FEASIBLE?
- ARE YOU GONNA HELP IN CODING AND PROGRAMMING?
Comments
So: 1) Sure it's feasible. The details are what can make or break the effort.
and: 2) No. You're saying you want help in coding and programming, but I don't see any evidence that you're willing to put out effort yourself. You're not going to get people to do a really huge amount of work and then hand it over to you along with detailed explanations unless you pay them for their time and effort. You're going to have to learn a lot about programming both the Embedded System and the Propeller. You're going to have to learn a lot about control systems. There are people here with some experience along those lines who are willing to share their experiences, but we're talking about advice and critiquing, not coding and programming.
Some of your assumptions are not correct, particularly the "not possible for propeller to do such fast calculations". The Propeller is a very fast microcontroller. A lot of the calculations needed for a flight control system are very well suited to the Propeller. They have to be done in scaled integer arithmetic and some or mostly in assembly language. The ELEV-8 with its Hoverfly controller is a high speed quad- (or hex-) copter with a Propeller controller with most of the high speed control functions handled by the single Propeller. It would be much easier than you think to use either an Embedded System like an ATOM-based one or a 2nd Propeller to communicate with something like a Hoverfly controller.
This is not quite accurate. The address, data, and control bus can be used to control latches, buffers, and other hardware to run the servos, leds, and other devices. This was done extensively with the PC's by add on boards that plugged in to the expansion slots. Not that I am suggesting you do this, it is much better to use microcontrollers as smart/slave peripherals for this task.
- "WHAT ARE YOUR VIEWS ON IT, IS IT FEASIBLE?" Absolutely yes. This is a common approach for complex systems.
- "ARE YOU GONNA HELP IN CODING AND PROGRAMMING?" Beyond occasional help or suggestion, NO. Too many projects on the go now.
How fast is your plane going to be flying? 200km/h? Like this? http://www.diydrones.com/profiles/blogs/gt200kmh-funjet-the-fastest How fast do you need to run your control loop? (Hz)
The funjet in the link above uses the uavdevboard (http://diydrones.com/page/uav-devboard) with a 120mhz dsPIC33F running 60mips. Are you familiar with that MCU? That chip can't do floating point calculation. But the MatrixPilot firmware use fixed point instead and runs very fast. The dsPIC33 has DMA, some really nice streamlined array processing assembly instructions, dsp instructions, hardware peripherals, etc. It's well suited to the matrix operations performed by the firmware.
The propeller being an 80mhz, 4 cycles / instruction = 20mips * 8 props = 160mips. I don't know whether Prop or dsPIC33F is more powerful for this particular application but I can't believe the Prop is a slouch here.
In MatrixPilot they keep that dsPIC33 pretty busy and it can handle it fine. Look at all the interrupt routines it deals with: http://gentlenav.googlecode.com/files/AnIntroductiontoMatrixPilotInterrupts.pdf
What calculations are you going to be running? what algorithm(s)? A matrixpilot-like DCM-based algorithm? I recall reading (please verify) that MatrixPilot updates control outputs for every hobby servo pulse, typically 50hz.
You could perhaps have in mind an Extended Kalman Filter (or something along those lines) in which case you'd probably need something a little faster. The PX4 autopilot board can run an EKF suitable for 3d autopilot. It runs an STM32F4 running 168mhz (210 Dhrystone MIPS apparently) with floating point in hardware. The control loop runs at 200Hz.
Do you need to update control outputs faster than 50Hz? Why? Let's say you have a fairly fast hobby servo that runs 0.06sec/60°. That's still 1ms per degree. As you probably know, 1ms (1000µs) is an *eon* in MCU time, even for an Arduino running a mere 16mhz. Do you have servos that can keep up with your intended control update rate?
How much faster do control surfaces need to move? How fast with the plane react as a result? In fact, come to think of it, do you really want to be tweaking control surfaces quickly or smoothly and slowly at such high speeds?
Did you have a heavier-weight algorithm in mind than a multi-state 3d EKF to throw at the hardware? Why? What advantages does it offer over the MatrixPilot DCM algorithm? Or over the EKF?
Of course.
Given all I've discussed, do you think it is necessary?
Hah. No! I'm too busy working on my rover to bring it into the 30mph+ range. My autopilot (which I wrote) is 2D only and runs a pretty simple, small, plain ol' Kalman Filter with software floating point (slow) on a 96MHz ARM Cortex M3 and I have a 100hz control loop with loads of cpu time to spare. Earlier I had it running the DCM update algorithm in 3D also with loads of cpu time to spare.
If you need an excuse to use a microprocessor you might want to look at doing computer vision.
Michael
On a slightly "off-topic" note, I'm surprised the name "admin" wasn't reserved in the system.
Jeff