Jump to content
wakewatcher

Mid Life Crisis

Recommended Posts

Well actually a late mid life crisis (53 going on 17 :) )

I need a diversion and this seems cheaper (in the long run) than an affair.

With all these neat things to do with microcontrollers and R/C it looks like a way to keep out of trouble. However researching this stuff is about to make my brain explode so I need some help. It started out when I ran across the pancam project. Looked like a great way to control a platformed based camera project I've got going (doing frame by frame dual angle sync'd football coaching video)

Anyway I'm building platform levelers, potential head tracking stuff etc. My son is doing the hard software stuff like video motion tracking. ie creating 1st and ten lines, overlaying the ideal play paths verses the actual play path ran. (Then again he works at Google and given the interview grind he went through I guess he's qualified.)

As for me 25 years ago I ended up with Masters in Computer Architecture and BS in digital EE. 30 years ago I was hacking assembler on a pdp 8. At Bell Labs I hacked unix to run real time for testing cellular phone base station software. All done in C. (However I can't even spell C++.) Then 20 years ago I got into managment and now the best I do is hack macros for Excel.

Pretty pathetic.

Anyway sorry for the ramble. But wanted to set the stage.

Recently I've started flying again. Mostly float planes and have been tinkering with PA-2's, Co-Pilots and U-Nav's Pico-Tilt but decided to get my hands dirty and start doing some of the lower level stuff myself.

Anyway...

First of all I'd like to make a couple of pancams so thought I'd get all the 'stuff' when I went to the PIC site it looks like all the 'stuff' is outdated and 'not recommended' etc. So not sure what to do there.

Second (and ultimately more important) is I want to get set up for on going microcontroller development. I want to be able to easily control servos and read servo to receiver data streams. I also want to be able to read and convert up to three analog channels. But most of all I want a dead simple development environment. You know something like BASIC. The two things I don't have is a lot of time or money but being 53 I have more money left than time left so I don't want something that takes me even months to come up to speed on.

So with that what should I do? Looks to be a zillion microcontroller options. Looks like PIC seems to be one that folks use a lot around here. Also AVR and I saw the post on the TI device. I would really appreciate some recommendations or maybe I missed a great forum for mC newbies. Again looking for something that is reasonably priced and next to zero learning curve. (I've got all the concepts down from days gone by but just don't want to spend my time writing assembly/C level interupt handlers if I don't have to.)

Thanks,

-steve-

Share this post


Link to post
Share on other sites
First of all I'd like to make a couple of pancams so thought I'd get all the 'stuff' when I went to the PIC site it looks like all the 'stuff' is outdated and 'not recommended' etc. So not sure what to do there.

If you want to use a "new" Flash part in PanCam, then use the PIC12F508/509. It is a recent part that is compatible with the PIC12C series. However, the project's specified PIC12C50x parts are easily purchased from Digikey and Mouser (and other suppliers), so there is no real need to change it.

Share this post


Link to post
Share on other sites

Thanks. So all I have to do is order something like the JDM programmer get some 12Cs or 12Fs and then get the MPLAB software to download the pancam object to the PIC? Right?

Share this post


Link to post
Share on other sites

I don't think that MPLAB can "talk" to the JDM programmer. You'll probably have to use the freeware apps that support that particular hobby programmer. Also, be sure to check the JDM chip support list to see if it will handle the chips you will be using. It can do the PIC12C50x's, but I don't know about the PIC12F50x's.

Share this post


Link to post
Share on other sites
I would really appreciate some recommendations

My recommendation will be ARM7, like Philips's LPC2138, 2148.

Check Paparazzi UAV project - they use the processor and they have published their code for RC channel control, GPS, etc, etc.

Share this post


Link to post
Share on other sites
If you want to use a "new" Flash part in PanCam, then use the PIC12F508/509. It is a recent part that is compatible with the PIC12C series. However, the project's specified PIC12C50x parts are easily purchased from Digikey and Mouser (and other suppliers), so there is no real need to change it.

I took your advice and went with your original parts. (12C508A) Had a lot of fun doing this as it was my first PIC project. Amazing little device and will come in handy for me. I do have a question. I'm going to be swinging around about 5 lbs of camera and the auto-center feature really slams the servo back to center fast. Is there a couple of bytes I could change to slow this down? Thanks again for a great device.

Share this post


Link to post
Share on other sites
Is there a couple of bytes I could change to slow this down?

For Mode 1 operation, address 0x014D has a "MOVLW 32" instruction. Try changing that to a MOVLW 16 instruction to cut the centering speed in half. Beyond that, I don't have any other magic bullets.

Share this post


Link to post
Share on other sites

You might consider changing servo's too. You may already have it nailed down but servos like the Airtronics 94738, Futaba S9405 et al are high resolution, lower speed and higher torque mechanical devices. They use coreless motors and metal gear trains. You might also look at the products from some of the robotics mechanical companies. Take a look at servo modification projects from http://www.servocity.com/ These slow down the mechanical action, and increase the torque. The servo city parts would allow you to use a servo like the Futaba S9001. There are other servos that will work too. I just know those ones off the top of my head.

I would recommend servo’s with coreless motors. You can get three pole, 5 pole or coreless motor servos. The three pole motor servos have the most obvious “stepping” action in a video system. This prevents fluid motion in panning when moving very slowly. 5 pole motors increase the resolution but it still “steps” from one position to the next. It’s not very obvious when you’re watching a control surface move. But it’s evident when you’re using the servo to pan a camera over a distant scene. The coreless motors lack the pole steps. They do cost more but are higher quality as well. They have the finest motion resolution or fluid action.

I admit to being programming deficient. I look at mechanical means. The software tweaking will work much better if your mechanics are matched to the work load. You came to the right place though in talking to Mr. RC-Cam.

Dan

Edited by kd7ost

Share this post


Link to post
Share on other sites

Thanks for the code change. (Does that also slow down the centering at power-up?)

I'm a bit baffled with regard to how it operates with different servos. On my Hitec 81 and 425 it behaves as what I'd considered expected. I move the stick and the servo starts moving. When I release the stick the servo stops immediately. However when using a 645 in a robotzone 5:1 geared power servo set up it takes a lot of time to stop the servo movement after release of the stick. In fact if I give it a quick full deflection and release it seems to take about a second to stop. That may be a problem for me as I'm planning on using the new, soon to be released, rototzone (servocity) camera mounts based on the same technolgy. I'm not sure I can develope a feel for 'leading' the camera if I can't count on the servos to stop when I release the stick.

Thanks for your help.

Share this post


Link to post
Share on other sites

Oops,

So much for my idea then. It sounds as though you already have a handle on the HD parts. It sounds like the 5 pounds mass of the camera, is keeping the servo in motion through inertia. The increased gearing is giving the mass an effective longer lever arm. I don't know the panncam device, but it sounds like when it's time to stop motion, center stick, that no pulses are being sent.

What if you try to operate the camera/servo device right off the receiver? Put in on a channel with a stick that spring centers and see if it stops it when the stick is centered or if it overshoots.

Dan

Share this post


Link to post
Share on other sites

Actually I don't have the camera mounted yet. Its just the servo. So really isn't much mass involved yet. I thought what happens with the pancam is when the stick is released then the pulsewidth continues where it last was which would in effect should stop the servo. (The pulse continues for sure as the servo has holding power when it stops.) So what may be happening is the geared servo (with modified feedback pot) is still on its way to where its going when the change in pulsewidth stops (just the change) so it has to continue its journey. I can tell already that its going to cause me to overshoot my camera movements. Drats!

Share this post


Link to post
Share on other sites
Thanks for the code change. (Does that also slow down the centering at power-up?)

No, it just slows down the centering speed when the center input pin is enabled. At power-up, the servo speed during initialization is not tweakable.

However when using a 645 in a robotzone 5:1 geared power servo set up it takes a lot of time to stop the servo movement after release of the stick.

I think kd7ost nailed the issue; perhaps it is inertia coupled with the gear train that is used.

Generally speaking, if you are using Mode 1, and if the servo continues to move after you release the stick, then that may also indicate that the servo's native mechanical speed is very slow (highly gear reduced). It is just finishing up the servo position that was commanded. If this is the case, then perhaps you can mask this by using your Tx's ATV/EPA mix to trick PanCam into operating in a way you like.

Share this post


Link to post
Share on other sites
Actually I don't have the camera mounted yet. Its just the servo. So really isn't much mass involved yet. I thought what happens with the pancam is when the stick is released then the pulsewidth continues where it last was which would in effect should stop the servo. (The pulse continues for sure as the servo has holding power when it stops.) So what may be happening is the geared servo (with modified feedback pot) is still on its way to where its going when the change in pulsewidth stops (just the change) so it has to continue its journey. I can tell already that its going to cause me to overshoot my camera movements. Drats!

Bummer. Drats is right. Sounds like you pegged it though. So in this case, it sounds like the transit time for the servo is too slow. Having pulses stay there will certainly prevent overshoot from coasting the gear train.

Can you increase the gearing any in the Robotzone device?

Maybe you can try a high speed servo to raise the transit time.

Do you need the full 90 degrees of motion in the servo unit? Maybe changing out the potentiometer to a different value, or simply adding some fixed resistors on the ends of the pot will provide less motion but increase the response time within that range?

Maybe you can move to a large 1/4 scale servo and go direct drive off that.

You might have to make your own servo/gearbox combination. There are a handful of good proportional H bridge speed controllers off the shelf.

http://www.dimensionengineering.com/

http://www.lynxmotion.com/

Just thinking out loud here. It sounds like you could use a servo made from a skill twist style cordless screwdriver with built in dual planetary gear boxes.

Dan

Share this post


Link to post
Share on other sites

No, it just slows down the centering speed when the center input pin is enabled. At power-up, the servo speed during initialization is not tweakable.

I think kd7ost nailed the issue; perhaps it is inertia coupled with the gear train that is used.

Generally speaking, if you are using Mode 1, and if the servo continues to move after you release the stick, then that may also indicate that the servo's native mechanical speed is very slow (highly gear reduced). It is just finishing up the servo position that was commanded. If this is the case, then perhaps you can mask this by using your Tx's ATV/EPA mix to trick PanCam into operating in a way you like.

Does the pencam chip continue to put out pulses based on last position information though? Or does it stop putting out pulses when you aren't moving the stick?

Dan

Share this post


Link to post
Share on other sites
It continues pulses to keep holding position under load.

Thanks for all the ideas.

OK, then it's like you said, it just hasn't made it that far yet. It seems as if inertia was making it overshoot, then it would stop and then move the oposite direction to come back to where the pulses are telling it to be.

It might simply be that with a well balanced unit you could get away with using a servo like one of these 1/4 scale versions.

http://www2.towerhobbies.com/cgi-bin/WTI00...L=++&search3=Go

Best of luck.

Dan

Share this post


Link to post
Share on other sites
Does the pancam chip continue to put out pulses based on last position information though? Or does it stop putting out pulses when you aren't moving the stick?

In Mode 1, it constantly outputs valid servo pulses at the normal framerate. The output servo pulse width is not based on the input servo pulse width. Instead, the Rx's servo pulse is integrated over time. The processed servo pulse is essentially controlled by the magnitude of the stick's position relative to neutral stick.

The Tx's stick is used to sort of "push" the servo towards the direction of intended travel. Servo speed is controlled by how far you move the stick. There is a demo video on the PanCam web page that shows it in action.

This is an old project that has not gotten much attention. I am surprised, because those that have built it really liked how it allowed them to control pan and tilt servos.

Share this post


Link to post
Share on other sites

For what its worth I think this is one of the coolest servo gadgets ever. I'm surprised that everyone doesn't use it for camera positioning particularily with non-geared camera mounts. Hope I can tame it for my pole mounted Canon gl2 camcorder. ;)

Share this post


Link to post
Share on other sites

In Mode 1, it constantly outputs valid servo pulses at the normal framerate. The output servo pulse width is not based on the input servo pulse width. Instead, the Rx's servo pulse is integrated over time. The processed servo pulse is essentially controlled by the magnitude of the stick's position relative to neutral stick.

The Tx's stick is used to sort of "push" the servo towards the direction of intended travel. Servo speed is controlled by how far you move the stick. There is a demo video on the PanCam web page that shows it in action.

This is an old project that has not gotten much attention. I am surprised, because those that have built it really liked how it allowed them to control pan and tilt servos.

I'm embarrassed to say I have a few of those chips programmed up but never used. One of each two flavors in fact. It seems like the Helicopter guys would use them the most. Where there are two operators. One for flying the machine and one for flying the camera. At the time I was designing my early UAV and thought I needed pan and tilt in a camera pod. I had a buddy of mine at HP download the files and program them for me.

In the end I use a standard Futaba 9001 servo for tilt, and my rudders for panning. It’s a lot less complicated and allows me to be the camera and aircraft operator both. I also recently discovered, thanks to my buddy Mike Robinett, these servos by Jim Frye at Lynxmotion.

http://www.lynxmotion.com/Product.aspx?pro...9&CategoryID=38

They are cheap and come modified for continuous rotation. The cool thing about them is they come with a pretty large dead band built into them. Once you center the trim tab properly, they don’t hunt or move. There’s a small amount of stick motion required before they get under way. They do suffer from not getting held in place though due to the removal of the feedback circuitry so are only good in low force application. They will move if you put a little pressure on them.

That is certainly what sets your project apart though. With the pulses holding it in last position it’s a more professional approach I think. Someone can fly the helicopter with some serious G’s and the camera won’t get spun around. (Now that I’m caught back up on how it works) I would venture that the reason it’s not as popular is because AP helicopter guys are more interested in ready to use off the shelf applications. The DITY projects are for the few hardcore builders.

Anyway, sorry I’m getting off thread topic here.

Dan

Edited by kd7ost

Share this post


Link to post
Share on other sites

I was wondering if it would be possible to hook up a pot to the pancam to vary the, for lack of a better work, attack (slew?) rate, so that it could work with these nifty geared pan-tilt servos. http://www.servocity.com/html/pan___tilt_systems.html

As discussed above when you release the stick geared servos keep going until it catches up with the pulse width. Is there anyway around this? Thanks.

Share this post


Link to post
Share on other sites

The PanCam doesn't have a adjustment for the integration term within its code. I'll keep this request in mind in case I re-spin the code in the future.

I don't have any experience with massively gear reduced mechanics. So, I cannot see the problem for myself. My servocity gear reduction was ~3:1, and I also use common servos, both which work nice for me.

Long story short, I can't offer any workarounds at this time. It seems to me that less mechanical gear reduction would eliminate this effect (because the servo's positioning would operate faster), so keep that in mind.

BTW, the new V2.0 has a gentle auto-center feature. It was an issue brought up earlier in this discussion.

EDIT: I'll look over the code today to see if there are is a quickie solution to support your application. If I do this I would need some immediate feedback to see if I am on the right track. Do you have several spare PIC12C509's (or a PIC12F509) and a programmer?

Edited by Mr.RC-Cam

Share this post


Link to post
Share on other sites

Thanks. Yes I do have a few extra pics but I'm out of town until Thursday. My current Servo City gear has a gear reduction of 5:1. (It appears that the new pan-tilt setups have similiar reductions. I don't know that I need something that geared but I do know that another advantage is that it slows them down on take off. I'm currently also using a Bescor MP101 pan-tilt device and its cheap but even at slow speed it takes off a bit to fast. (What I'd really like is to figure out how to modify the MP101 for true motor control. But alas I can't even figure out how to take it apart. :huh:

Thanks again!

Share this post


Link to post
Share on other sites

I looked over the code and I didn't see an obvious solution. I assume it is happening because the PanCam expects that the servo can keep up with the position commands. A heavily geared servo will not be able to do that because the gearing effectively delays the servo.

I have not personally witnessed your problem, so I would need a duplicate of your geared servo setup to experiment with. The solution may get very complex, software wise, especially if it would involve calculating interim pulse widths when the Tx stick was released before the servo was done moving.

Until I have a servo mechanics like yours in my hands it may be best to reduce the gear ratio. Perhaps 2:1 would be good.

Share this post


Link to post
Share on other sites

Thanks for looking. I was just thinking that perhaps at initialization you could read an a/d port with a pot hooked up to it and then use that value to attenuate subsequent rate of stretching of the pulse until the stick is released. So by fiddling with the pot one could tune it to the gearing. Probably more complicated than that. If I use 2:1 gearing is it possible to move the servo very slowly? That's the problem with the Bescor. It can move slowly but its still a step function from zero speed to slow speed.

Thanks for the help. -steve-

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×