Simple Home Domotics
In this project the goal was to open a door with a PC through a Bluetooth connection. The basic components are:
Then, I migrated the code from Arduino to STM32F4 using libraries and functions realised previously in other projects. The basic working operation is that with the OPEN_PACKET the door has to stay/become open the opposite for the CLOSE_PACKET. The packets were thought so that in a possible extension, the same protocol can be used for controlling the number of steps that we want to make.
For opening the door, resuming, there’ll be the Bluetooth way or also the pressing of the blue button present on the STM32F4 Discovery board. The status of the door is displayed on a LCD display, that can be seen in the figures below.
Tested the program I had to realise the mechanical system. I used a bipolar stepper motor, realised the transmission with gears of factor (0.3:1 with a pulley of diameter 2 cm) so that I could have more torque. I connected the pulley to a screw so that the screw will rotate with the motor. After this I realised a 3D model of a door and printed it with a 3D printer. Some images are available here below:




The system of the stepper motor and its driver are the same used in another project, presented in the website. Here below I put anyways some images that show the used components.





Some images of the system the makes the door rotate are presented here below.



A example of the prototype of the system is below in the video. There’s the Python application that controls the MacBook Air Bluetooth card and communicates via Bluetooth with a HC05 module connected to a Arduino Uno through a Serial UART communication. Instead of opening the door, the Arduino is switching on and off the LED present in the breadboard.
Here below I present the videos of the two systems working.
The first is the video that shows the system controlled with a button.
The second one is the video showing the Bluetooth-based system.