diy solar

diy solar

What was your most interesting recent non solar project?

Same pattern that's everywhere in our house!! not sure if my wife liked it or it was the cheapest non slip tile she saw, it's literally everywhere.
 
I've received all the components and developed a schema to convert the manual awning to a powered one.
View attachment 222671

This schema uses the integrated parking switch inside the wiper motor to let the ESP8266 controller be able to count every full rotation. This is accurate enough for controlling the awning. As an additional protection, two micro switches will prevent the awning from destroying itself even if the ESP8266 controller will go mad and the motor won't stop (by disabling the H-Bridge in the motor controller). The micro switches are only able to switch 0.6A with 12V so it's not possible to connect them in series with the wiper motor. The inrush current of the wiper motor is >=15A, the idle running is 1.15A and I'll find out the amps under load when moving the awing, after installation.

I think the code will be easy to implement with the ESP8266 controller. Just 3 GPIO's to read the status of the switches (manual in, manual out and inside the motor to count the rotations) and two GPIO's to write high or low to tell the motor controller if it should turn left or right. I don't want to control the speed with PWM, instead I'll use just high for turning the motor on and low for stopping it because the H-Bridge inside the motor controller can work from 0%-100% PWM duty cycle.

Points to note::
One pole of the motor voltage is always provided by the case of the motor. So depending on the running direction the case is either +12V or ground/negative (this must be taken into account if the motor will be mounted at a metal bracket which may be electrically connected to other parts - in a car, the case will always be ground!). Also the black wire on the motor is originally connected with a screw to the motor case - this has to be disconnected to make the internal parking switch a dry contact switch!

Part list, total is < $70

1x wiper motor (OE 85-387) : 19.42
1x motor controller (BTS7960) : 7.99
1x manual left/right button : 12.99
2x micro switches (NC) : 1.99
1x 12V/30A power supply : 20.33
1x 12V/5V buck converter : 2.90
1x WeMos D1 Mini, ESP8266 : 3.00


The awning could be controlled via the two manual buttons which should be located right under the awning and remotely with the ESP8266 module (via WiFi and MQTT) with smart home integration. The awning should automatically slide out if the greenhouse get hit by full sun and slide in if too high wind speed or if no sun.

I'll try to build it over the next couple of days. Looks like a fun project :)
OK, the circuit with the PCB, the 3D printed PCB holder and the software part for the ESP8266 are finally done. Everything is tested and is working. The only missing part is the installation of the system on the awing (I need to build a custom bracket which will take time).

Compared to the first schema idea, I had to change a lot to make it work in detail and with all functions.

  • The circuit gets the command to start the motor, either via pressing the manual push button or remote via MQTT (via integrated WiFi).
  • The motor is spinning as long a the manual push buttons are pushed in or in case of MQTT, the spinning direction and the number of requested rotations are part of the MQTT message
  • The motor spins always a full rotation, even if the push button is released before a full rotation has been finished
  • There are two micros witches which prevents the awing from self destroying in case something went wrong (unfortunately, I had to implement the security micro switch logic in software because the BTS7960 motor controller H-bridge was not working as designed in terms of using the drive enable pins (R_EN and L_EN)!
  • The rotations are counted with the brake switch which is already existing inside any wiper motor. With this is possible to know the current position of the awning - not really like a servo, but good enough for controlling an awning (first idea was to use a hall sensor, but it's over-complicated an not necessary - this would also have required changes inside the engine housing to attach the hall sensor at the shaft.
  • All 7 possible GPIO pins on the Wemos are used. 5 digital INPUT (2x push buttons, 2x micro switches, 1x motor break for rotation count) and 2 digital OUTPUT (to drive the H-bridge to turn the motor right or left).
  • Beside the MQTT command topic to control the awning remotely, I've create 3 state topics for signaling every rotation, for logging of all events and a heartbeat topic to know if the controller is still working. This could be now easily integrated in my existing smart home.
TODO: absolute position controlling to be able to send a command like e.g. "open awning 75%", etc.


Here is the final circuit:

1719456237641.png

And here is the PCB layout:
1719456296142.png

And this is the PCB holder which fits into the given waterproof box:
1719456366405.png 1719456453216.png

1719458167310.jpeg


1719456521795-jpeg.224902


1719456546850.jpeg

1719456564600.jpeg

It's a fun project :)
 

Attachments

  • 1719456521795.jpeg
    1719456521795.jpeg
    333.5 KB · Views: 55
OK, the circuit with the PCB, the 3D printed PCB holder and the software part for the ESP8266 are finally done. Everything is tested and is working. The only missing part is the installation of the system on the awing (I need to build a custom bracket which will take time).

Compared to the first schema idea, I had to change a lot to make it work in detail and with all functions.

  • The circuit gets the command to start the motor, either via pressing the manual push button or remote via MQTT (via integrated WiFi).
  • The motor is spinning as long a the manual push buttons are pushed in or in case of MQTT, the spinning direction and the number of requested rotations are part of the MQTT message
  • The motor spins always a full rotation, even if the push button is released before a full rotation has been finished
  • There are two micros witches which prevents the awing from self destroying in case something went wrong (unfortunately, I had to implement the security micro switch logic in software because the BTS7960 motor controller H-bridge was not working as designed in terms of using the drive enable pins (R_EN and L_EN)!
  • The rotations are counted with the brake switch which is already existing inside any wiper motor. With this is possible to know the current position of the awning - not really like a servo, but good enough for controlling an awning (first idea was to use a hall sensor, but it's over-complicated an not necessary - this would also have required changes inside the engine housing to attach the hall sensor at the shaft.
  • All 7 possible GPIO pins on the Wemos are used. 5 digital INPUT (2x push buttons, 2x micro switches, 1x motor break for rotation count) and 2 digital OUTPUT (to drive the H-bridge to turn the motor right or left).
  • Beside the MQTT command topic to control the awning remotely, I've create 3 state topics for signaling every rotation, for logging of all events and a heartbeat topic to know if the controller is still working. This could be now easily integrated in my existing smart home.
TODO: absolute position controlling to be able to send a command like e.g. "open awning 75%", etc.


Here is the final circuit:

View attachment 224898

And here is the PCB layout:
View attachment 224899

And this is the PCB holder which fits into the given waterproof box:
View attachment 224900 View attachment 224901

View attachment 224907


1719456521795-jpeg.224902


View attachment 224903

View attachment 224904

It's a fun project :)
How's the pwm signal? I gave up using 8266 as it's all software defined but my use case was lights and far more obvious esp32`s are hardware based so I got far better results though it didn't help I already had alot of pcbs that were based on the D1 mini, thankfully I got a hold of a few D1 32's and with some fettling they slotted in
 
How's the pwm signal? I gave up using 8266 as it's all software defined but my use case was lights and far more obvious esp32`s are hardware based so I got far better results though it didn't help I already had alot of pcbs that were based on the D1 mini, thankfully I got a hold of a few D1 32's and with some fettling they slotted in
Because the motor controller BTS7960 is able to work with 0% and 100% duty cycle on it's PWM pins, I don't use PWM algorithm to control the motor speed. I just switch it ON or OFF (0% PWM duty or 100% PWM duty). The wiper is permanently connected with it's high speed winding which is perfect speed for the awning, so I don't use PWM speed control at all.

Until now, I've never used the Wemos D1 Mini with PWM control for projects, so I can't tell about how good 8266 PWM is working. For my small projects these extremely cheap 8266 Wemos clones are perfect and way enough powerful.
Do you have a link for the ESP32 replacement which you've used?
 
Because the motor controller BTS7960 is able to work with 0% and 100% duty cycle on it's PWM pins, I don't use PWM algorithm to control the motor speed. I just switch it ON or OFF (0% PWM duty or 100% PWM duty). The wiper is permanently connected with it's high speed winding which is perfect speed for the awning, so I don't use PWM speed control at all.

Until now, I've never used the Wemos D1 Mini with PWM control for projects, so I can't tell about how good 8266 PWM is working. For my small projects these extremely cheap 8266 Wemos clones are perfect and way enough powerful.
Do you have a link for the ESP32 replacement which you've used?
Hope this is just a normal link
 
Thanks a lot (y)
I was not aware about these and they are very promising and not much more expensive compared to the Wemos 8266 modules. For a project it does not really matter if the module will be $6 or $3! I will probably develop my future projects with this module!
I mainly use them for my projects because of the Bluetooth every project I add to the house allows me to map a little better so it's easier to track my car keys when I miss place them
 
The Seeed Studio XIAO ESP32C3/C6/S3 modules are all great as well, especially if you don't need many pins.
Woah woah woah money bags hold your horses, seeed studio?? I'm in Asia the majority of the time I'm just paying $2 for esp32 dev boards with a wroom chip.
 
IMG_20220128_151309~2.jpg
Ignore the SSC it's irrelevant for this thread these are sprinkler systems extremely cheap self sufficient sprinkler systems
 

diy solar

diy solar
Back
Top