This purpose of this project is to provide some information about the mini DVR, not a detailed guide on how to make an infrared video camera and recorder. The full animal video build may be detailed in another project.
Lookalike mini DVR's are sold under a few brand names. I chose one branded OCDAY and sourced it from eBay. I wanted to see if it was fit for the purpose of making video recordings of nocturnal animals that visit my suburban yard by interfacing it with a PIR sensor and infrared capable camera using an Arduino Nano MCU. Information presented is based on the unit as bought - this information may not necessarily apply to other units which appear to be identical.
The OCDAY DVR comes without any SD card but with a complete set of pre-wired cables for the external connections. The supplied manual is in English and is adequate if you operate the unit via the pressbuttons but has no information about operation via the external connections.
Videos are stored as .AVI files.
THE CAMERA SETUP
The animal camera major components are an Arduino Nano, mini DVR, HC-SR501 PIR module, HW-411 voltage regulator, a pair of reed relays and a cheap infrared camera.
The camera needs about 100mA at 9volts but all other components run off 5volts.
The HC-SR501 was chosen over the smaller HC-SR505 because it has adjustable sensitivity and adjustable output signal duration plus my A-B testing showed the HC-SR501 to be more sensitive.
The DVR requires about 190mA at 5volts. The Arduino, HC-SR501 and the reed relays add about 50mA An LM7805 regulator fitted with a TO-220 heatsink and supplied with 9volts would start reducing the voltage after a short time as it warmed up. To ensure good supply, an HW-411 regulator was chosen.
I found a few "gotchas" in the operation of the unit and thought I might pass them on to save others from the frustrations that I had in getting up to speed with this, potentially useful, device.
The first "gotcha" with the DVR was its sensitivity to SD cards. The DVR would not work as needed with the first card tried. The card was a known working unit taken from a still camera. To get the DVR to work with the first card, it had to be powered on and then have the card removed and reinserted. The second card worked fine. The difference in the cards is not known - perhaps speed.
The second "gotcha" is the pin labelling. On the unit tested, two of the pins on the external wiring plug are labelled in reverse to the press button labels (see the photo).
The third "gotcha" is the bootup time of the DVR. The unit tested took 7 seconds after power-on before it would accept inputs via the external control wiring. This latency could be eliminated by having the DVR run in permanent standby and use the PIR to trigger the recording. The test setup did not use this technique but turns the DVR and camera on at PIR trigger, waits 8 seconds and then starts the recording . Recording is stopped 1 second before powering down the DVR to allow the DVR to do its post-recording activities.
In standby, the DVR external control pins have 3.3volts present. Arduino Nano outputs are at 5volts and so diodes are used between the Arduino and the DVR control pins to prevent 5volts from being presented to the DVR pins. It is not known whether the DVR pins are 5volt tolerant but 3 cent diodes are much better than the risk of blowing up a $20 DVR.
The control pins are activated by earthing the pin by setting the Arduino pin to LOW for 120mS. 80mS is a bit iffy but at 120mS the operation is quite solid. According to the...Read more »