# Halloween project - jack-o-lantern vision

**URL:** <https://forums.balena.io/t/halloween-project-jack-o-lantern-vision/4111>\
**Category:** Project help\
**Tags:** raspberrypi3, picamera, steppermotors\
**Created:** [October 8, 2018, 11:44am UTC](https://forums.balena.io/t/halloween-project-jack-o-lantern-vision/4111 "2018-10-08T11:44:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrisys](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/chrisys/32/1731_2.png) [@chrisys](https://forums.balena.io/u/chrisys)\
**Post date:** [October 8, 2018, 11:44am UTC](https://forums.balena.io/t/halloween-project-jack-o-lantern-vision/4111/1 "2018-10-08T11:44:43Z")

</div>

I thought I’d post progress here as I’ve a few interesting bits to share so far. So, my idea was to use a Pi with a wide angle night vision camera to detect the motion of passers by and use this to trigger a jack-o-lantern to watch/follow them as they walked past. Hopefully in a kind of spooky/creepy manner! Then maybe I can add lighting effects/sounds too depending on how well that first part goes.

I started devising some kind of mechanism to sit my pumpkin on that would allow it to rotate. I think I’m going to keep the camera fixed (rather than mount it on the rotating part) as it should simplify the tracking part to start with.

I came up with this (CAD in Fusion 360):

 ![29](https://global.discourse-cdn.com/balena/original/2X/4/4c45477f24fab0f30626282558143b1f509c943b.jpeg)

The idea being that the scary-looking spikes will stick into the pumpkin to hold it in place, then the plate sits in a bearing and can be rotated by a stepper motor with belt drive pulley underneath.

 ![IMG_1277](https://global.discourse-cdn.com/balena/original/2X/4/4cc272b39d8af55ffb8a3f1c6ebbd07f04284c09.jpeg)

About 32 hours of printing later I had the following. The bearing might be a little over spec as I think it’s a wheel bearing from a truck, but it works! 😄:

 ![Photo%2008-10-2018%2C%2012%2010%2011](https://global.discourse-cdn.com/balena/original/2X/e/e67a42970eb1e8c52a6177f8c5b26889c2b3bcc8.jpeg)

 ![Photo%2008-10-2018%2C%2012%2012%2005](https://global.discourse-cdn.com/balena/original/2X/a/ab46aff7af8fa9206be371fee217e341de7e04b0.jpeg)

 ![Photo%2008-10-2018%2C%2012%2011%2051](https://global.discourse-cdn.com/balena/original/2X/7/7b3fed64d27d37704e042a154433c820aba3932e.jpeg)

Now to work on the software and electronics!

---

<div class="post-metadata">

**Author:** ![chrisys](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/chrisys/32/1731_2.png) [@chrisys](https://forums.balena.io/u/chrisys)\
**Post date:** [October 12, 2018, 3:32pm UTC](https://forums.balena.io/t/halloween-project-jack-o-lantern-vision/4111/2 "2018-10-12T15:32:29Z")

</div>

Zero marks for effort on the pumpkin carving aspect of this project (so far):

 ![IMG_1288](https://global.discourse-cdn.com/balena/original/2X/c/c602f4aba354aaa452b658db6bf89f41d3beb2e3.jpeg)  
 ![IMG_1289](https://global.discourse-cdn.com/balena/original/2X/9/93f82263ebeb0d23c9cbe20eaf32abf363293239.jpeg)  
 ![IMG_1290](https://global.discourse-cdn.com/balena/original/2X/b/b09af69354afc45e507c66cecc16d19ffb6dad16.jpeg)

![IMG_1301](https://global.discourse-cdn.com/balena/original/2X/0/07ab1762c3ef6552e09c328b85f789aa98d5864d.jpeg)

---

<div class="post-metadata">

**Author:** ![chrisys](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/chrisys/32/1731_2.png) [@chrisys](https://forums.balena.io/u/chrisys)\
**Post date:** [October 12, 2018, 7:44pm UTC](https://forums.balena.io/t/halloween-project-jack-o-lantern-vision/4111/3 "2018-10-12T19:44:21Z")

</div>

I got some basic tracking working (just following a light). Next up is to move this to person/pedestrian detection!

---

<div class="post-metadata">

**Author:** ![chrisys](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/chrisys/32/1731_2.png) [@chrisys](https://forums.balena.io/u/chrisys)\
**Post date:** [October 30, 2018, 4:03pm UTC](https://forums.balena.io/t/halloween-project-jack-o-lantern-vision/4111/4 "2018-10-30T16:03:20Z")

</div>

OK so I have done a bit more work (time is running out!).

Got all the electronics to a prototype stage and off the breadboard:

 ![IMG_1356](https://global.discourse-cdn.com/balena/original/2X/b/be1e91a30124f2b0b95b292d4dcbee9d9a217e50.jpeg)

And actually carved a pumpkin, which now has a Sense-HAT for lighting purposes!

 ![IMG_1357](https://global.discourse-cdn.com/balena/original/2X/7/77cb7951366c96347f135138f24fc49906abf8a7.jpeg)
