Previous post in this blog sequence:
Kitchen Lighting System Phase 2
Kitchen Lighting System Phase 2 - Part 2
Kitchen Lighting System Phase 2 - part 3 - Let there be (better) light!
Kitchen Lighting System Phase 2 - PCBs, Schematics and new sensor module.
Kitchen Lighting System Phase 2 - PCBs have arrived!
Kitchen Light System Phase 2 - Drowning in EnOcean...
Well, time is ticking away. I spent most of the day, building up the remaining assemblies (remote switch, EnOcean tranceiver module and light sensor). I would like to say that everything worked as expected, but that was not the case. When I finished building the remote switch module and attempted to power it up, the external power supply went into current limiting. Attempting to find a short with my multimeter, I was unable to find an issue. I assumed that I might have zapped the microcontroller during the assembly, so I decided to replace it. After lifting several pads off the PCB, I threw in the towel and decided to build up a second board. When that board failed in the same way, I decided to step back and re-examine my assumptions. It was then that I realized that I had swapped the power and ground wires that I had added to the board to facilitate a low power test (by passing the on board AC to DC supply and the solidstate relay) as I was a little nervous of applying high voltage until I was reasonably sure that things were working. I reversed the leads and power draw was back to normal and I was able to communicate with the microcontroller. I ported over some code from the MasterPIR module and quickly hacked it into shape so I could attempt to test the EnOcean receive functions. When I tried to send EnOcean messages to the Remote Switch board nothing happened. I connected up the scope and verified that the radio module was working (I could see a properly formed message), but still nothing was working. After a few more hours of precious time (tick, tick, tick), I found the issue, I had accidentally deleted the 'enable interrupt' statement in the startup code. Once that was back in place, everything seemed to be working fine. I cleaned up my excess debug statements (sequencing the LEDs based on various logic conditions) and moved on.
Here are some pictures of the Remote switch module:
In the first image I have placed the power supply module in place to show what the final build would look like. In the second image I have removed the power supply modules and attached leads to attach an external 3.3V supply to power up the remote switch module for test and debugging the firmware. The third image show the back of the assembly (with the power leads in the correct orientation). I have left off all of the high voltage side and added a LED to show the commanded state of the solidstate relay (much safer to perform all testing in the absence of lethal voltages). The pushbutton switch and the RGB LED (LED1 next to the pushbutton) make up the user interface for this module (learn mode and activity). I have a first pass on the enclosure for this module, but I have yet to print it (the main case shows a 15 hour print time). Here are the 3D drawings of the parts:
In addition to the remote switch, I also built up the light sensor pcb, in order to do some test fits one the full assembly. Here are some pictures of the completed light sensor module:
The first image is the front of the light sensor module snuggled up to a light puck. The second image shows the tiny light sensor PCB in place, with the right angle connector mated to the adjacent light puck. The light sensor receives power and I2C communications through the Light puck. I still need to add the photodiode and write/debug code for this module.
With most of the modules tested individually, but not fully integrated, I ran out of time. I did a quick video proof of the showing the MasterPID module sending ON/OFF packets to the remote switch (to be installed inside my microwave oven to control the surface illumination lamp).
While not completed, the project has been a lot of fun. My wife is happy with my progress and has already identified some future changes/additions, including installing a similar system in our laundry area and in the bathrooms. I plan to continue the development and to submit update blogs as progress is made.
Thanks for all the support and comments!
Gene
Here are the current software sources:
Top Comments