Knowledge on programming the Motorola HC11 MCU

Page 3 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

AbsolutDealage

Platinum Member
Dec 20, 2002
2,675
0
0
I actually did the inverted pendulum project with an hc11. Just to let you know, you are probably going to have issues with that stepper motor being fast enough to respond, and probably will move too much when it does. The real key to a successful inverted pendulum is very small movements. The only way to accomplish this is efficient code and a precise mechanical system. If I were you, I would probably replace that motor with a DC motor and an optical encoder (or potentiometer) system for feedback of positional information.

Also, another problem you may run into is that the HC11 is a little bit underpowered for this application. Don't get me wrong, it can be done, but you have to be super-efficient with your code and have everything set correctly on your A/D subsystem for this to work.

One of my teammates from a couple of years ago (if I can even get in touch with them) has all the code that we used, along with our CAD drawings of our pendulum, etc. If I can get a hold of it I'll let you know.
 

pillage2001

Lifer
Sep 18, 2000
14,038
1
81
Originally posted by: AbsolutDealage
I actually did the inverted pendulum project with an hc11. Just to let you know, you are probably going to have issues with that stepper motor being fast enough to respond, and probably will move too much when it does. The real key to a successful inverted pendulum is very small movements. The only way to accomplish this is efficient code and a precise mechanical system. If I were you, I would probably replace that motor with a DC motor and an optical encoder (or potentiometer) system for feedback of positional information.

Also, another problem you may run into is that the HC11 is a little bit underpowered for this application. Don't get me wrong, it can be done, but you have to be super-efficient with your code and have everything set correctly on your A/D subsystem for this to work.

One of my teammates from a couple of years ago (if I can even get in touch with them) has all the code that we used, along with our CAD drawings of our pendulum, etc. If I can get a hold of it I'll let you know.

Cool

Well, we are already facing some problems. First of all, we managed to boost the voltage to 12v but the current was not enough to drive the motor. I believe there would be timing issues in the project. We're using an optical encoder for the feedback system.

It's all too late to change to a DC motor now. The due date is like 3 weeks away. We'll just do as much as we can and see what appears.

Thanks for the tip. :)
 

AbsolutDealage

Platinum Member
Dec 20, 2002
2,675
0
0
Yea, I would not suspect many people that have as little experience as you have would have any overwhelming success with this project. Don't get me wrong, thats not a slam... it just that you need a heavy background in control systems, electronic design, and mechanical design to get a project like this off the ground. I did this my senior year, and we had a 5 person team doing this over an entire semester.... and even then we only had a marginally-working project.

For us, the mechanical design was our downfall, our control system and our electrical design was good but the pendulum track simply had too much friction for it to work properly. Anyways, this is a really ambitious project (its really friggin cool when it actually works though).
 

pillage2001

Lifer
Sep 18, 2000
14,038
1
81
Originally posted by: AbsolutDealage
Yea, I would not suspect many people that have as little experience as you have would have any overwhelming success with this project. Don't get me wrong, thats not a slam... it just that you need a heavy background in control systems, electronic design, and mechanical design to get a project like this off the ground. I did this my senior year, and we had a 5 person team doing this over an entire semester.... and even then we only had a marginally-working project.

For us, the mechanical design was our downfall, our control system and our electrical design was good but the pendulum track simply had too much friction for it to work properly. Anyways, this is a really ambitious project (its really friggin cool when it actually works though).

The mechanical system is not aq problem. The only think is getting the motor to work. Once it works, it'll be smooth flowing all the way. We managed to somewhat get it to move but it's very slow. :(
 

pillage2001

Lifer
Sep 18, 2000
14,038
1
81
Originally posted by: AbsolutDealage
how heavy is your pendulum? what material is it made of?

I believe it's less than 2 pounds all together......with the weight of the encoder itself too. The rod is made of brass I think. Only about 30-35cm long. Can't remember the details.
 

AbsolutDealage

Platinum Member
Dec 20, 2002
2,675
0
0
Brass? wow. Is that hollow or solid?

My initial suggestion to speed up the motor would be to knock down the weight of the pendulum. Try some hollow aluminum tubing (your system may not be able to keep up with such a light rod, but it will at least get you thinking about alternative solutions to the problem).
 

pillage2001

Lifer
Sep 18, 2000
14,038
1
81
It's hollow. The weight is just about right to get the pendulum to tilt. Not so heavy that it'll drop so fast. We're having problems moving the Motor. Can't seem to get the necessary current and voltage to drive the motor. :( Have drive transistors but no transistors we had will let 1.5amps go through it without frying it.
 

AbsolutDealage

Platinum Member
Dec 20, 2002
2,675
0
0
You could try a decent h-bridge (you can find a packaged IC that can carry ~3A for relatively cheap... try the LMD18200) powered directly from a transformer. That's what we ended up using.
 

pillage2001

Lifer
Sep 18, 2000
14,038
1
81
Everything was about done when we blew up the encoder. Do you guys know of any place where I can get an optical encoder for cheaps?? The Omron we bought was 41 bucks and the same part is about 500 bucks out there. :(