Thursday, June 27, 2013

Part 2: Wrapping Up the Cable Release Project


PREV: PART 1
READ FROM BEGINNING: PART 0 

P A R T 2,   W R A P P I N G   U P

It's time to wrap up this project. Another plus from using the ?auxilary flash?  case to house my project is that it has it's own battery compartment. It takes 4 AA batteries to make 6 volts. I've been thinking about this for a while, and the servo runs just fine off 6 - 4 volts. However, my precious processor doesn't (2.7 - 5.5).  

Can't use a 7805 voltage regulator as it needs at least 7v to output 5v. 
Too lazy to buy a low drop out regulator.

I've decided that I want to use a Diode to drop the tiny's supply voltage.

For those that don't know what a diode is, it's a component that only lets current flow in one direction. And in addition to only letting current flow in one direction, there must be a constant voltage drop across it. (Something that has to do with electrons jumping the electron band gap for ya'll with a chem 101 background). Another interesting fact is that with a diode, voltage and current are independent to each other.. they do not follow ohms law. So by putting a diode in front of my processor, I drop the voltage by about 0.7v (almost all diodes have this voltage drop). What's going to keep me up at night is the inefficiency of this, because the diode consumes power by V * I = watts consumed.

P I C T U R E S

Lets face it, people wanna see the good stuff first

































Whew! You made it to part 2. You deserve my source code: 
Git Hub

Some things to mention about my code:
  • There's an example of how to get servo control running on a 4313 chip at 8MHz 
    • The servo code is messy, I do not use Timer1 to its full potential, you can potentially have two servos running at once, I didn't write that code, but it should be easy.
    • I tried to "inherit" the Timer1 fast PWM code that I wrote since the servo uses fast PWM, so you'll see that I over write register that I had just written to in another file.
  • I don't think the delay functions work properly, you are better off using the <util/delay.h> ones. 


2 comments:

  1. This is pretty nice work. I like that you didn't modify the camera itself at all.
    My only question is, doesn't the servo introduce some camera shake when it activates?

    ReplyDelete

  2. I didn't notice any obvious shaking when I was testing it. I'm glad you liked my project!

    ReplyDelete