Skip to content

curiouselectric/Lapse-O-Matic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solar Powered ESP32 Camera For Wildlife and Time-Lapse

This is code, PCB and enclosure design for an ESP32_CAM based, solar powered wildlife camera

This unit is based on the ESP32_CAM.

Code has been written to upload onto the ESP32.

Control of the unit is through a "settings.txt" file on the SD card.

The unit can either be in "LAPSE" mode (where it wakes up every set period and takes a photo/number of photos) or it can be in "TRIGGER" mode where it will take a number of photos when the unit is triggered. It will then go back to sleep.

Triggering can either be done with a PIR, or with an external switch.

This unit has an input for a small solar panel to recharge an 18650 Li Ion cell, so it can be left for remote monitoring.

A flash can be implemented, with a start and stop delay to adjust shadow effects.

This code relies heaviliy on the following tutorials and information:

ESP32 Code

Please follow these instructions for setting up your arduino IDE to upload code to the ESP32_CAM.

There is no USB connection to the ESP32_CAM, so I used this nice programmer from Tindie (around £10 UK): https://www.tindie.com/products/bitluni/cam-prog/

The code starts by reading the settings.txt file on the root directoy of the SD card. If the SD card fails to mount, then the unit will go to default settings, which will mean sleeping for 10 seconds then trying the SD card again. If there is no settings.txt file then the unit will use the default values (stored in the config.h page of the firmware).

Settings file

Here is an example settings.txt file:

// Adjust these settings as required: //
FLASH_FLAG=1
NUMBER_PHOTOS=4
TIME_TO_SLEEP=800
MODE=TRIGGER
PHOTO_DELAY=250
FLASH_START_DELAY=100
FLASH_STOP_DELAY=100
DEBUG_FLAG=1
DEBUG_PHOTO=1
// END OF SETTINGS - LEAVE THIS LINE  //
  • FLASH_FLAG - Use a flash with the photo? (0 (OFF) or 1 (ON))
  • NUMBER_PHOTOS - How many photos to take when waking up?
  • TIME_TO_SLEEP - How long (in seconds) between wake-ups (when in SLEEP mode)
  • MODE - The mode to use is either LAPSE (wake up every TIME_TO_SLEEP seconds) or TRIGGER (either wake up on PIR trigger or external trigger)
  • PHOTO_DELAY - delay (in milli Seconds) between taking the photos.
  • FLASH_START_DELAY - Flash will switch on then wait this time before taking photo (in milli Seconds)
  • FLASH_STOP_DELAY - Flash will be on and wait this time after taking photo (in milli Seconds)
  • DEBUG_FLAG - See debug info on serial port (0 (OFF) or 1 (ON))
  • DEBUG_PHOTO - See debug info on serial port (0 (OFF) or 1 (ON))

Note: Spaces can be used in the WIFI SSID. Do not use spaces around the equals sign.

Solar Power

This unit has a sinlge 18650 lithium polymer cell for power. This has a battery charging circuit using one cell PV module.

Based upon the BQ24210 800mA, single-input, single cell Li-ion Solar battery charger from Texas Instruments:

https://www.ti.com/sitesearch/docs/universalsearch.tsp?searchTerm=BQ24210#q=BQ24210&t=everything&linkId=1

PCB design

PCB is designed in KiCAD.

A Real Time Clock (RTC) has been added to use as a timestamp on the photo files. This can also be used for the timing of the unit wake up.

WiFi Upload

This unit uses ReadyMail from mobizt to send photos via an email SMTP server to any email address. You must set up your own email from which to send photos (I used gmail).

This is not always totally reliable, especially if any reception issues. But photos are still saved on the SD card.

More information

There is lots more about this project at this blog post:

https://www.curiouselectric.co.uk/blogs/blog/prototyping-a-wildlife-camera*

About

This is code, PCB and enclosure design for an ESP32_CAM based wildlife camera

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages