Show Posts
Pages: 1 2 [3] 4 5
31  Community / Exhibition / Gallery / Re: Binary Intervalometer on: July 04, 2011, 10:41:39 am
I still have a project in the back of my head to have a time-lapse system where by I have the intervalometer, plus a pan/tilt/move system on rails

That also is something I plan to build in the future. Mainly using some 80/20 hardware.

Check out Dynamic Perception's time lapse dolly, It's open source and may give you a few tips.
32  Community / Exhibition / Gallery / Re: Binary Intervalometer on: July 03, 2011, 11:02:51 pm
Very neat! any example photos you shot with this compact device?

Well, the short video after the image was the first test. I am going to try to get some good example footage tomorrow night for the fourth of July.
Hopefully with some sparse fireworks and a sun set if the weather co-operators.

Besides that, I'll  most likely be travelling somewhere later this summer, and I hope to get numerous time lapses when I'm away.
However I'm worried with the idea that the TSA might be concerned with this "device" passing through there airport as I have never travelled with a home-built invention before. Got any tips so I won't loose this awesome creation of mine to the TSA?
33  Community / Exhibition / Gallery / Binary Intervalometer on: July 03, 2011, 09:34:31 pm
I'm sure you all know what time lapses are. To take them you need an intervalometer, a device that triggers a camera at a desired interval. (There fairly expensive)

Anyway, I built one some time ago, a bulky Radio Shack project box with a bunch of wires, an Arduino Duemilanove w/ protosheild, a few buttons and knobs, flashy lights, and an LCD. It served me well, and it was never documented. This conspicuous-looking black box I could only imagine not to be the best thing to travel with at an airport.

So considering this, I built a small Altiods tin-sized intervalometer based around the Atmega328p and programmed through the Arduino IDE.
To set the interval, you need to set the 8 dip switches, each representing a single bit in a byte, to the desired interval time in seconds as represented in binary. It's simple if you understand binary.

The maximum interval time is 255 seconds or 4 minutes, 15 seconds.



Full schematic!!
http://www.flickr.com/photos/50241702@N04/5943905339/sizes/l/in/photostream/

Fully commented source (Great for beginners) -
Code:
// Binary Intervalometer
// By Physics_Dude
//
// Digi-pins 2 - 9 have dip switches
// Digi-pins 11 - 13 are for LED, focus, and shutter

// Set dip switch pins
const int buttonPin2 = 2;    
const int buttonPin3 = 3;
const int buttonPin4 = 4;    
const int buttonPin5 = 5;
const int buttonPin6 = 6;    
const int buttonPin7 = 7;  
const int buttonPin8 = 8;
const int buttonPin9 = 9;  

// Set led, focus, and shutter pins
const int ledPin =  13;  
const int focusPin =  12;  
const int shutterPin =  11;  

// Define default dip switch values
int buttonState2 = 0;      
int buttonState3 = 0;      
int buttonState4 = 0;      
int buttonState5 = 0;      
int buttonState6 = 0;  
int buttonState7 = 0;        
int buttonState8 = 0;      
int buttonState9 = 0;    

// Delays
long DelayVal = 0;  // Starting delay value
int hold = 100;  // Time shutter button is held down for


void setup() {
  // Inputs
  pinMode(buttonPin2, INPUT);
  pinMode(buttonPin3, INPUT);
  pinMode(buttonPin4, INPUT);
  pinMode(buttonPin5, INPUT);
  pinMode(buttonPin6, INPUT);
  pinMode(buttonPin7, INPUT);
  pinMode(buttonPin8, INPUT);
  pinMode(buttonPin9, INPUT);        

  // Outputs
  pinMode(ledPin, OUTPUT);      
  pinMode(focusPin, OUTPUT);      
  pinMode(shutterPin, OUTPUT);      
}

void loop(){

  // Turn all outputs off
  digitalWrite(ledPin, LOW);   // LED off
  digitalWrite(focusPin, LOW);   // Focus not pressed
  digitalWrite(shutterPin, LOW);   // Shutter not pressed

  // Read the states of the dip switch values:
  buttonState2 = digitalRead(buttonPin2);
  buttonState3 = digitalRead(buttonPin3);
  buttonState4 = digitalRead(buttonPin4);
  buttonState5 = digitalRead(buttonPin5);
  buttonState6 = digitalRead(buttonPin6);
  buttonState7 = digitalRead(buttonPin7);
  buttonState8 = digitalRead(buttonPin8);
  buttonState9 = digitalRead(buttonPin9);

  // Lazy math time!  
  // Bit 1
  if (buttonState2 == HIGH) {    
    DelayVal = DelayVal + 1;  
  }

  // Bit 2
  if (buttonState3 == HIGH) {    
    DelayVal = DelayVal + 2;  
  }

  // Bit 3
  if (buttonState4 == HIGH) {    
    DelayVal = DelayVal + 4;  
  }

  // Bit 4
  if (buttonState5 == HIGH) {    
    DelayVal = DelayVal + 8;  
  }

  // Bit 5
  if (buttonState6 == HIGH) {    
    DelayVal = DelayVal + 16;  
  }

  // Bit 6
  if (buttonState7 == HIGH) {    
    DelayVal = DelayVal + 32;  
  }

  // Bit 7
  if (buttonState8 == HIGH) {    
    DelayVal = DelayVal + 64;  
  }

  // Bit 8
  if (buttonState9 == HIGH) {    
    DelayVal = DelayVal + 128;  
  }
  // Full byte complete!

  // Convert to milliseconds
  DelayVal = DelayVal * 1000;

  //Minimum Delay is 1 second
  if (DelayVal < 1000)
  {
    DelayVal = 1000;
  }

  // Compensate for shutter press delay.
  DelayVal = DelayVal - hold;

  // Delay for "DelayVal" milliseconds
  delay(DelayVal);

  // Done? Now activate outputs!
  digitalWrite(ledPin, HIGH);   // LED on
  digitalWrite(focusPin, HIGH);   // Focus pressed
  digitalWrite(shutterPin, HIGH);   // Shutter pressed
  delay(hold);   // Time shutter is held down

  // Reset DelayVal
  DelayVal = 0;

}


Here is a short, uneventful demonstration of the device working.
http://youtu.be/FuPBKNC4i90


Here is a proper sequence of time lapse clips I put together from my vacation to New York. All of which were recorded using this project.
http://youtu.be/rqjRefAv3Us

Quick numerical binary lesson:
There are 8 bits in a byte
In order, each bit is equal to:
128 | 64 | 32 | 16 | 8 | 4 | 2 | 1

To read or write numerical binary values you add the sum of each active bit, indicated by a "1", and ignore the "0"s

Lets take 00101010 for example.
The active (1) bits are 32, 8, and 2
Add them up and you get 42

And to distinguish the difference between a 1 and 0, find the nearest power switch with a line and circle printed on it. You'll see that 1 means on and 0 means off.

34  Using Arduino / Project Guidance / Re: Arduino Intervalometer Power Consumption on: June 30, 2011, 12:44:57 am
Thanks again, I forgot the existence of long variables, It works now.

And the "Lazy math time!" comment was there for a reason, warning of a copy/paste routine that followed. smiley-mr-green
35  Using Arduino / Project Guidance / Re: Arduino Intervalometer Power Consumption on: June 29, 2011, 11:19:06 pm
Thanks guys, I think 3AAs will do me good.

However in troubleshooting my code, I realised that the Arduino does not want to delay any value over 32000 milliseconds. Any quick ideas, or should I start a new thread elsewhere?

Check out the code:
Code:
// Binary Intervalometer
// By Physics_Dude
//
// Digi-pins 2 - 9 have dip switches
// Digi-pins 11 - 13 are for LED, focus, and shutter

// Set dip pins
const int buttonPin2 = 2;    
const int buttonPin3 = 3;
const int buttonPin4 = 4;    
const int buttonPin5 = 5;
const int buttonPin6 = 6;    
const int buttonPin7 = 7;  
const int buttonPin8 = 8;
const int buttonPin9 = 9;  

// Set led, focus, and shutter pins
const int ledPin =  13;  
const int focusPin =  12;  
const int shutterPin =  11;  

int buttonState2 = 0;      
int buttonState3 = 0;      
int buttonState4 = 0;      
int buttonState5 = 0;      
int buttonState6 = 0;  
int buttonState7 = 0;        
int buttonState8 = 0;      
int buttonState9 = 0;    

// Delays
int DelayVal = 0;  //Delay value at startup
int hold = 100;  // Time shutter held down for


void setup() {
  // Inputs
  pinMode(buttonPin2, INPUT);
  pinMode(buttonPin3, INPUT);
  pinMode(buttonPin4, INPUT);
  pinMode(buttonPin5, INPUT);
  pinMode(buttonPin6, INPUT);
  pinMode(buttonPin7, INPUT);
  pinMode(buttonPin8, INPUT);
  pinMode(buttonPin9, INPUT);        

  // Outputs
  pinMode(ledPin, OUTPUT);      
  pinMode(focusPin, OUTPUT);      
  pinMode(shutterPin, OUTPUT);      
}

void loop(){
  
  // Turn all outputs off
  digitalWrite(ledPin, LOW);   // LED off
  digitalWrite(focusPin, LOW);   // Focus not pressed
  digitalWrite(shutterPin, LOW);   // Shutter not pressed
  
  
  // Read the states of the dip values:
  buttonState2 = digitalRead(buttonPin2);
  buttonState3 = digitalRead(buttonPin3);
  buttonState4 = digitalRead(buttonPin4);
  buttonState5 = digitalRead(buttonPin5);
  buttonState6 = digitalRead(buttonPin6);
  buttonState7 = digitalRead(buttonPin7);
  buttonState8 = digitalRead(buttonPin8);
  buttonState9 = digitalRead(buttonPin9);

  // Lazy math time!  
  // Bit 1
  if (buttonState2 == HIGH) {    
    DelayVal = DelayVal + 1;  
  }

  // Bit 2
  if (buttonState3 == HIGH) {    
    DelayVal = DelayVal + 2;  
  }

  // Bit 3
  if (buttonState4 == HIGH) {    
    DelayVal = DelayVal + 4;  
  }

  // Bit 4
  if (buttonState5 == HIGH) {    
    DelayVal = DelayVal + 8;  
  }

  // Bit 5
  if (buttonState6 == HIGH) {    
    DelayVal = DelayVal + 16;  
  }

  // Bit 6
  if (buttonState7 == HIGH) {    
    DelayVal = DelayVal + 32;  
  }

  // Bit 7
  if (buttonState8 == HIGH) {    
    DelayVal = DelayVal + 64;  
  }

  // Bit 8
  if (buttonState9 == HIGH) {    
    DelayVal = DelayVal + 128;  
  }
  // Full byte complete!


  // Convert to milliseconds
  DelayVal = DelayVal * 1000;

  // Compensate for shutter press delay.
  DelayVal = DelayVal - hold;

  //Minimum Delay is 1 second
  if (DelayVal < 1000)
  {
    DelayVal = 1000;
  }

  // Delay for "DelayVal" milliseconds
  delay(DelayVal);

  // Done? Now activate outputs!
  digitalWrite(ledPin, HIGH);   // LED on
  digitalWrite(focusPin, HIGH);   // Focus pressed
  digitalWrite(shutterPin, HIGH);   // Shutter pressed
  delay(hold);   // Time shutter is held down

  // Reset DelayVal
  DelayVal = 0;

}


36  Using Arduino / Project Guidance / Re: Arduino Intervalometer Power Consumption on: June 29, 2011, 06:26:01 am
Ah, I see CrossRoads,

I suppose I could go with a AA battery design.
I was originally planning for all this to be held in a small Altoids gum container, but now a regular Altiods tin seems fine. However in concern for space, could I power the 328 for a considerable time directly from 2 AA batteries instead of 3?
37  Using Arduino / Project Guidance / Arduino Intervalometer Power Consumption on: June 28, 2011, 10:41:43 pm
One of my first Arduino projects was an intervalometer used for taking time lapses. A very basic yet fully featured creation with an LCD and everything. However in planning for travelling this summer, this big RadioShack box full of wires and other conspicuous-looking stuff might not be very TSA friendly.

A new design I plan for is an atmega328 standing alone with a 16MHz oscillator. Alongside that are a small LED, 2N2222, and an 8 channel dip switch package.
The 8-channel dip switch is for setting the intervals in seconds with binary.

My question is weather or not I would be able to power the atmega328 and notification led with a single 3 volt CR2032 coin cell battery, and weather or not I could power it for very long. Any idea?

38  Community / Exhibition / Gallery / Re: My Arduino Web Server v2.0 on: April 20, 2011, 04:05:39 pm
Ok, I made some changes, again.  smiley-sweat
Please try again if you experienced the bug, and say whether it works now or not.
39  Community / Exhibition / Gallery / Re: My Arduino Web Server v2.0 on: April 19, 2011, 10:14:08 pm
Wow, very cool  smiley-cool
I might think about to build one for myself to have access to my data when I am not at home.
How about to use it as an download server (i mean just some sketches, nothing very big)

BTW, I am using Firefox 4.0 and the page is working fine. Just "About The Server" page is blank gray but no error message. (just fixed this since i blocked scripts  smiley-grin smiley-red

Thanks!

You can very well use an Arduino web server to download files like sketches and stuff,  but of course it will be fairly slow with anything over 100kb. Although I have successfully downloaded a 6MB file from the server in testing.

And I will try to reassess the problem with the web page's strangeness soon, now that I know it may be related to scripting.
Edit: Ok, I made a change to the pages, so I either made it worse or maybe I fixed it. Please don't hesitate to tell me if a page fails to load, or if you were one of the few who previously encountered a problem, try again to see it its fixed.
40  Community / Exhibition / Gallery / Re: My Arduino Web Server v2.0 on: April 08, 2011, 09:14:46 pm
Ok, a new update is out.
By somewhat popular demand, I have added a feature where the server now outputs sensor data (with a photocell)!! smiley-lol
41  Community / Exhibition / Gallery / Re: My Arduino Web Server v2.0 on: April 08, 2011, 12:18:02 pm
Quote
btw@physicsdude. I am in no way trying to diminish the coolness of your project - I find it your webserver awesome... I feel a bit bad that all the discussion in this thread has settled down to be about an odd bug... I guess its just human nature that instead of pointing out all the things that work, talking about something that doesnt work seems to be more interesting.

I understand and I'm fine with it. I just wish I had a soulition.
42  Community / Exhibition / Gallery / Re: My Arduino Web Server v2.0 on: April 06, 2011, 04:54:40 pm
Quote
Still have problems: Website loads for a few seconds ( also shows parts of the site),  and then firefox shows "connection lost".

Sorry, but I have tried multiple Internet Providers on multiple browsers, and never have I been able to recreate or find any problems. If anyone has a possible solution, please tell.
43  Community / Exhibition / Gallery / Re: My Arduino Web Server v2.0 on: April 06, 2011, 10:25:24 am
Do you think t could support video streaming even with some bad qulity video?

How does the comment thing works? You don't have any php or sql working with the Arduino so i don't see how it could work...

Streaming video? I've tried it, and it works, but it takes forever to load, even with the lowest bitrate. Same with audio too.

The comment thing is run third party from htmlcommentbox.com I dont fully know PHP and MySQL (yet).
44  Community / Exhibition / Gallery / Re: My Arduino Web Server v2.0 on: April 03, 2011, 07:30:18 am
Well I get the connection terminated too after it seems to start loading so whats causing that ?

Ok, I just changed something in the code that might help. Can you, or someone else who previously had the same problem, please try again and tell me what happens?
45  Community / Exhibition / Gallery / Re: My Arduino Web Server v2.0 on: April 02, 2011, 02:40:49 pm
Quote from: The Arduino
and a number (seen at bottom of the page) increments up on an LCD

I thought about it...

Then read...

Quote from: The Arduino
(Don't abuse it)

and refrained.

Very neat smiley

Actually, I would LOL. I wouldn't mind it really, unless someone starts going all smiley-twist smiley-twist smiley-twist with it.

Pages: 1 2 [3] 4 5