Willkommen im Loxone Community Forum. Um alle Funktionen nutzen und sehen zu können, registriere dich bitte zuerst. Dies gilt auch für das herunterladen von Dateien.
meine Frau möchte das der Blumentopf mit der Sonnenblume der Sonne Ausgerichtet wird. Kein Scherz!!!
Ich habe schon ein kleines Gestell gebaut mit einem kleinen 48V DC Motor. (Sollte ein anderer Motor z.b. Servomotor besser sein würde ich diesen auch Tauschen) Zahlt Frauchen
Kann mir jetzt einer bei der Programmierung helfen?
Hatte an den Baustein Automatikbeschattung gedacht und dann irgendwie den Motor ansteuern.
Wäre das machbar?
Vielen Dank
Zuletzt geändert von Lox_Noobi; 21.07.2023, 20:47.
😂 geile Idee. Will ich auch wissen, auch wenn ich das nie nachbauen werde.
Ich glaube der Beschattungsbaustein hilft noch nicht so dolle. Aber die „Sonne Richtung“ variable mit einer Formel wie: [Laufzeit für einmal rum] / 360 * „Sonne Richtung“
dann noch die Differenz von der neuen Position zu der schon gelaufenen.
Vielleicht als Anfang: ich würde für die Motorsteuerung ein eigenes Gerät bauen (je nach Größe einen esp/arduino und einen schrittmotor, je nach Größe des Topfes eventuell mit Getriebe)
und je nach aufstellort entsprechend wassergeschützt.
Wenn man es ganz genau möchte kann Dan die aktuelle Richtung noch mit einem integralgeber erfasst werden.
über Loxone würde ich dann die Visualisierung und die Sollwertvorgabe machen. Da bist du mit der Sonnenstandsvariable schon ganz gut, über einen analogspeicher könnte man die dann alle 10 Minuten zum Beispiel aktualisieren.
ÄÄhh meine Frau guckt hier auch rein.....Danke Lenardo ....die Sonnenblume ist jetzt nicht mehr so wichtig dafür aber deine Idee.
Nun soll ich lieber erstmal eine Sonnenliege bauen die sich der Sonne nach ausrichtet.
Noch mehr arbeit....
Lightpicture Ja normalerweise aber irgendwie kommt die unsere Sonnenblume nicht hinterher.
maximilian2202 Das Gestell ist schon fertig fehlt nur noch der Richtige Motor und die Software. Eventuell die Arduino Geschichte
Gibt es einen Motor der 360 Schritte hat?
Könnte man diesen dann nicht einfach der Gradzahlen anpassen und dann mit der Gradzahl der Sonne ausrichten?
Der Motor soll ja nicht alle paar Sek. sich anpassen wäre ja perfekt wenn er jede Std. die Position der Sonne abfragt und dann den Motor dementsprechend ausrichtet.
Ganz so einfach wird es dir sicher nicht gemacht. Und bei der Sonnenliege brauchst du bestimmt auch etwas mehr Drehmoment 😆.
Schrittmotoren gibt es die verschiedensten Modelle. Durch eine passende Übersetzung lässt sich das aber bestimmt so hinbiegen dass 1 Schritt einen Grad Drehung entspricht.
Mit Schrittmotoren hab ich selbst auch noch nix gemacht, nur halt in der Berufsausbildung die Grundlagen behandelt. Aber mit Handwerklichem Geschick lässt sich da bestimmt was machen. Und für Arduino+Schrittmotor findest du bestimmt auch reichlich Tutorials.
eigentlich ist es nicht wichtig wieviel Schritte du hast, da bei einen kleinen Motor sowieso eine Untersetzung sinnvoll ist
und selbst wenn ob du jetzt die Üblichen 200 oder 360 Schritte pro Umdrehung hast ist es eigentlich egal die Blume sollte 1,8° Fehlpositionierung überleben^^
Und daran denken wenn du einen Stepper nimmst brauchst du irgend eine Art Endschalter, da ist ein Servo natürlich angenehm
Dies ist der LoxForum Thread für das GPIO Plugin.
Aktuelle GPIO Version 2.0.7 (Release)
LoxWiki Plugin-Seite: https://www.loxwiki.eu/display/LOXBERRY/GPIO
Bitte beachtet, dass die Version 2.x des Plugins nicht mit der Version 1.0.x kompatibel ist. Ihr müsst sowohl die Konfiguration des Plugins, wie auch die Loxone
Sie müssen den 0-10V Analogausgang von einem Miniserver Gen 1 oder einem Miniserver Gen 2 mit einer 0-10V Analogerweiterung verwenden.
Es ist eine kleine handgefertigte Schaltung erforderlich, die ein paar Dollar kostet. Für den Aktuator wird ein Standard-Modellflugzeug-Servo benötigt.
Das Video im Link braucht eine Weile zum Laden, aber Sie können das Servo in Aktion sehen. Die Logik muss geringfügig geändert werden, um sie an die Sonnenposition anzupassen.
Ich spreche kein Deutsch. Gib Google Translate die Schuld, wenn ich unverständlich bin.
Also theoretisch ja. Man kann das sicherlich alles nur mit Loxone machen.
Mal ganz einfach gesponnen:
Schrittmotor mit Viertelschritten Mit Relais angesteuert und in Loxone ausprogrammiert mit einem Sequencer-Bustein o.ä.
Da musst du aber trotzdem Ausgänge dafür einplanen. Ich kann mir nicht vorstellen dass das einfacher wird.
Esp8622 mit http oder UDP Schnittstelle, einfach mit der arduino-ide programmiert ist da am Ende wahrscheinlich günstiger und pragmatischer.
Vielleicht kannst du ja mal ein Bild von deinem Gestell-Posten das man sich mal eine Vorstellung davon bekommt. Nicht dass du ein 100 kg Stahlrahmen geschweißt hast. 😂
Every day it is more and more proven that we are in a climate change that is due to environmental pollution. There is no doubt about it, the extreme weather phenomena in Europe are becoming increasingly common. That was the question I asked myself. There is a clean and cheap energy source in the world, namely the sun. Here in Spain we have many hours of light that we can use with the help of solar modules. In order to achieve the best performance, ideally you must always be aligned vertically to the sun's rays. One way to achieve this is to build a solar light tracker. The project developed here is two axes of movement, both horizontally and vertically. In this way, the solar modules are always aligned vertically to the sun's rays and their efficiency is maximized. 4 LDR resistors are used as a reference for the amount of light that reaches the solar panel (Light Dependent Resistor; Light-dependent resistance). We use two final switches to recognize when the sunset and sunrise position is reached. Since it is a "green" project to say, I reused some of the chassis, the engine holder, the LDR resistors and the solar panel, some of the plywood fruit boxes and a few final switches from an old mouse. Required hardware and materials 1 mega 2560 board with ATMEGA2560 with USB cable 1 0.96 inch OLED SSD1306 Display I2C 128 x 64 Pixel 4 Photo resistant photo resistor Diodes Set 150V 5mm LDR5528 4 Resistance 10 KOHM 1 Resistance 220 Ohm 1 Solar Panel 5V 1.5W Waterproof Polysilicon Mini Solar Module 2 microphone with scooter 1 PCB Board Set Lochrasterplatine Kabel Wood required software arduino The solar_light_tracker sketch wire library (integrated) adafruit_gfx library (via library administrator) Adafruit_SD1306 LIBRACHLOPENTMENTIEN) Description of the functionality and the source code as shown in the following photo are both the solar panel and the LDR resistors in the same level. This is necessary because the amount of light that the solar panel receives must be the same that also meets the four LDRs. These are arranged in a 2 x 2 matrix. The following drawing shows the arrangement of the LDR resistors from the front. These references are taken into account in the calculations in order to obtain the best light measurement. The heart of the structure is the Mega 2560 R3, which receives the measured values of the 4 LDR resistors, carries out the necessary calculations, moves the two stepper motors and sends the voltage data to the OLED display. First of all, the necessary libraries for I2C communication and the OLED display must be integrated into the sketch. #include #include #include Then we have to define the number of pixels for the width and height of the OLED screen and implement a screen object. As a constructor parameter, we hand over the variables of the number of pixels for the width and height of the screen, the reference to the Wire object. In addition, here -1 for connecting the reset pin when it is available. #define screen_width 128 #define screen_height 64 adafruit_ssd1306 Display (Screen_Width, Screen_Hight, & Wire, -1); We declare four variables to indicate which LDR resistance is connected to which port of the microcontroller. We also declare four other variables for the value of the resistance when the light occurs. int LDR_SD = A0; int ldr_si = a1; int ldr_ii = a2; int LDR_ID = A3; int sd, si, ii, id; In order to calculate average values in the same columns and lines of the measured four values of the LDR resistors, we declare another four variables. This gives us a reference to change the orientation of the solar panel. In the drawing above you can see which resistance are involved on each side. We also declare a tolerance variable to avoid constant movements. Int Sup_aver, Inf_Aver, Right_Aver, Left_aver; int tolerance = 10; For the voltage measurement on the solar panel, we declare the variable SPV. It contains the PIN to which we connect the panel (in our project it is pin 4). The variable solar_panel_read for the input value of the voltage (it is analogue values) and the variable solar_panel_voltage to carry out the analog-digital conversion. We can work with the value and display it on the OLED screen. int Spv = A4; int solar_panel_read; float solar_panel_voltaje; We will declare two variables for the speed of the stepper motors. The variable retardo (Sp. Delay) is intended for the movement of the engines in normal operation. We use the variable retardo_inicializacion (Sp. Delay_initalization) for the movement of the horizontal engine when it moves into the starting position. int retardo = 5; intwetardo_inicializacion = 15; Two final switches for sunrise and demolition were installed in the system. When the sunrise takes place, the system is in the sunrise position. The sunrise switch (Switch_sunise) is normal closed (NC) and connected with pull-up resistance. It is always closed, which means that 5V is permanently on the pin and its condition is therefore high. It is pressed and opened when the panel is in an almost vertical position. It shows in an eastern direction because the sun rises there. If the panel follows the sun in the sky during the day of movement, it will be almost vertical when the sunset position is reached and will be aligned with the west. Then the normal open (NO) sunset end switch (Switch_Sunset) is activated. It is connected to mass and the reset pin of the microcontroller. So it is reset when the PIN is placed on mass. As a result, the solar panel returns to the sunrise position. This code is carried out in the setup () part of the sketch. In the next two lines we configure the connection of the final switch to port 10 of the microcontroller and define it with high. int Sunrise_pin = 10; intWitch_sunise = high; After we have integrated the libraries, declared variables and instantified the component objects, we have to initialize them in the setup () method. First, we initiate the serial monitor and the OLED screen at address 0x3c, we delete the screen and set the text color white. Serial.begin (9600); if (! display.begin (ssd1306_switchcapvcc, 0x3c)) {serial.println (f ("ssd1306 allocation failed")); for (;;); } display.Cleardisplay (); Display.setteextColor (white); Next we configure the microcontroller pins used by the LDR resistors, the solar panel, the engines and the final switch for sunrise as an input or output. Pinmode (LDR_SD, input); // LDR resistors pinmode (LDR_SI, input); Pinmode (LDR_II, input); Pinmode (LDR_ID, input); Pinmode (SPV, input); // solar panel pinmode (5, output); // horizontal motor pinmode (4, output); Pinmode (3, output); Pinmode (2, output); Pinmode (9, output); // vertical motor pinmode (8, output); Pinmode (7, output); Pinmode (6, output); Pinmode (Sunrise_pin, input); // Sunrise Limit Switch The last points we will configure are the conditions of the LDR resistance and the solar panel when the microcontroller is initialized. First of all, we have to know the condition of the Switch_Sunrise final switch. If it is in high state, i.e. not depressed, we show a message about the serial monitor and carry out the method inicializacion_motor_horizontal () (initialization_horizontal_motor). As long as it is not pressed, the engine of the horizontal axis moves until this final switch is pressed and the initialization is completed. Switch_sunise = DigitalRead (Sunrise_pin); While (Switch_sunrise == High) {serial.println ("Inicializando Motor Horizontal, Esper ......"); inicializacion_motor_horizontal (); Switch_sunise = DigitalRead (Sunrise_pin); } We are ready with the Setup () method, now we will analyze the Loop () method that is continuously executed. In this method, the received light is measured and the engines moved. An LDR (Light branch resistor - light -dependent resistance) changes its resistance with the amount of light that falls on it. The best performance is achieved when the light falls vertically. As you can see in the circuit diagram, a voltage division circuit was produced with each LDR and a 10K resistor. If we connect it to a voltage of 5V and each LDR is connected to an analog port of the microcontroller, we can measure the varied voltage. We will save the voltage values of each LDR in the variables that we have declared for this purpose. Sd = analogread (LDR_SD); Si = analogread (LDR_SI); II = Analogread (LDR_II); Id = analogread (LDR_ID); The calculations that the microcontroller must carry out for the movement of the engines are as follows: The values of the horizontally located LDRs are added and then halved. Then the vertical LDRs are also added and halved. So we get the mean values. We save the results in the previously declared variables. You can see the arrangement of the LDRs in the figure. Sup_aver = (SD + SI)/2; inf_aver = (id + II)/2; right_aver = (SD + ID)/2; left_aver = (Si + II)/2; Now that we have the average values, we have to set the two engines in motion. To do this, we compare the values of the opposite pages with the tolerance. Whenever the calculated difference of the values of the compared pages is larger than the tolerance (int tolerance = 10;), we have to use the methods Paso_izq (), Paso_der (), Paso_up () y paso_down () (step left, right , up and down) give the order to the corresponding engine. It changes the direction of the page, the value of which is higher until the value of the difference is smaller than the tolerance. / *************** horizontal motor ***********************/ IF (right_aver == Left_aver) {apagado_hor (); } if (right_aver> left_aver && (right_aver-left_aver)> Tolerance) {paso_izq (); } if (Left_aver> Right_aver && (Left_aver-Right_Aver)> Tolerance) {Paso_der (); } apagado_hor (); Delay (500); / ************** vertical motor ************************/ IF ( Sup_aver == inf_aver) { apagado_ver (); } If (Sup_aver> Inf_Aver && (Sup_aver-inf_aver)> Tolerance) {Paso_up (); } if (inf_aver> sup_aver && (inf_aver-sup_aver)> tolerance) {paso_down (); } apagado_ver (); Delay (500); Two 28byJ engines and the associated Uln2003 controller modules were selected for the movement of the solar panel and the LDR resistors. One engine on the movement of the x-axis and the other motor on the Y axis acts. Note: An external voltage source for the supply of the engines should be connected. In the following lines of the sketch you can see that two coils, i.e. two pins, are always activated for a step of the motor. We regulate the speed of the engine rotation with Delay (retardo). void paso_xxx () {digitalwrite (5, low); DigitalWrite (4, low); DigitalWrite (3, high); DigitalWrite (2, high); Delay (retardo); DigitalWrite (5, low); DigitalWrite (4, high); DigitalWrite (3, high); DigitalWrite (2, low); Delay (retardo); DigitalWrite (5, high); DigitalWrite (4, high); DigitalWrite (3, low); DigitalWrite (2, low); Delay (retardo); DigitalWrite (5, high); DigitalWrite (4, low); DigitalWrite (3, low); DigitalWrite (2, high); Delay (retardo); } To visualize the voltage values that the solar module receives at a certain point in time, we have installed a 0.96-inch OLED screen. We determine the voltage of the solar panel on PIN 4. Before the output on the display, we have to convert the analog to a digital value. The solar panel provides a maximum voltage of 5V, which corresponds to the value 1023 read at the analog input. With a simple operation we can convert this value and output it on the screen. solar_panel_read = analogread (SPV); solar_panel_voltaje = (solar_panel_read*5.0) / 1023.0; oled_message (); The method for displaying data on the OLED screen (OLED_MESSAGE ()) is very simple. It performs the following steps: Deleting the screen, adjusting the text size to 2, placing the cursor on the X and Y coordinates in pixels and preparation of the text to write it in the first line of the text. Set text size to 3, bring cursor to the new X and Y coordinates again, prepare the new text to be displayed (voltage value with 2 decimal places of the solar panel) and the last line is the output of the entire text previously set. void oled_message () {display.clardisplay (); Display.setteextSize (2); Display.setcursor (7.0); Display.Print ("Solar Vols"); Display.setteextSize (3); display.setcursor (20, 30); display.print (solar_panel_voltaje, 2); display.display (); } Now that it is summer and the sun is shining, you could build a mobile phone charger, for example. A suitable project will follow soon.
The CDSOLAR Solar Tracking System is the go-to product for a high-end, high-efficiency, China-made solar solution for both commercial & residential systems.
Man könnte es auch ohne Stepper machen, stink normaler Gleichstrommotor nur ein / aus mit langsamer Übersetzung und irgendwo am Unfang noch einen Referenzpunkt
Dann brauchst du nur zu messen wie lange die 360 Grad brauchen und kannst vom Referenzpunkt aus jede Stellung anfahren
Und dafür würde sogar ein Shelly reichen
Die Blume macht hald dann bei jeden nachstellen eine Ehrenrunde
Wir verarbeiten personenbezogene Daten über Nutzer unserer Website mithilfe von Cookies und anderen Technologien, um unsere Dienste bereitzustellen, Werbung zu personalisieren und Websiteaktivitäten zu analysieren. Wir können bestimmte Informationen über unsere Nutzer mit unseren Werbe- und Analysepartnern teilen. Weitere Einzelheiten finden Sie in unserer Datenschutzrichtlinie.
Wenn Sie unten auf "Einverstanden" klicken, stimmen Sie unserer Datenschutzrichtlinie und unseren Datenverarbeitungs- und Cookie-Praktiken wie dort beschrieben zu. Sie erkennen außerdem an, dass dieses Forum möglicherweise außerhalb Ihres Landes gehostet wird und Sie der Erhebung, Speicherung und Verarbeitung Ihrer Daten in dem Land, in dem dieses Forum gehostet wird, zustimmen.
Kommentar