top of page

Solar Sensing Blind Opener

Solar Sensing Blind Opener: Text

Components

  • ESP32

  • INA219 current sensor

  • Motor w/ Encoder

  • DRV8833 Dual Motor Driver Carrier

  • Solar Panel

  • 1k Resistor

  • Wires

Solar Sensing Blind Opener: Text

Solar Panel Circuit

This was the initial circuit designed to make sure the INA219 can receive solar readings from the panel

Circuit.jpg
Solar Sensing Blind Opener: Video

Motor Added to Circuit

This is the updated circuit where the motor was added.

Diagram_2.jpg
Solar Sensing Blind Opener: Video

Solar Sensing

The I2C reads off the voltage, current, and power readings from the sunlight hitting the solar panel. From there, a motor moves a certain amount. Once the voltage readings drop below the threshold, the motor will move back a certain amount.

Solar Sensing Blind Opener: Text

On/Off Button

Through the use of MQTT, we set up an IFTTT connection between a phone and Adafruit Io. By pressing either the on or off button of the phone, it sends data( either 1 or 0 for on or off) to an Adafruit feed that the ESP32 is subscribed to. From there depending on what data the feed receives, the ESP32 will either turn the motor clockwise or counterclockwise. Down below is the pseudo code for how the function works.

Code

  • Confirm connection to internet and Adafruit

  • When called, check for any messages

  • Within callback function, there is an If else statement

  • If msg == b’1, turn on LED and move motor

  • Else, turn on LED and move motor in opposite direction.

Solar Sensing Blind Opener: Text

Video Demonstration

This is your Video Description paragraph. It’s a great place to add a description of the video displayed in this section, and a few more words about your business, your site or what you do. Use a friendly and conversational tone to engage as many users as possible!

Solar Sensing Blind Opener: Video

Slider

Using the Adafruit.io website, we also incorporated a slider block so that users can have full control on how much they want to open or close the blinds. Each value in the slider corresponds to an encoder tick value that the code reads then rotates the motor by that amount. Down below is the pseudo code for this function.

Code

  • Confirm connection to internet and Adafruit

  • When called, check for any messages

  • There is a prev_int value, by which represents the motor’s original position

  • From the slider, the message sent would be shown as a bit in the form of b’value’

  • Code decodes the message to a string then we convert it into an integer

  • The variable new is the converted value scaled to our preference (multiplied by 9 for full 900 tick rotation).

  • The dec function decodes our encoder values to our desired

Solar Sensing Blind Opener: Text

©2020 by Monet Garrett. Proudly created with Wix.com

bottom of page