Project

# Title Team Members TA Documents Sponsor
24 Automatic Mirror for Plant Lighting
Lucian Bell
Mateus Trigo
Sanghoon Kim
Tianda Huang design_document1.pdf
proposal1.pdf
Team Members:

Lucian Bell (lb25)

Mateus Trigo (mtrigo2)

Sanghoon Kim (sk82)

Problem:

There are many times where an apartment or room does not have a south-facing window, but the resident may want to grow a plant that requires direct sunlight to thrive. Light from an east, west, or north facing window may be adequate for a full-shade plant, but a partial-sun or full-sun plant may not be getting enough direct sunlight. This is a greater issue during winter in the northern hemisphere, where the sun shifts southward in the sky and the hours of daylight decrease. If there was a way for plants in non-south facing windows to get a few more hours of direct sunlight, then full-sun and partial-sun plants could be successfully grown in these windows which would give the resident more freedom to customize their room.

Solution:

We will build a device that uses a sun-tracking flat mirror to redirect sunlight towards the plant in a non-south facing window or other shady space. The device will be powered by a battery, which will allow it to be mounted outside of a window or be placed on a yard or deck. It will use a GPS signal and compass to determine the time, location, and orientation of the device. This data will be used by a microcontroller to determine the position of the sun in the sky relative to the device. On setup, the device will be calibrated to reflect the sun at the desired angle, and the microcontroller will move the mirror to continue reflecting the sun at this angle. The mirror will be attached to a rod with a base, and be controlled by two stepper motors to allow the mirror to change its orientation. The base will rotate to allow for rotation parallel to the ground and there will be a motor near the top of the rod that allows for rotation perpendicular to the ground. The device will also use a light sensor to determine when it is night time or the weather is poor so that it can save energy. This device will be able to provide the extra sunlight that some plants need to thrive in shady spaces.

Main Components:

Motors and Frame

The frame for the device will consist of a base, a rod, and the mirror itself. One stepper motor will be used to rotate the base to allow for rotation parallel to the ground. Another stepper motor will be used near the top of the rod to allow the mirror to rotate perpendicular to the ground. The stepper motors we are planning on using are 17HS15-1504-ME1K, which include rotational encoders to ensure the motor’s rotation is accurate. DRV8434 stepper motor drivers will also be used to convert the low voltage and current signals from the MCU to higher voltage and current signals for the motors.

Sensors

The device will use multiple sensors to determine the position, orientation of the device, light level, and time. All of these sensors will be attached to the PCB and will use I2C serial communication to send signals to the microcontroller. The LIS2MDL sensor is a compass, and will be used by the device to find magnetic north. The microcontroller will use this to convert the rotation of the base to real-world cardinal directions. The MAX-M10S-00B sensor will receive a GPS signal and send the time, latitude, and longitude to the MCU. These signals will be used by the MCU to determine the position of the sun in the sky. The final sensor is the VEML7700-TT light sensor, which will be used to measure the amount of light the device is receiving. This will allow the device to stop rotating in bad weather or at night, which will help it to save energy.

Microcontroller and Firmware

We will use a STM32G071CBT6 microcontroller mounted to the PCB to control the device and process signals from sensors. This microcontroller is low-power since keeping track of the sun position and light level is not computationally intensive, and this will reduce the cost and power consumption of the device. It also has support for I2C serial communication, which we will use to communicate with the sensors. We will write firmware for the microcontroller in C/C++ to make effective use of its small program memory. The firmware will include calibration behavior to calculate the target angle for the reflected light based on the mirror’s current position and the position of the sun. A button or other interface will be added to the PCB to start the calibration process. The firmware will use equations to convert the time, latitude, and longitude from the sensors to the sun’s angle in the sky, and it will position the mirror so that the sun’s light will be reflected to the target angle. If the sun is at a position that can’t be reflected to the target angle, the motors will not move and the device will wait for the sun to move to a position that can be reflected to the target angle. The firmware will also use the light level from the sensors to determine if the motors should not be moved during bad weather or at night to save energy.

Power

The device will use an 3.6V 18650 lithium-ion battery cell for power to accommodate the high-current requirements of the motors. The use of a battery will allow our device to operate outside and further from electrical outlets, which gives the device more flexibility. It is also more convenient than using a power cable, since the user will not have to worry about cable management. To meet the needs of different voltage components, our device will also step up (boosting) and step down (buck) circuits to convert the battery voltage to higher and lower voltages.

Criteria for Success:

Our device will be tested on a flat surface outside with multiple marked targets to measure the accuracy of its light reflection. Alternatively, if the weather is poor, a laser or artificial light can be shined from the sun’s angle in the sky to simulate the sun indoors. The first set of tests are meant to evaluate the device’s ability to calculate the position of the sun and target point accurately. The second set of tests are meant to evaluate the device’s ability to correctly move the mirror to reflect light to a given target point and to evaluate correct sensor behavior.

Sun Position and Target Point Calculation:
1. The device should be able to calculate the position of the sun to within 5 degrees of error to the known position of the sun at the current time and location.
2. The device should be able to calculate the position of the sun to within 5 degrees of error to the known position of the sun at 2 different simulated positions and 2 different simulated times.
3. The device should be able to determine the angle of the target during calibration within 5 degrees of error to the real target.


Real-World Performance:
1. The device should be able to successfully reflect light from the simulated or real sun to a manually entered target point at three different times in the day.
2. The device should be able to run for three hours and keep light from the simulated or real sun on the manually entered target point for 90% of the time.
3. The device should not move the motors when a manually entered target point is outside of the mirror’s reflection range within 5 degrees of error.
4. The device should stop moving the motors if the light sensor is covered.
5. The device should be able to determine the cardinal direction of the mirror’s focus within 5 degrees of error.

Electronic Mouse (Cat Toy)

Jack Casey, Chuangy Zhang, Yingyu Zhang

Electronic Mouse (Cat Toy)

Featured Project

# Electronic Mouse (Cat Toy)

# Team Members:

- Yingyu Zhang (yzhan290)

- Chuangy Zhang (czhan30)

- Jack (John) Casey (jpcasey2)

# Problem Components:

Keeping up with the high energy drive of some cats can often be overwhelming for owners who often choose these pets because of their low maintenance compared to other animals. There is an increasing number of cats being used for service and emotional support animals, and with this, there is a need for an interactive cat toy with greater accessibility.

1. Get cats the enrichment they need

1. Get cats to chase the “mouse” around

1. Get cats fascinated by the “mouse”

1. Keep cats busy

1. Fulfill the need for cats’ hunting behaviors

1. Interactive fun between the cat and cat owner

1. Solve the shortcomings of electronic-remote-control-mouses that are out in the market

## Comparison with existing products

- Hexbug Mouse Robotic Cat Toy: Battery endurance is very low; For hard floors only

- GiGwi Interactive Cat Toy Mouse: Does not work on the carpet; Not sensitive to cat touch; Battery endurance is very low; Can't control remotely

# Solution

A remote-controlled cat toy is a solution that allows more cat owners to get interactive playtime with their pets. With our design, there will be no need to get low to the ground to adjust it often as it will go over most floor surfaces and in any direction with help from a strong motor and servos that won’t break from wall or cat impact. To prevent damage to household objects it will have IR sensors and accelerometers for use in self-driving modes. The toy will be run and powered by a Bluetooth microcontroller and a strong rechargeable battery to ensure playtime for hours.

## Subsystem 1 - Infrared(IR) Sensors & Accelerometer sensor

- IR sensors work with radar technology and they both emit and receive Infrared radiation. This kind of sensor has been used widely to detect nearby objects. We will use the IR sensors to detect if the mouse is surrounded by any obstacles.

- An accelerometer sensor measures the acceleration of any object in its rest frame. This kind of sensor has been used widely to capture the intensity of physical activities. We will use this sensor to detect if cats are playing with the mouse.

## Subsystem 2 - Microcontroller(ESP32)

- ESP32 is a dual-core microcontroller with integrated Wi-Fi and Bluetooth. This MCU has 520 KB of SRAM, 34 programmable GPIOs, 802.11 Wi-Fi, Bluetooth v4.2, and much more. This powerful microcontroller enables us to develop more powerful software and hardware and provides a lot of flexibility compared to ATMegaxxx.

Components(TBD):

- Product: [https://www.digikey.com/en/products/detail/espressif-systems/ESP32-WROOM-32/8544298](url)

- Datasheet: [http://esp32.net](url)

## Subsystem 3 - App

- We will develop an App that can remotely control the mouse.

1. Control the mouse to either move forward, backward, left, or right.

1. Turn on / off / flashing the LED eyes of the mouse

1. keep the cat owner informed about the battery level of the mouse

1. Change “modes”: (a). keep running randomly without stopping; (b). the cat activates the mouse; (c). runs in cycles(runs, stops, runs, stops…) intermittently (mouse hesitates to get cat’s curiosity up); (d). Turn OFF (completely)

## Subsystem 4 - Motors and Servo

- To enable maneuverability in all directions, we are planning to use 1 servo and 2 motors to drive the robotic mouse. The servo is used to control the direction of the mouse. Wheels will be directly mounted onto motors via hubs.

Components(TBD):

- Metal Gear Motors: [https://www.adafruit.com/product/3802](url)

- L9110H H-Bridge Motor Driver: [https://www.adafruit.com/product/4489](url)

## Subsystem 5 - Power Management

- We are planning to use a high capacity (5 Ah - 10 Ah), 3.7 volts lithium polymer battery to enable the long-last usage of the robotic mouse. Also, we are using the USB lithium polymer ion charging circuit to charge the battery.

Components(TBD):

- Lithium Polymer Ion Battery: [https://www.adafruit.com/product/5035](url)

- USB Lithium Polymer Ion Charger: [https://www.adafruit.com/product/259](url)

# Criterion for Success

1. Can go on tile, wood, AND carpet and alternate

1. Has a charge that lasts more than 10 min

1. Is maneuverable in all directions(not just forward and backward)

1. Can be controlled via remote (App)

1. Has a “cat-attractor”(feathers, string, ribbon, inner catnip, etc.) either attached to it or drags it behind (attractive appearance for cats)

1. Retains signal for at least 15 ft away

1. Eyes flash

1. Goes dormant when caught/touched by the cats (or when it bumps into something), reactivates (and changes direction) after a certain amount of time

1. all the “modes” worked as intended

Project Videos