ekimrolyat
Posts: 1
Joined: Mon Jul 13, 2015 8:12 pm

flash led in motion-mmal

Mon Jul 13, 2015 8:44 pm

Been trying for days to find out how to get motion-mmal to make external led's flash. Motion is otherwise working fine, using it for stills only (no movies) to detect varmints in my basement. The NoIR camera detects motion in flat blackness (to the eyeball) and takes pictures - which are flat black from insufficient light. Need to get it to flash. I have led's on a breadboard blinking using Python via GPIO 17 across an optocoupler to 9 volts driving a bank of 8 white led's - so the system works with the 3.5 volts supplied by GPIO 17.

I also have successfully followed all the getting, installing, modifying and compiling for picamera flash in "https://picamera.readthedocs.org/en/release-1.10/" and have the led on the rpi itself blinking appropriately but again the external led's won't go. The suggested line "[email protected] { function = "output"; termination = "pull_down"; }" pulls the voltage to zero and my optocoupler wants 1.5 volts so I tried setting "pull_down" to "pull_up" but that didn't make them blink either.. That's when I tried the info near the bottom of this section and proved it will operate the led on the rpi.

I have ransacked the motion-mmal.conf extensively and find no flash option. I have searched all over the Net for the actual uncompiled source code for motion-mmal but find only motion-mmal.tar.gz. It was written by Dozencrows and I find no way to get thru to him to ask.

Any and all help/suggestions/criticism welcome.

Ekim Rolyat

User avatar
dozencrows
Posts: 172
Joined: Sat Aug 04, 2012 6:02 pm

Re: flash led in motion-mmal

Wed Jul 15, 2015 10:54 am

The source code is in Github, there have been links posted to it in other threads on this forum - here you go! https://github.com/dozencrows/motion/tree/mmal-test

Using flash is an interesting idea, and has some challenges. For accurate timing, you'll probably need to modify the motion code. And bear in mind that the flash will affect subsequent motion detection, as it will change the image. You could get a situation where it continually triggers the flash because it thinks each flash-illuminated frame is futher motion.

As you're using the NoIR camera, have you considered using an array of IR LEDs to provide continual illumination? Something like this - http://www.amazon.co.uk/Infrared-Illumi ... lluminator

I wouldn't bother with the Bright Pi - I've tried one, and it doesn't illuminate very far.

Return to “Advanced users”