Intro: Time Lapse for Camera
I was asked to make a time lapse device for a Sony camera which has an IR Remote control.
Sorting the IR codes would have been time consuming if I hadn't found this excellent library by Sebastian Setz.
To program the timings into an Arduino would require a display & buttons - both of which I already have on my mobile phone.
Using MIT AppInventor2, I created an app to create the timings & use Bluetooth to send to the Arduino.
Step 1: Arduino & Bluetooth
I have included the Arduino code which is reasonably self explanatory. As per usual, my code is as tidy as an unmade bed !
The connections are few & straight forward - I was very lazy and used breadboard jumpers rather than soldering!
IR LED GND & D9
BT HC05 5v,Gnd, TX > D10, RX D11
To check the IR Led was wired correctly & working, I used the camera on my phone to 'see' the IR!
The Arduino receives trigger times & duration via HC05 bluetooth.
HC05's models seem to vary slightly in operation, some have a button for programming mode, others require a pin to be held low during reset !
Here is a most useful guide https://www.instructables.com/id/Modify-The-HC-05-B...
The only thing that may need checking /changing on the HC05 is the comms speed, the name & the password - all done via AT commands.
Step 2: The Android App
Google Mit Appinventor 2 for an excellent, FREE app maker - simple drag & drop programming.
I needed to set 'trigger' times & duration to send to the Arduino and display the current status.
Once the the time information has been sent to the Arduino, the Bluetooth can be disconnected.
It is possible to reconnect the Android to the Arduino Bluetooth mid time lapse operation to check the status.
I created a 'test' button on the app, this was so I could test the IR without having to set the time lapse settings.
Step 3: To Do List
There are a couple of very minor bugs in the code !
The duration time must be set for 1 second longer than required else the last picture will not be taken, ie, if you want to take a shot every 15 seconds for 3 minutes, only 11 of the 12 shots will be taken unless duration is set to 3 mins & 1 second !
The reset button successfully resets the Arduino, but (logically) disconnects the Bluetooth. I use the watchdog timer to physically reset the Arduino, it needs changing so it just clears the timer values.
I only use one on/off switch to power the Arduino and the HC05 Bluetooth board. The HC05 consumes unnecessary power as it is powered on for the duration of the time lapse. I should have used another switch so I could power it down after the commands had been received!
Plans to make the device send a trigger pulse on change of light, change of sound & movement are possible future developments!