skip to Main Content

Your House Lights May Soon Use the Quadratic Formula

June 19, 20235 minute read

When you walk into the kitchen at 6:30am, you have two choices: manage your way in darkness or flip on a blinding light. With motion-activated lighting, your automated system knows the time, sun’s position, weather & other factors to gently turn your lights up to the perfect brightness. We’ll show you detailed steps in how Piston Home designs its motion-activated automations around the home.

Time of Day & Sun’s Position
When a motion sensor is triggered, an encrypted RF signal is sent to your Piston Hub. After the Hub decrypts this signal, it starts its path to turn on the associated light. The Hub first pings the Internet for the current time. An Internet server sends back the local time along with the position of the sun. The sun’s position is along two major axes in the sky: (1) elevation, the number of degrees above the horizon, and (2) azimuth, the position relative to the North Pole.

Brightness Level
Now the Hub can calculate the brightness for the light switch. Those of us on a “normal” work/sleep schedule generally need the brightness of a light switch to be dim in the early morning, bright during the day/evening, and again, dimmer at night. Does that seem familiar? If we plotted these on a graph, it would look like a quadratic polynomial.

A typical brightness curve for a

For every Motion Lighting automation in every installation, Piston Home uses a quadratic polynomial for its brightness curves. The curve plots the time on the x-axis and brightness level on the y-axis. You’ll notice the graph goes into negative brightness. So we also integrate floor and ceiling levels that cannot be exceeded. With these formulas, your lights will have the right brightness at the right time.


We use various quadratic equations all around the house, resulting in higher- & lower-variable brightness curves for different areas of the home. At first glance, this seems like overkill, but it helps in maintaining consistency throughout the home.

For example, a closet light has one general purpose: storing items. When you open the door to a closet, you’re expecting it to be bright to find the thing. Throughout the day, you’ll want this light to be consistently bright — or lower variability. On the flip side, bathrooms and bedrooms are personal spaces that typically cater to one person and their wake/sleep cycle. With a higher-variability curve, we get a more comfortable lighting experience throughout the day. Between these curves reside a middle-ground, meant for common areas like the kitchen, powder rooms, basements, and stairs.

Brightness Variability 1

The sun’s position can also be integrated. The farther one lives away from the equator, the greater the variability of the sun’s elevation through the seasons. For example, in Chicago, it starts getting dark in the winter around 4pm, while in the summer, the sky stays lit well past 7pm. With this in mind, we can be sure your automated system is turning the lights on at the right time, regardless of the season. It can even adapt to extreme cases like the northern areas of Norway where parts of the year see very little sunlight or very little darkness.

Transition Time
Gone are the days of light switches simply existing as ON/OFF. Smart dimmers now dominate the consumer lighting landscape. If you need a light at 100% brightness, you don’t want the light to turn on instantly — the sudden change in light intensity is jarring to the eyes. Instead, we want it to transition gently over 3-5 seconds so your eyes can better adjust. In contrast, if you need the lights at 10%, you wouldn’t want to wait more than a fraction of a second before it turned on.

For this, we use a natural log function. Brightness level is on the x-axis and transition time is on the y-axis. Our log function allows for faster transitions at lower brightness levels, while providing for longer transitions at higher brightness levels. While a linear curve would be an OK choice, it provides for too slow of a transition at lower brightness levels.

transition1 1

Similar to the brightness level, we create a floor and ceiling so the light doesn’t turn on too slowly or quickly. Every Piston Home installation has this feature ingrained throughout the home for the perfect lighting transitions.


Turn on the damn light already
So we’ve now got the brightness level and transition time for the requested bulb. The Piston Hub sends this data to the Lutron Smart Bridge via your WiFi router. The Lutron Smart Bridge wirelessly connects all of your Lutron smart switches together (and lets you control your lights through your phone app). The Lutron Smart Bridge processes the data, and sends a wireless signal to the light switch.

And so, when you walk into the bathroom at 6am, the lights turn up to 10% over 4/10ths of a second. All of this happens in less than 3/100ths of a second. Quicker than a snake’s strike.

Local Weather
Automation systems can also factor in the local weather. Different climate conditions call for different outcomes. If you live in the Northern Hemisphere and you have a south-facing kitchen, you likely won’t need the kitchen light turned on during a sunny day. However, if it’s a cloudy or rainy, your kitchen may not get enough light. Your Piston Hub can ping an Internet server for the current local weather. It can request cloud coverage %, outside brightness levels, precipitation levels, hourly forecasts, and many more factors. The server provides your Hub with details from the nearest NOAA weather station so that your system can make automation changes appropriately.

After all of this, the motion sensor is also keeping track of when you leave the room. If it doesn’t sense anyone in the bathroom after 5 minutes, it turns off the light. With motion-activated lighting and a little math, you can have perfectly transitioned lights throughout the house. All day, every day.

Share this article

No Comments

This Post Has 0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Next article
Back To Top