I'm getting closer!
I added some pull-down resistors for the motion sensors, and made a few tweaks to the software (there was too much of a wait time between sensor reads, for one; and I had the motion sensing levels backwards).
Tree number 2 seems to be working properly, detecting motion at the right time, sending and receiving messages, and lighting up all the right things. Hooray!
I thought I had it in the bag, because Tree 1 is just a copy really, with the numbers reversed.
But sadly, Tree 1 is rather trigger happy constantly sensing motion, even when I don't have the motion sensor disconnected at all. sigh.
So that'll need more work. I might try switching to a different GPIO, just in case I did something to this one. First step I'll probably switch the dev board to the one from the working tree, to rule out hardware issues with the tree wiring.
So close! so close!
Here is one of the trees:
Here are the two trees, both wired up to a Wemos, ready to be programmed:
And here is a closeup of the wires for one of them. I don't recall which is which, sorry:
It would have been much neater to have used perfboard, I think. For some reason the number of required connections expanded as I went on
ps, you might have noticed that I bent the header pins on the dev boards to 90 degrees before I soldered them on, to keep the profile of the wemos board lower. Kind of like the old "pancake" engine in the Volkswagen Type-3s of the 60s and 70s. Remember those? I restored one circa 2000, I'm not THAT old to remember the 60s
Here is a closeup of the green wire to the top RGB flasher LED:
The wire runs straight down the center of the tree and to the transistor, controlled by the Wemos board. I separated this from the other tree LEDs because I wanted something local to signal that motion had been detected. It is also timed so that it stays on as long as the remote tree is on.
Note that the transistors are on the gnd side of the load, which is why the green wire is soldered to the - side of the LED. I think it would have been fine, and much easier, to have skipped the transistor for the tree-top LED and just powered it straight from the GPIO pin.
This is how I wired the main tree. Basically the power to the tree is now supplied by the Wemos board. I did confuse myself for both boards at different times when I forgot to turn on the power switch. sigh. This was the easiest way to power it though - I suppose I could have wired it directly to the + and - at the base of the tree. I get a little reckless with the soldering iron at times - notice the melty bit on the J1 power connector?
I keep thinking there might have been a nicer way to wire it, maybe having the main-tree transistor glued to the tree base plate and just running power and signal to it from the micro controller board.
So... next steps...
For one, I need to figure out why the one tree is so trigger happy. I might try making it "tree 2" to make sure it's not a silly software bug related to the tree numbering.
For the tree that's working, I'll paint on some finger nail polish to insulate the solder joints and make it look a little prettier. I hesitate to do that for the one that's not working before I figure out why.
I also need to figure out some way to tidy up the final package. My wife suggested adding a tree skirt she's brilliant. To hold the wires and such I might just use some standoffs and cardboard under it. Or maybe if I can find some super thin plywood.
I'm starting to think that instead of motion sensors I should have just given each of them a big button for the user to press to show the other side they are thinking of them!
Cheers,
-Nico
Previous posts:
Connecting the Tree to the Internet
Next posts:
Motion Sensor Issues, continued
The Connected Trees are Working!
Top Comments