element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Merry Boxes & LEDs
  • Challenges & Projects
  • Project14
  • Merry Boxes & LEDs
  • More
  • Cancel
Merry Boxes & LEDs
Blog Connecting the Tree to the Internet
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Merry Boxes & LEDs to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: ntewinkel
  • Date Created: 2 Jan 2019 6:30 AM Date Created
  • Views 2459 views
  • Likes 10 likes
  • Comments 6 comments
  • wifi
  • mqtt
  • merryboxesledsch
  • holidayspecial19ch
  • xmas
  • esp8266
  • arduino
Related
Recommended

Connecting the Tree to the Internet

ntewinkel
ntewinkel
2 Jan 2019
image

Merry Boxes & LEDs

Enter Your Project for a chance to win a Maker Tool Kit, an Oscilloscope Grand Prize for the project that brings the Most Joy to the Heart, and Gift to Gives!

Back to The Project14 homepage image

Project14 Home
Monthly Themes
Monthly Theme Poll

 

I made some headway today, and was able to wire up one of the XMas trees to one of the Wemos boards.

 

Initial testing went well - it looks like the lights are properly controlled the way I had intended (hooray!).

However, the motion sensor is not doing the right thing yet, so I'll have to work on that.

edit: I think I might have found the issue (will test tomorrow) - line 77 sets the motion sensor input as "INPUT_PULLUP" like a regular button, but the PIR module should already handle that, so it probably should just be "INPUT". edit again: Sadly that wasn't the problem. I'll test it separately later.

 

I have the wires and the transistors just soldered together dead-bug style to keep things simple.

Once it all works I'll give the exposed bits a nice coat of... you guessed it... nail polish!

And then I need to somehow tuck the wires and board into a neat little finished package.

 

I made a little video showing my progress so far.

I'm using a Witty Wifi as the other tree. pressing the button simulates the motion detected, and the different LEDs simulate the tree.

 

Sorry about the video, I took it in portrait mode LIKE A BARBARIAN! (no offence intended to barbarians).

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

Here is a screenshot that shows the online MQTT client I also used for testing. It's super handy for this kind of thing!

You can see the debug info in the serial console too.

image

 

Since it looks like the software is ok for the most part (it may need a tweak for the motion detector), I've published it on GitHub, including the version that runs on the Witty for testing.

https://github.com/ntewinkel/electronics/tree/master/ConnectedXMasTrees

 

Cheers,

-Nico

 

Previous posts:

Connected Christmas Trees

Assembling the Trees

Finally! Two Trees Assembled

Two Trees by a Tree

 

Next posts:

Motion Sensor on Wemos

Trees! one with motion sickness...

Motion Sensor Issues, continued

The Connected Trees are Working!

Merry Boxes - A Project Within a Project

Connected Christmas Trees - Finished!

  • Sign in to reply

Top Comments

  • genebren
    genebren over 6 years ago +2
    Nice update on your connected trees project. Hopefully your testing will find that you have solved your motion sensing problem. Good luck on wrapping up this project! Gene
  • mcb1
    mcb1 over 6 years ago +2
    ntewinkel Not that the english is particularilyt good, but it looks like the output goes high when it is triggered. Many of them have an open collector so they go low when triggered. The PCB has the option…
  • ntewinkel
    ntewinkel over 6 years ago in reply to genebren +1
    Thanks Gene! > Hopefully your testing will find that you have solved your motion sensing problem. Unfortunately it wasn't the simple software fix I had hoped for. I'll have to try just the motion sensor…
  • ntewinkel
    ntewinkel over 6 years ago in reply to mcb1

    Hi Mark,

     

    It turned out that I needed an external 10k pull-down (to ground) resistor.  (edit: I think that's a Wemos/ESP8266 limitation, where a Uno might be ok with internal pull-down)

    That seems to make it work reliably enough, although it does appear to get the occasional false trigger still. So that might not be the right value of resistor, but it's good enough for now. False triggers add more festiveness!!

     

    I noticed that optional transistor spot, which some datasheets seem to recommend to use to directly control a load from the control pin, instead of having that transistor externally.

     

    -Nico

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • mcb1
    mcb1 over 6 years ago

    ntewinkel

    Not that the english is particularilyt good, but it looks like the output goes high when it is triggered.

    Many of them have an open collector so they go low when triggered.

     

    The PCB has the option to add a transistor, and they seem to have a zero ohm feeding the output instead.

     

    mark

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • ntewinkel
    ntewinkel over 6 years ago in reply to genebren

    Hi Gene,

     

    >Is that a 'Seeed' sensor?  Hard to tell from the video, but that thing is pretty tiny.  I don't think that I have come across one quite that small.

     

    It's a no-name from AliExpress (about a dollar each). And yes, it's very small compared to the usual PIRs I've seen, which is why I bought them for this project. Like this one.

    I don't recall how I happened to stumble upon this type image

     

    -Nico

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • genebren
    genebren over 6 years ago in reply to ntewinkel

    Nico,

     

    Sorry to hear that the simple fix did not work.  Hopefully you will be able to figure it out.  I think that checking out the sensor in a stand-alone mode is a good idea.  Is that a 'Seeed' sensor?  Hard to tell from the video, but that thing is pretty tiny.  I don't think that I have come across one quite that small.

     

    Good luck!

    Gene

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • ntewinkel
    ntewinkel over 6 years ago in reply to genebren

    Thanks Gene!

    >Hopefully your testing will find that you have solved your motion sensing problem.

    Unfortunately it wasn't the simple software fix I had hoped for. I'll have to try just the motion sensor by itself to see how it does things.

     

    -Nico

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube