Jump to content
Sign in to follow this  
matt116000

RC Cam project inspired system for UAV

Recommended Posts

Hey guys,

After reading all about the RC Cam projects I decided to integrate it into my final year thesis for a UAV.

It uses a microcontroller (pic18f452 PicDem 2 plus board) and I got an Aiptek Pocket DV T300 (because I am in Australia and its one of the only Aiptek cameras I can get - except for the 5900).

I hooked it up like the RC Cam site says except that the Pic board has its own power and instead of using an RC servo to trigger I toggled the pin low for 500ms every second. Also the camera had its own 2xAA (3V) battery supply.

But, Problems!

It worked once but then,

The pic fried the shutter circuit. Now the whole camera shuts down when the button is pressed.

I thought it might have been a once off thing so I rigged it up to the video shutter and then it killed 2 SD cards.

I then thought it might be that the pic pin goes back to 5V when the shutter was using about 3.3V but thats what the RC Cam projects do.

Or, I was cycling the pin too fast for it too store the pics/vids.

I've ordered another DV5900 and I REALLY don't wanna fry that one too. Please help.

Thanks heaps,

Matt

Share this post


Link to post
Share on other sites

On the 2 cams I've modded, the first thing I've done was measure the shutter signals. Both times the switch was grounding a 3.3V pulled-up line.

So what I did was program my controller (that was powered by the receiver's 5V) to output a logic low when wanting to trigger, and turn the port as input (floating) in idle state. That way it would never apply 5V, and the camera's pull-up would fix its 3.3V just like if nothing had changed. I believe sending 5V into there wouldn't be a good idea, at least if you don't have a series resistor between.

Share this post


Link to post
Share on other sites

Thanks for the reply.

Is that what the Cam Man Projects do?

Is there an order in doing this?

like...

1. Set pin to output

2. Set pin logic low

3. Hold for small time. (how long did you hold low for? 500ms?)

4. Set pin to input

Or should 1. and 2. be switched to make sure when it goes to output its not logic high?

Cheers,

Matt

Share this post


Link to post
Share on other sites

Yep, set to logic low first, then switch to output.

On my camera, holding the shutter down will take multiple pics (continuous mode) which I like to use, so I just leave the output down as long as the trigger switch on the R/C is depressed. When it's released the pin is turned to input again.

I don't know about the CamMan, we'll let the creator answer that one :)

Share this post


Link to post
Share on other sites

The CamMan shutter output does not source current, it only sinks it. Please follow Kilrah's code technique recommendations to avoid damaging your camera.

Share this post


Link to post
Share on other sites

Success!

Interestingly though (at least on the pic & setup I'm using) I needed to set to logic low again after making it output

otherwise the camera didn't respond.

Maybe I don't need the first one but I'm not gonna risk it - one line of code, a few clocks Vs. potentially dead cam...hmmm

i.e:

void start_pict(void)

{

PORTDbits.RD1=0;

TRISDbits.TRISD1=0;

PORTDbits.RD1=0;

}

void end_pict(void)

{

TRISDbits.TRISD1=1;

}

The pic now takes a picture, reads sensors on ADC, reads in GPS via serial and stores to external EEPROM.

Thanks again for your help on this Mr RC Cam and Kilrah.

Regards,

Matt

Share this post


Link to post
Share on other sites

I guess it's just a question of compiler behaviour. Maybe the first "PORTDbits.RD1=0;" gets ignored by the compiler because the pin is defined as an input at the time of the instruction, and it thus isn't a valid context. Anyway even if the pin gets logic high in the process it would only be for not even a microsecond so there's not really a risk of damaging the cam.

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
Sign in to follow this  

×