Candy Cane Dispenser

That is interesting. Not sure how it would know how many canes are left. One thing that I would need to do is KISS, because my kids help me fill it, and I can't depend on them to reset some sort of counter each time (they are 7 and 5).

Buuuut, getting notified every x button pushes would be pretty sweet. What all do you think would have to go into getting something like this to work. I play with PICs, Arduino, Pi's, ARMs, etc., But I've done absolutely nothing with the ESP stuff (including reading up on it).

Sent from my SM-G955U using Tapatalk

Hi, the links below will give you an idea of what is involved. It would be quite a simple task, the links show controlling LEDs but it was mainly the web page that I wanted to show you. Just thinking out loud – you could detect the motor powering up through an opto isolator and deduct one from the candy cane count stored in eeprom memory every time it does. A switch on the lid could reset the count to its maximum when opened. All you would need to do is log onto the web page to check the quantity, like most thing there are lots of ways to tackle this.
I prefer the Wemos D1 mini to the NodeMCU listed in the article, it’s the same thing just from a different supplier.
https://shop.rasp.io/products/wemos-d1-mini-esp8266
You can find them for a lot less than the price on that link.

https://lastminuteengineers.com/esp8266-nodemcu-arduino-tutorial/
https://lastminuteengineers.com/creating-esp8266-web-server-arduino-ide/

With regard to a camera option I’ve used MotionEyeOS on a Raspberry Pi Zero W which works well.
https://randomnerdtutorials.com/install-motioneyeos-on-raspberry-pi-surveillance-camera-system/

I’m away for a few days now but if you need help with the ESP8266 PM me.
 
Hi, the links below will give you an idea of what is involved. It would be quite a simple task, the links show controlling LEDs but it was mainly the web page that I wanted to show you. Just thinking out loud – you could detect the motor powering up through an opto isolator and deduct one from the candy cane count stored in eeprom memory every time it does. A switch on the lid could reset the count to its maximum when opened. All you would need to do is log onto the web page to check the quantity, like most thing there are lots of ways to tackle this.
I prefer the Wemos D1 mini to the NodeMCU listed in the article, it’s the same thing just from a different supplier.
https://shop.rasp.io/products/wemos-d1-mini-esp8266
You can find them for a lot less than the price on that link.

https://lastminuteengineers.com/esp8266-nodemcu-arduino-tutorial/
https://lastminuteengineers.com/creating-esp8266-web-server-arduino-ide/

With regard to a camera option I’ve used MotionEyeOS on a Raspberry Pi Zero W which works well.
https://randomnerdtutorials.com/install-motioneyeos-on-raspberry-pi-surveillance-camera-system/

I’m away for a few days now but if you need help with the ESP8266 PM me.

Great info thanks for sharing


Sent from my iPhone using Tapatalk
 
I'm baaaaaack.

I wanted to come back with a little info. I don't know if I'll go this route, but I is my current plan. I call it the CandyCam (yeah, a dumb play on the work Candy Cane).

It is a webcam out of an old laptop, if you dig around eBay, there are LOTS out there. If you are to go this route, get one with the cable still attached, they cost a few dollars more usually, but the connectors are REALLY small and make soldering and probing a pain. The first one I bought didn't have any cables or even probe points, so it was a pain in the butt and seemed to die a slow death from me soldering and re-soldering, and making poor assumptions on pinouts. Some of the webcams also have a mic, but I didn't pay attention to that.

The webcam I am currently using is out of a Samsung NP-R730 laptop. It is part number BA59-02690A (that is the camera all the way on the right in the black circle).
20200129_152119b.jpg

From experience now, I can tell you that there is no rhyme or reason for the pinout or color coding. For me, the fact that this unit had test probes AND a cable, is what made me choose it.
20200129_152131_b.jpg
Looking at the above image, you can see my probing the test points a bunch. The easiest thing for me to do was find the ground point. Set up your multi-meter for continuity mode, pick a probe point (or a wire on your cable if you don't have a probe point), and drag your other probe across different places on the board. The ground is going to show up all over the place: the crystal's case, as a ground point for the ICs, some of the caps, grounded mount points if your board has them (mine does not). Once you figure out ground, mark it down. Next, you want to find your 5V VCC point, this is a little trickier. You would think that you could do the same thing for VCC and the ICs, but a lot of the boards have an LDO or voltage regulator that drops the voltage, so that isn't always simple. Try to find an IC up front and probe it out. When that is done, all that should leave is the two data pins for the USB. The data pins were pretty simple since I had a cable, that's because the wires are usually a twisted pair. Another way to figure it out is to probe that conformal coated part just to the right of the "94V-0" silkscreen. I think that is a SMD TVS Diode for ESD protection (both I played with had them). For this particular board, VCC was on the black wire at the top (yeah makes perfect sense.....), Ground is orange, and the two data lines were brown and red. I didn't know which was D+/D-, so you have a 50% chance of getting it right on the first try. If you don't make a connection when you connect it to a PC, swap those two. Below you can see the connection from the PCB's cable to the cable of my micro USB cable (I'll explain why micro USB in a minute).

20200129_152159_b.jpg

The simplest thing at this point is to plug it into you PC. If you are lucky your PC will recognize a webcam. If you are kind of luck, it will recognize a USB device, but you will need a driver for it. If you are really unlucky, you will have backwards data lines (which you will need to swap), or you did something wrong. I find Linux recognizes webcams automagically way more often than Windows. I didn't want to risk screwing up my USB port on my laptop (if I REALLY screwed something up, so I plugged it a USB Zero W I had lying around (hence the micro USB plug need mentioned above). Success, it saw it immediately!

After doing some researching an weighing some options, I decided to blow away my Pi's SD card and install the MotionEye OS on it. This is a pretty sweet OS designed to run on all sorts of systems (make sure you grab the right release build for the hardware you are putting it on), that is a GUI front-end for the Motion webcam project (a lot of this stuff is popular with the DIY security system crowd). It allows for motion detection, timelapse videos, live views, guest live views, etc. Very neat. I've had it running in my workshop for about a week now and it seems pretty seamless. I don't know how long I'll keep it up, and I don't have it pointed on me, but I do work from home, so the lights are on during work hours usually. I'll keep it up for a week and then delete this part from the post.

Hope this is helpful. Like I said, I am not sure I will go this route, but I thought it was pretty neat. The streaming is pretty clear (good enough for a ~7 year old webcam), responsive, and the admin login has TONS of settings and better quality that the user mode. I am not sure how well this will work in the cold of winter (I suppose I should put this outside since it is still winter.....), but it was pretty chearp. I think I am going to slide it into one of those M&M candy cane looking containers and putting it into the corner of my dispenser (so it will out of the elements, have power present, and I can hide the Pi in the sidewall where I keep the rest of the electronics for the prop anyway.
large_ea2dff1f-fc8b-4a85-8042-7b8c206b2c88.png


The live view is http://toozie21.no-ip.org/.
 

Attachments

  • 20200129_152119.jpg
    20200129_152119.jpg
    83.7 KB · Views: 18
Last edited:
I'm baaaaaack.

I wanted to come back with a little info. I don't know if I'll go this route, but I is my current plan. I call it the CandyCam (yeah, a dumb play on the work Candy Cane).

It is a webcam out of an old laptop, if you dig around eBay, there are LOTS out there. If you are to go this route, get one with the cable still attached, they cost a few dollars more usually, but the connectors are REALLY small and make soldering and probing a pain. The first one I bought didn't have any cables or even probe points, so it was a pain in the butt and seemed to die a slow death from me soldering and re-soldering, and making poor assumptions on pinouts. Some of the webcams also have a mic, but I didn't pay attention to that.

The webcam I am currently using is out of a Samsung NP-R730 laptop. It is part number BA59-02690A (that is the camera all the way on the right in the black circle).
9pw_LLqTLd1X8e1zSDbKPC4V9Jt51zhUhX2fEiGdkAx-IE44Ag0VpErtP3zQUXl0evvCipKfGzMSZDAAPRE6Mm9Fm0NhlAVTLYkkghvYjZEqq_nJZwzKWSBp6Zs6ybsQrNo-i-rmxcb0qd8VlGkpNTU5T-ilY-6vzPNe9E8ylow2RTzLgRu3XjDH9m431NKXqbcSRCCSX0_YWY1e3pdUnCgE9APvO9s8I5tnEvyidedrn264otQrIx62f1LJgEXVxj3ZflkE3acQtykzwyCTpPFgzM5vWAD7fRiTCYGXpqxBDCpkaz-WSpnxgttZOiTgmbqCSHJDb__ZwPBG9tNfqPhhCUhipIHCELb_l63tqINDO0ixDDsWmSvCWKAqbLtLgwXygOyfqhpNteL0DZs9Pz9EU6Y1iKBRxh5BZIuTqrERDVuI3s0cLq7_Thj5qCdMD1fF2MRsOjMGqG8-vYlSl610jJGC3-9E95xXu2dXzZ7G05xNzGuDfBgYl9CCYI_jcnEbLgcrxG__3TlYbQ1HYiLj7Swf6ocVHbjqlxxvziASqD3JnWq-TE8y1nYk85jucVgEyMcD0Uu4UA1N2JaEGNE8hvEGOifIhmnKvT5RyYC8k8vA-XOCBqh6TKafcQ1B3I-bdd18UjDQ3HbFzxgGoGgkHUY7AumB33vJjOG1avHGShYP9opi-z__=w1600-h504-no



From experience now, I can tell you that there is no rhyme or reason for the pinout or color coding. For me, the fact that this unit had test probes AND a cable, is what made me choose it.
RuCBHhbk8_fnxlxI5riBfs3uVo7R9EY6HC3nLVmugWWNZ-ft0m92yJK3SIsAisDAAZjHjv-fxMyXc0WahrgIdieSen1vHHVpvGrACTwbN3JgzAGAdrv05DxsYOS8U9CT31zfYUb5u_FMamp_Th803ZPzfsdNDViX3xdKH3zCXOqB7kMkhSSoYF1Y2J2UoOnFunVyBZH5Xs7iEuZepOrrxCEQbdoNW49KWqQOQVedK7r3_2WPT4daWs6DpeyNinoab6yHkjCy6CaWxejqeBuLAbkVuxTjghSP3UXRq0jJUdun2mx_ZVevJfzjCvg8kGdIE4WNulve3pjmeLNTpb0Efi_maSkAOjBphddGq-LV6irKO3TxV5MYmhCUvC1KBd4zDdISLnLi87EA4IUHaLV2U2c5mzjdG-SOr3Ouepba-szhhxhZTTGndV6ujJdYh7JedliCAXSapezzvjybAhZhXT6053mEPj2M8IHx6MG5Kky4dfAME0arN1ukY3ZSNeupsPiZ3UfTAXTf7R-ICCHG9KkitMajT463x00Ajbj1hFTImzF_6Fl0dgolAKdSSJmuLsqszxSWTQOYKebmhuTO1gLKXwMI78Lcn7OR0R_zBiq4kTU0kVZHaN0WbwOjjr_2oKNGY2cQhgNcv0RN7H9S_z75sGI0y68dfNr219hZM-gpiQupbpHYRhs8=w1329-h517-no


Looking at the above image, you can see my probing the test points a bunch. The easiest thing for me to do was find the ground point. Set up your multi-meter for continuity mode, pick a probe point (or a wire on your cable if you don't have a probe point), and drag your other probe across different places on the board. The ground is going to show up all over the place: the crystal's case, as a ground point for the ICs, some of the caps, grounded mount points if your board has them (mine does not). Once you figure out ground, mark it down. Next, you want to find your 5V VCC point, this is a little trickier. You would think that you could do the same thing for VCC and the ICs, but a lot of the boards have an LDO or voltage regulator that drops the voltage, so that isn't always simple. Try to find an IC up front and probe it out. When that is done, all that should leave is the two data pins for the USB. The data pins were pretty simple since I had a cable, that's because the wires are usually a twisted pair. Another way to figure it out is to probe that conformal coated part just to the right of the "94V-0" silkscreen. I think that is a SMD TVS Diode for ESD protection (both I played with had them). For this particular board, VCC was on the black wire at the top (yeah makes perfect sense.....), Ground is orange, and the two data lines were brown and red. I didn't know which was D+/D-, so you have a 50% chance of getting it right on the first try. If you don't make a connection when you connect it to a PC, swap those two. Below you can see the connection from the PCB's cable to the cable of my micro USB cable (I'll explain why micro USB in a minute).

QJ-8B4d6dgeVli81n8hzhvzt3GSV82qEQS2LgGDFsDEBr_F10cjew8Y6qlvxaigejrIbmuWMVvD5t2NcYhU_mla5GZKwjb12U9kPgtsNprAJ3CxsK2EjctqLVjz97Q2Tg0j1KuOzpgf9gX_VGW5TBwe4qTMsoo65hafjUo3atUwBCaCVUDGxCC8DEPW8ONXh_6ckrdMw2Mv5m7-VHUqaJuR9pJuF-iTn2siM-yVht8_esseJh__2RzmXF3o1cEcMuRVFIpJGmfvUWc7Xw0nX1bGUZpiVNBqXaKiSv1Ue6nKK2xfAkdjku5k_77e0ebAl0bcrznTVijmxYhT3WrGzsIE795aET5znvOA7HjvrsoHDqmPrnsrlPEoiM7dcH2__OHgE71lBqYAR-fG-7H2fzouc8DdMWUEcV2euYv87W2gxdSZdTA4-U20W1wUi7PGqEYGzLvZ4C78OTXpWJDYOcnhOnjwDmsoMG_sszzX1Q7PyyT13-fbdVUmnGRbgKwSCZqHebgunBQD2v4ES43umzW2aBxMsoNDRFJ0gkKTGvL0gINghXwHDEVKaYHAg-GyuHypOtAMTcxBx4TayQ2Tg1WwazwEPk3fZzZUZq4zyehRWpeBGGxZAZDgzZ8_zSTDCd2yP3FbrjkY6WzIIMVi2eXq-KTIraHPmCrNJx7ME_cqvwslY0D_qfvqr=w470-h758-no


The simplest thing at this point is to plug it into you PC. If you are lucky your PC will recognize a webcam. If you are kind of luck, it will recognize a USB device, but you will need a driver for it. If you are really unlucky, you will have backwards data lines (which you will need to swap), or you did something wrong. I find Linux recognizes webcams automagically way more often than Windows. I didn't want to risk screwing up my USB port on my laptop (if I REALLY screwed something up, so I plugged it a USB Zero W I had lying around (hence the micro USB plug need mentioned above). Success, it saw it immediately!

After doing some researching an weighing some options, I decided to blow away my Pi's SD card and install the MotionEye OS on it. This is a pretty sweet OS designed to run on all sorts of systems (make sure you grab the right release build for the hardware you are putting it on), that is a GUI front-end for the Motion webcam project (a lot of this stuff is popular with the DIY security system crowd). It allows for motion detection, timelapse videos, live views, guest live views, etc. Very neat. I've had it running in my workshop for about a week now and it seems pretty seamless. I don't know how long I'll keep it up, and I don't have it pointed on me, but I do work from home, so the lights are on during work hours usually. I'll keep it up for a week and then delete this part from the post.

Hope this is helpful. Like I said, I am not sure I will go this route, but I thought it was pretty neat. The streaming is pretty clear (good enough for a ~7 year old webcam), responsive, and the admin login has TONS of settings and better quality that the user mode. I am not sure how well this will work in the cold of winter (I suppose I should put this outside since it is still winter.....), but it was pretty chearp. I think I am going to slide it into one of those M&M candy cane looking containers and putting it into the corner of my dispenser (so it will out of the elements, have power present, and I can hide the Pi in the sidewall where I keep the rest of the electronics for the prop anyway.
large_ea2dff1f-fc8b-4a85-8042-7b8c206b2c88.png


The live view is here.

Dang live view is an an error



Sent from my iPhone using Tapatalk
 
Yep, I turned the light on down there. Going to be pretty Boeing most of the time [emoji1787]

Since I am not a member, I need to figure out how to upload some. Google photos doesn't show them as .jpg, so there is no way to embed them, and Id rather have them show up than just be a link. Let me look into it.

Sent from my SM-G955U using Tapatalk
 
OK, I attempted to fix the link and pictures back a couple of posts in my explanation. Hopefully it is view able now....
 
So did you get it all working and done ?
Reason I ask is I found another option that I got working today .


Sent from my iPhone using Tapatalk
 
So did you get it all working and done ?
Reason I ask is I found another option that I got working today .


Sent from my iPhone using Tapatalk
Yeah, I think so. I haven't installed into the actual display yet, but everything else seems to be golden.

What did you come up with?

Sent from my SM-G955U using Tapatalk
 
Yeah, I think so. I haven't installed into the actual display yet, but everything else seems to be golden.

What did you come up with?

Sent from my SM-G955U using Tapatalk

I was installing octopi on a raspberry pi zero wireless so I could watch and control my prints remotely when I thought hey this would work for the candy cane dispenser setup toozie was building.
Pi zero w was 10 bucks
I found an old usb webcam about 4 years old
And as long as I’m on my home network I can access the webcam at anytime using octopi software. You could do same just ignore the 3-d printer controls
04fb0855673e13439c616cef388f00c2.jpg



Sent from my iPhone using Tapatalk
 
Yeah, I think so. I haven't installed into the actual display yet, but everything else seems to be golden.

What did you come up with?

Sent from my SM-G955U using Tapatalk
I’ve been streaming for about 7 hours now and have had no issues at all



Sent from my iPhone using Tapatalk
 
For about $25 (or $20 on an Amazon lighting deal) you can get a Waze or Yi cam complete with an app that lets you remote view. The cameras come with SD storage slots for optional saving view and the option of a paid cloud storage if you want that. The Waze has a person detection algorithm if you want notifications on people and not motion. Only needs a 110v outlet or USB for power and access to your wifi for notifications. Plus they are compatible with Alexa and INOT
https://www.amazon.com/dp/B076H3SRXG/ref=cm_sw_em_r_mt_dp_U_HlWqEbNFW00NY
 
For about $25 (or $20 on an Amazon lighting deal) you can get a Waze or Yi cam complete with an app that lets you remote view. The cameras come with SD storage slots for optional saving view and the option of a paid cloud storage if you want that. The Waze has a person detection algorithm if you want notifications on people and not motion. Only needs a 110v outlet or USB for power and access to your wifi for notifications. Plus they are compatible with Alexa and INOT
https://www.amazon.com/dp/B076H3SRXG/ref=cm_sw_em_r_mt_dp_U_HlWqEbNFW00NY

I have a YI cam in my truck love it


Sent from my iPhone using Tapatalk
 
I did look at those too, but opted against them. The size was one issue, and being tied to their setup was another. I can control sensitivity of motion, recording parameters, cool down parameters, timelapses, etc.

Those are way simpler than my approach and about the same cost though.

Sent from my SM-G955U using Tapatalk
 
Back
Top