How it works?
Since I started this project I have made dozens of experiments with a variety of sensors, charging and switching methods, types of batteries, solar panels, inductors, mosfets etc... And the device had usb capabilities from the beginning so I have the opportunity to compare complexity vs. efficiency during these experiments. You can find most of these experiments and design decisions in the project logs. Below are the major building blocks:
- MCU and switches: Charger, led supply, sensors are all controlled by PIC 16f1455. I chose this one as It's low cost and has a rich set of features such as internal usb module, temperature sensor plus plenty of ports. NDS331N
mosfets are used for chargers and led drivers switching supplies.
- Battery: Main power storage for the device will be 6v SLA battery by default. However as charging algorithm is completely configurable in theory any battery with higher voltage than panel's max. voltage can be used.
- Solar panels: Main power source for the device will be 2x 6v 1W solar cells by default. However as above any panel setup can be used as long as its max voltage is lower than battery voltage and maximum power doesn't exceed 5W.
- Charging module: A boost converter controlled by PIC microcontroller with constant current, constant voltage, temperature compensation and battery health check features.
- Sensors: Device will detect human presence and light conditions and decide to turn on, off or sleep. For now solar panel voltage will be used to detect ambient light. A motion sensor module will also be used by default. Another optional analog sensor will be used (such as a sound or distance sensor) to close gaps of the motion sensor.
- LED and LED Driver: A 3w warm white led powered by a constant current mode buck converter controlled by the micro.
- Configuration, debug : Currently device is a custom HID device that can communicate over USB to a piece of java software plotting a couple of values. During the first phase of the project I will improve this software to setup and modify charging algorithm, power saving features such as sensor thresholds and timings and power usage features such as adjusting output current. Having said that I am planning to replace all usb communication with wifi. Starting with usb was a bit easier for me but with modules like esp8266 and usb issues with open source wifi is obviously a better way to go for open source projects.
The end product will be something similar to a conventional desk lamp. Goals below will be success criteria for the project.
- Design : Final product should have a solid, sleek look and it should be very easy to configure and start using. While in use it should require as little maintenance as possible. (Such as changing batteries, cleaning up solar panels)
- Functionality : Amount of light produced should compete a conventional light bulb powered by the grid or at least provide a functional replacement for a small desk lamp.
- Cost : While not being the primary goal, price tag on the final product plus batteries shouldn't scare first buyers.
- Simplicity: Number of components and complexity of hardware and software should be as simple as possible enabling more people to diy this project easily.
Why Does It Matter?
I am living in a leased unit where I can't install a full blown proper solar system. Assuming that is the case for a majority of people especially living in heavily populated cities where power consumption is highest, a practical, efficient, budget solar product that can take out one appliance at a time off the grid without any harm or loss in function will provide people the opportunity to try it out within their budgets.
If this project or any similar product can successfully make it into the common household then it might start a reaction leading to more industry and scientific attention, more investment, better solar panels, better batteries etc. and most importantly better ideas. Imagine what the light bulb did to electricity but without any transmission problems faced as energy is converted, stored and consumed as locally as possible just like every living being.
This project might have aimed to get something fancier powered up such as a remote fire control system, a desert water pump or a mobile desalination station. But once light is there, others will follow. Most of the living things on this planet interacts, likes, plays, dies , feeds one way or another with light. It's the simplest way of getting attention and warning about a simple solution for a dead serious problem.
First prototype I put together was built around PIC12f675 which is one of the abundant chips I had in my parts bin and was a perfect candidate for my budget goal. Simply said a microphone input was being amplified by an op-amp and being fed into the chip with a input from a pot as means of configuration data. A 0.5W solar panel was also being used to charge the batteries as well as providing input to MCU to be used as ambient light level data. Based on the configuration value supplied by the pot mcu was doing one of the following:
- Sound Activated: Wake up every 5 seconds and turn on op-amp (op-amp power was controlled by pic for minimal power consumption). Check op-amp output for a few seconds and if there's no significant sound input go back to sleep. If there's noise turn on the leds and continue checking sound levels, keep led on until it's silent again. If it's silent wait for a while to ensure it's dead silence and go back to sleep. Never turn on if it's not dark.
- Disco Stu: Keep on and dim the lights accordingly to sound input.
- Boring : Turn on if it's dark regardless off sound. Turn off if battery voltage drops under a certain value.
Challenges and Problems V1
The first prototype has served its purpose but I came across a bunch of design issues and usage issues which was not easy to fix. During this project will try to address those issues, refine the requirements and come up with a simpler design. So here are the most disturbing.
Switching around different modes and configuration with a pot was a dirty idea just to make it work and it simply doesn't provide enough parameters to the program. It's location and preferred type of usage requires a bunch of parameters for timings and sensors and the impact of these parameters on power consumption can't be ignored. In my opinion adding more encoders, pots, dip switches around will just led a complex inflexible hardware increasing the budget unnecessarily.
Whatever I did I couldn't find a way to isolate led pwm from poisoning op-amp which lead to strange results and turned me into a crazier person providing more than enough negative feedback to me.
Sound input alone didn't seem to be enough. I tested the prototype in different rooms, indoors, outdoors to understand energy storage, efficiency, ease of use, how practical it is under different conditions. Sound is decent under many conditions but it needed another sensory input like motion to justify and infer if light is really needed or is it just snoring, a strong wind, storm, rain etc... eliminating as many false positives as possible.
This Version And To Do List
I will get into more details in projects work log but below is roughly what I'm planning to do for this version.
- I decided to use a PIC16f1455 which is one of my favorite chips and used it in many different projects. Planning to use it's USB capability for configuring the device as over engineered as possible. Has an internal temperature sensor which might become handy during charging.
- While I have a bunch of bright LEDs, I'm looking for something more powerful. Will order and test a few warm white LEDs in terms of luminance and power consumption and supplier availability of course.
- Deciding on a solar panel will probably be the hardest as their availability, cost, packaging and quality variance is crazy. I will use a few on hand, will order different types from ebay for initial prototype and tests. Once I clarify required power range and surface area will consult a friend who's in solar business full-time.
- Batteries are another problem but I am in between NIMH and SLA's for their availability, low cost, safety and ease of charge. First prototype was using NiMh's and they did pretty well. SLA's might be slightly a better choice as weight is not a constraint for this project while budget is. Decision on LEDs and solar panel will help me on charging circuit as well.
- I need to do a bit of research on motion sensors and order a few modules considering their power consumption and how to utilize them. I had problems with sound input as well in the first prototype. For some reason I'm scared of op-amps and my lack of electronics expertise and knowledge didn't really help. Having said that during the first prototype I believe I found a few good combinations of op-amps and microphones. Will check their availability.I will order a few sound input modules as well just to see if they're better than my design or end up being cheaper.