Jump to content
moelski

RC-CAM build with AVR

Recommended Posts

Hi -AT-all!

Because I´m not really a freind of PICs I spend some time yesterday to build up a RC-CAM Module on AVR basis. I used an old AT90S2313 for this. After I studied the RC-CAM informations I got the most things working really quickly:

- rc signal is detected correct

- I understand the working of my GSmart Mini 3 Cam

- I wrote some simple routines to set the buttons from the cam to 0 or 1 (with this I can switch on the Cam and take photos)

But I have still a little problem. I will use your photo to explain my prob ...

bk_pic1.jpg

So what I am doing is the following:

- I set the portpin to 1 / High (in your pic it is G) and the cam switched on

- After 100ms I set the portpin to 0 / Low

- If I want the cam to switch off I set the Portpin to 1 again

And here is my problem: the cam don´t shut down. It is still powered on.

I take my multimeter and measured the voltage at this pin. If I switch on for the first time the pin is at about 4-4,5V.

If I want the cam to switch off there are only about 500-700mV. This is why the cam don´t switch off.

But what is the cause of this very low voltage? If I cut the cam (pin G) from my µC everything works fine. I have always ~4V.

Also I added a resistor (330 Ohm) between µC and Cam (pin G). But the effect is the same.

Has anyone an idea why the voltage is so low in this special case?

Greetz moelski

Share this post


Link to post
Share on other sites
- After 100ms I set the portpin to 0 / Low

Never drive the signal low. The microcontroller should TRI-STATE instead when the signal is idle. This can be done by switching the pin to an input. This may not help your problem, but it will prevent future issues.

As far as your problem goes, I suspect the voltage your microcontroller is using is not the same as the voltage running the camera's internal electronics. Connect your microcontroller's power pins as indicated in the published project.

Share this post


Link to post
Share on other sites

Hi !

-AT-Mr.RC-Cam :

Thx for the informations. I will see what I can do.

And u are right. The cam is about 3,7V and my µC runs at ~4,5-5V.

Why is this such a big problem?

Share this post


Link to post
Share on other sites

Because the external microcontroller will source voltage into the camera that can force it to exceed the Vcc used by the camera's native circuitry. This will cause havoc and may even damage things if it is abused.

The grounds (0V) must also be at the same potential (relative to each other), so be sure to connect your microcontrollers ground as shown in the CamMan project info.

If you are using a In-Circuit Emulator (ICE) to debug your software, it will need to be set to the same voltage as is used in the camera. Otherwise, the same sort of issue will exist. No doubt there are other things to worry about too -- there are many cautions when it comes to this sort of stuff.

Share this post


Link to post
Share on other sites

Hi !

Well I connected Vcc from the µC and the cam together. Also I changed my Cam_On procedure. This is what I wrote (Bascom):

Sub Kamera_an_aus

  Config Pind.2 = Output                                    'set pind.2 as output

  Set Portd.2                                                    ' set portd.2 to 1 / High

  Waitms 100                                                  'wait 100 ms

  Config Pind.2 = Input                                       'set pind.2 as input

End Sub

But the result is the same. I can´t switch off the cam. The Pin to G is like before at about 200-300mV if I set him to 1 / high.

Could you switch off the cam with your pic? Any furter ideas?

Share this post


Link to post
Share on other sites
The Pin to G is like before at about 200-300mV if I set him to 1 / high.
That means the port's pin is not able to source sufficient current. You might want to look at the AVR data sheet. Only a few hundred microamps can be supplied from that microcontroller's output while logic high.

But since the AVR can turn on the camera, there is really no problem. Turning off the camera is not something that is necessary. It will soon turn itself off if you stop taking photos.

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

×