6096 views|18 replies

31

Posts

0

Resources
The OP
 

Automatically controlled switch light system using latitude and longitude [Copy link]

 
Light switch system using latitude and longitude automatic control
Contents
1. Project background
2. Product Introduction 3. Technical Features 4. Innovation and Advancement 5. Circuit Schematic 6. Usage of MCU Internal Modules 7. MCU Pin Assignment and Software Flow 8. Supporting Computer Software 10. Demonstration Video Appendix 1: Convenient Query Website - Nanjing Sunrise and Sunset Time, Dawn and Dark Time Appendix 2: Daily Calendar V5.0 - Nanjing Sunrise and Sunset Time, Dawn and Dark Time
1. Project Background
The switch light system using latitude and longitude automatic control is a research topic proposed based on the market demand for multifunctional intelligent lighting energy-saving products. With the help of GigaDevice GD32F350 Innovation Design Competition, the excellent power of Cortex-M4 high-performance core is brought into play, the technology that has been reserved is upgraded and transformed, and the project is perfected and developed.
According to statistics, my country's lighting electricity consumption accounts for about 10% of the country's total power generation, and urban public lighting accounts for about 30% of my country's lighting power consumption, with an annual expenditure of hundreds of billions of yuan.
Some of the street light switch controls currently in use are manually controlled according to the daylight and nighttime conditions. The switch of the street light control cabinet is closed when it is dark, and the switch of the street light control cabinet is disconnected when it is light. This manual operation sometimes causes the street light to be turned on and off in a delayed manner, resulting in unnecessary waste of electricity.
There are also controllers that automatically control the switch of lights according to the set time, but sometimes the lights are turned on and off too early or too late, resulting in delayed switch on and off, and unnecessary waste of electricity. For example: At 17:12 on March 12 this year, I saw that all the lights were on in a park. At this time, the sun was still high, so I took a photo at random, as shown in Figure 1 below. According to the convenient inquiry website, the sunrise and sunset times in Nanjing on that day were sunrise 06:18:49, noon 12:14:36, sunset 18:10:22, dawn 05:54:31, and dark 18:34:41 (see Appendix 1). According to the daily calendar, the sunrise and sunset times in Nanjing on that day were 06:19:23, 18:10:20, 05:55, and 18:35 (see Appendix 2). It can be seen that the lights were turned on more than 80 minutes before dark.
Figure 1: Park lights on 20180312_1712
There are also methods to determine the time to turn on and off the lights based on longitude and latitude, but they use a simple calculation of mean solar time, which has a large error, sometimes up to 20 minutes, because the length of the true solar day varies with the seasons, and its changes are mainly affected by two factors: First, due to the existence of the obliquity of the ecliptic (23°26′), that is, the inclination of the ecliptic plane to the equatorial plane, the sun moves back and forth relative to the celestial equator during its annual motion, causing annual changes in the length of the true solar day; second, due to the elliptical orbit of the earth, the changes in the distance between the sun and the earth, and the different speeds of the earth's revolution, causing annual changes in the sun's daily ecliptic longitude difference itself. These two factors act simultaneously and interfere with each other, causing changes in the length of the true solar day. Some programs give a timetable for switching lights on and off, which changes once or twice a month; some use simple approximate calculations, which have large errors, sometimes with an error difference of more than ten minutes; there are also technical solutions that use single-chip microcomputers and are used to store the daily switching light timetable calculated according to natural astronomical time, and control the daily switching light time through programs, but the limitations are very large. The memory can only store the switching light timetable of a single location, which cannot meet the actual needs of switching lights at different locations (different longitudes and latitudes). Different locations must write different timetables in the memory, which brings inconvenience to product production and poor product mobility.
In addition, there are also switch light controllers that use light control alone on the market. The disadvantages are large errors, poor repeatability, and easy interference and malfunction, and they do not meet the requirements for intelligent monitoring of street lights.
Therefore, automatically and accurately controlling the switching lights is conducive to saving energy while ensuring lighting. If it is further coordinated with relevant intelligent lighting energy-saving products to achieve intelligent dimming, its energy-saving effect will be more significant. 2. Product Introduction This is a switch light system that uses automatic control based on longitude and latitude. It uses GD32F350 as the intelligent control unit (controller for short). It has multiple switch light functions such as longitude and latitude time control, light control, manual control, PC control, etc. It can control the lights in an area (a section of road or a road, a town, a park, etc.) and can be widely used in street light control, urban lighting projects, and neon light control. This product uses a high-precision astronomical algorithm to calculate the local sunrise, sunset, and transit time based on the local longitude and latitude of each place. It is suitable for use anywhere in the country. Its built-in astronomical algorithm can calculate the time of daybreak and sunset at any location very accurately. According to data sampling test, compared with the calculated value of the Sunshine Perpetual Calendar (V5.2beta), the maximum error measured within 100 years is no more than 3 seconds. Compared with the internationally renowned astronomical software SkyMap Pro (V10.0.4), its calculation error is within one minute (the software is only accurate to the minute). Compared with the Chinese astronomical calendar compiled by the Purple Mountain Observatory of the Chinese Academy of Sciences, the maximum error of the sunrise and sunset time and the daybreak and nightfall time calculated by it is within 1 minute (in fact, the calculation results of the astronomical calendars of different countries can also differ by one minute).
3. Technical features of the product
3.1 Automatic light switch control. According to the longitude and latitude of different locations, according to the changing laws of the earth's rotation and revolution, the astronomical algorithm is used to automatically and accurately calculate the local daybreak and nightfall time, and automatically correct the daily light on and off time, avoiding the trouble of manual correction and light switch control.
3.2 Flexible setting of various control parameters. The relevant working parameters can be set flexibly and conveniently according to the actual needs of each location or road contrast. 3.3 It integrates functions such as manual forced light on, light-controlled light on/off, and light on/off control through PC.
3.4 The set working parameters are saved in Flash and will not be lost in the event of a power outage.
3.5 If combined with a wireless module or other communication interface module, it can be easily remotely controlled or centrally controlled, and the relevant working parameters can be intuitively viewed or configured through the supporting application software.
3.6 It can set the artificially defined solar altitude angle for daybreak and nightfall, and can also set the standard daybreak and nightfall to advance or postpone the light on/off time.
3.7 It can output the light on/off time or sunrise and sunset time for several days to the computer, so that the management personnel can know the light on/off time.
3.8 It has a complete indication and alarm function, with a variety of light on/off status indications, clock failure indications, etc. 4. Innovation and advancement of the product The light switch system is automatically controlled by longitude and latitude, and the light switch is calculated and controlled according to astronomical algorithms. The innovation lies in the fact that the astronomical algorithm for calculating the time of daybreak and nightbreak is a high-precision algorithm based on Kepler's three laws of planetary motion and Newton's law of universal gravitation. When calculating the time of sunrise and sunset and the time of daybreak and nightbreak, the precession of the earth's axis (the conical motion of the earth's axis around the ecliptic axis, the radius of the cone is 23°26′, the precession speed is 50.29″ per year, and the period is about 25,800 years), atmospheric refraction (most obvious near the ground, its value is about 34′), morning and evening shadows and other factors are also considered. The time of daybreak and nightbreak calculated by this algorithm is very accurate at any location. According to data sampling test, compared with the calculated value of the daily shuttle perpetual calendar, the maximum error measured within 100 years does not exceed 3 seconds (see the calculation data test section). Various working parameters can be conveniently viewed or changed by users through the supporting computer software, and the set working parameters will not be lost in the event of a power outage. 5. Circuit Schematic Diagram 5.1 Principle block diagram
The principle block diagram of the longitude and latitude automatic control switch light device designed with GD32F350 is shown in Figure 2.
Figure 2 Principle block diagram of the longitude and latitude automatic control switch light device
5.2 Circuit principle diagram
The circuit principle diagram of the longitude and latitude automatic control switch light device designed with GD32F350 is shown in Figure 3.
Figure 3 Circuit principle diagram of the longitude and latitude automatic control switch light device
6. Usage of MCU internal modules
The schematic diagram of the longitude and latitude switch light controller is shown in Figure 4. It uses the RTC, DMA, interrupt, USART, ADC, GPIO, timer and other modules in GD32F350.
Figure 4 Schematic diagram of the longitude and latitude switch light controller
7. MCU pin allocation and software flow
7.1 Main pin function allocation
This controller uses GD32F350R8T6, and the main pin function allocation is as follows:
l PA0 pin: external switch S1, manual priority control of LED lights, used for inspection or maintenance;
l PA2 pin: serial port USART1-TX, 115200bps, 8N1;
l PA3 pin: serial port USART1-RX, 115200bps, 8N1; PB7 pin: external button B3, press the button before outputting the switch time, the calculated date is incremented by year, otherwise it is incremented by day; PB8 pin: LED1, lights up when the light is turned on; PB9 pin: LED2, lights up when the light is turned on by light control; PB10 pin: LED3, lights up when the light is turned on manually; PB13 pin: light-on signal output, high level turns on the light, and the LED light is lit by relay drive; PC0 pin: (ADC channel 10) detects VDD voltage; PC1 pin: (ADC channel 11) detects the photoresistor signal as the illumination value to assist in controlling the switch light; 7.2 Keil MDK software interface The firmware library used by this controller is firmware for GD32F3x0 V1.0.0. The software interface during debugging is shown in Figure 5 below: 380289 Figure 5 Software interface during debugging 7.3 MCU software flow The main program flow of the MCU software is: l Initialization  rcu_config();/* system clocksconfiguration */  systick_config(); /* systick configuration */  gpio_config();/* GPIO configuration*/  nvic_config();/* NVIC configuration*/ timer_config(); /* TIMER1 configuration *//* Initialize LED, USART1 and buttons*/ gd_eval_led_init(LED1);//Lights up when the light is turned on;
gd_eval_led_init(LED2);//Lights up when the light is turned on by light control;
gd_eval_led_init(LED3);//Lights up when the light is turned on manually;
gd_eval_led_init(KD_OUT);//Light-on signal output, 1 means turning on the light, 0 means turning off the light,
nvic_irq_enable(USART1_IRQn, 0,0); gd_eval_com_init(EVAL_COM1,115200);//USART1 usart_interrupt_flag_clear(USART1,USART_INT_FLAG_IDLE);
gd_eval_key_init(KEY_WAKEUP,KEY_MODE_GPIO);//PA0 pin, manual priority control LED light, used for inspection or maintenance;
EvbKeyConfigPoll();//External button B3;
/* ADC configuration */
adc_config();
adc_software_trigger_enable(ADC_REGULAR_CHANNEL);
rcu_ckout_config(RCU_CKOUTSRC_CKSYS,RCU_CKOUT_DIV1);/* enable PMU clock */ rcu_periph_clock_enable(RCU_PMU);/* enable the access of the RTCregisters */ pmu_backup_write_enable(); rtc_pre_config();l Loop operation Detect artificial light-on signal Detect the status of button B3 ADC detects illuminance signal Convert the photoelectric sensor ADC measurement value into the actual illuminance value Determine the light-operated switch light sign and give an indication  Read out the current date and time Find the sun's rising and falling position on the day based on the longitude and latitude Calculate the time to turn on and off the light Determine the time-controlled light switch signal based on the current time and the light switch time Determine the comprehensive light switch statusl DMA, USART1, Timer1 interrupt processing Timing delay processing If there is a command from the PC, process the command
8. Supporting computer software8.1 Description of the main software interfaceThe longitude and latitude automatic control light switch device (referred to as the controller) designed with GD32F350 has a supporting computer software interface as shown in Figure 6 below.
Figure 6 Main interface of PC software
The main options are as follows:
8.1.1 Serial port selection: Select the serial port connected to the GD32F350 controller. You can use the "Close/Open" button to control whether the serial port is open.
8.1.2 Communication rate: Select the communication rate of the serial port connected to the GD32F350 controller. You can choose 4800bps, 9600bps, 57600bps, 115200bps.
8.1.3 Communication network selection: You can choose serial port, network, GPRS wireless network.
8.1.4 Device selection: Select "Clock controller" when the computer is connected to the controller, and select "GPS receiver" when the computer is connected to the GPS receiver.
8.1.5 GPS date and time: When the GPS is working stably and receiving the correct signal, it will display the GPS time (Beijing time), the longitude and latitude of the receiver's location, and the current GPS status (available or unavailable).
8.1.6 Calibrate computer time: When GPS is available, you can click this button to calibrate the computer time with the GPS clock.
8.1.7 Computer date and time: Display the current date and time indicated by the computer. Double-clicking this icon will switch to entering the date and time, and you can manually enter the date and time.
8.1.8 Controller date and time: When the computer and controller are online, it will display the current date and time in the controller.
8.1.9 Calibrate controller time: When the computer and controller are online, you can click this button to calibrate the controller time with the computer clock or the manually entered date and time. 8.1.10 Calibrate the controller's longitude and latitude with GPS: When GPS is available, click this button to calibrate the longitude and latitude set in the controller with the longitude and latitude indicated by GPS. 8.1.11 View and set parameters l Set value: The value that the user needs to set l Actual value: When the computer is connected to the controller, read the actual storage value in the controller; when the software is not connected to the controller, it displays "unknown" l Longitude: The longitude of the controller's location, set in "degrees: minutes" l Latitude: The latitude of the controller's location, set in "degrees: minutes" l Daylight and nighttime solar altitude angle: Used to calculate the solar altitude value at daylight and nighttime, expressed in degrees. When this value is expressed as 0, the calculated daylight and nighttime times represent the sunrise and sunset times. When the sun is above the horizon, the altitude angle is positive; when the sun is below the horizon, the altitude angle is negative. It is usually set to -6.0 degrees. The detailed explanation is as follows:
For a period of time before sunrise (dawn) and after sunset (dusk), the sky is still bright and in a semi-bright state. During this period of time, it is neither true day nor true night, but a transitional period between day and night, called twilight. Modern astronomy calls it twilight, which is the combination of morning light and twilight. The causes of the two are the same, both of which are the result of the reflection and scattering of sunlight by the high-altitude atmosphere.
The morning light ends at sunrise, and there is a problem of the beginning of morning light; the twilight begins at sunset, and there is a problem of the end of twilight. The beginning of morning light and the end of twilight are both based on a certain "low degree" of the sun. According to different needs, twilight is divided into three levels: civil twilight, nautical twilight and astronomical twilight. Their standards for the "low degree" of the sun at the beginning of morning light and the end of twilight are 6°,12° and 18°.
——When the weather is clear, the center of the sun disk falls from the horizon to 6° below the horizon. The intensity of twilight is bright enough for normal outdoor activities, and no lighting is needed indoors. This period of time is called civil twilight. At any time, about 5% of the world is in this state.
——When the sun is between 6° and 12° below the horizon, it is too dark for outdoor activities, and indoor work requires lighting; the bright stars in the sky have already appeared, but the distant horizon is still clearly visible. This period of time is the most suitable time for navigation star measurement (determining the altitude of celestial bodies), so it is called navigation twilight.
——The real night begins (or ends) when the sun falls to 18° below the horizon. At this time, the dimmest stars visible to the naked eye begin to appear, the sky is completely dark, and the astronomical twilight ends.
l Light-on advance: the number of minutes before the controller calculates that the light should be turned on at dark.
l Light-off delay: the number of minutes before the controller calculates that the light should be turned off at dawn.
l Energy-saving delay: the number of minutes after the light is turned on to delay the energy-saving signal.
l Energy-saving advance: the number of minutes before the energy-saving signal is turned off at the time of light-off.
l Light-on time: the light-on time calculated according to the sun's altitude angle at dawn and dusk and the light-on advance. The time is different in different places and on different dates, and is expressed in "hours: minutes".
l Light-off time: the light-off time calculated according to the sun's altitude angle at dawn and dusk and the light-off delay. The time is different in different places and on different dates, and is expressed in "hours: minutes".
Write to controller: write the set value into the controller for permanent storage without fear of power failure. When you click this button, the following prompt appears: Select "Yes" to write all parameters, select "No" to not write longitude and latitude, and select "Cancel" to not write anything and cancel this operation. 8.1.12 Monitoring switch: When the computer is connected to the controller, click this button to connect the computer to the controller or to go offline. 8.1.13 Working status indication: The working status indication of the controller includes the following indications: l Online: This indicator light flashes when the computer is online with the GPS receiver or controller l Automatic: This light indicates the automatic working status l Time-controlled lighting: This light is on when the lighting time is calculated by the latitude and longitude and the set related parameters l Light-controlled lighting: This light is on when the lighting status is determined by the light-controlled signal l Fault: This light is on when the controller detects a fault
8.1.14 Window control:
When you click this button, a window control interface pops up. Then click the corresponding button (network parameter configuration, GPRS wireless network, calculate the time for switching lights on and off, read the time for switching lights on and off for each channel, read the administrator's mobile phone number, start the debugger, view working parameters, set product identification, and correct clock accuracy) to open the corresponding configuration interface. 8.2 Check the on/off time To calculate the on/off time, the controller is required to output the on/off time for a number of days. Please follow the steps below: 8.2.1 Click on the window control and the interface shown in Figure 7 will pop up: 380291 Figure 7 The window control interface of PC software 8.2.2 Click on the calculate on/off time again. In the pop-up window, fill in the number of days for which the on/off time needs to be read. Then click on the calculate and read out on/off time button to read out the relevant data. The controller will output the on/off time and the off time of each day from the current date. The results are rounded to the nearest minute, as shown in Figure 8: 380292 Figure 8a The output display interface of the on/off time 8.2.3 If you press the B3 button on the GD32F350 development board before clicking the Calculate and Read Out Light Time button, the daily sunrise time, sunset time, day length, and transit time will be outputted year by year starting from the current date, all accurate to seconds, as shown in Figure 9 below: 380294 Figure 9a Sunrise and Sunset Time Output Display Interface 380295 Figure 9b Sunrise and Sunset Time Output Display Interface 9. Calculation data test The switch light device designed by GD32F350 for automatic control of longitude and latitude is compared with the calculated value of the daily calendar V5.2. After data sampling test, the maximum error within 100 years is no more than 3 seconds, as shown in Table 1 and Table 2. Table 1: Comparison table of sunrise and sunset time and daily calendar V5.2 time Nanjing: Longitude: 118°46′ Latitude: 32°3′ Error A5pt]=日出-(日梭)日出  误差B=日落-(日梭)日落  误差C=上中天-(日梭)上中天
  
序号
  
年-月-日
日出
A
日落
B
昼长

上中天
C
1
2018-3-25
6:2:56
-1
18:19:35
2
12:16:38

12:11:0
0
2
2019-3-25
6:3:15
-1
18:19:25
1
12:16:9

12:11:5
0
3
2020-3-25
6:2:16
-2
18:19:56
0
12:17:39

12:10:51
-1
4
2021-3-25
6:2:35
-2
18:19:46
0
12:17:10

12:10:55
-1
5
2022-3-25
6:2:54
0
18:19:36
2
12:16:42

12:11:0
1
6
2023-3-25
6:3:12
-1
18:19:26
2
12:16:13

12:11:4
0
7
2024-3-25
6:2:14
0
18:19:57
2
12:17:43

12:10:50
0
8
2025-3-25
6:2:33
1
18:19:47
3
12:17:14

12:10:55
2
9
2026-3-25
6:2:51
0
18:19:37
2
12:16:45

12:10:59
1
10
2027-3-25
6:3:10
0
18:19:27
1
12:16:17

12:11:3
0
11
2028-3-25
6:2:11
-1
18:19:58
1
12:17:46

12:10:50
1
12
2029-3-25
6:2:30
1
18:19:48
1
12:17:18

12:10:54
0
13
2030-3-25
6:2:49
0
18:19:38
1
12:16:49

12:10:58
0
14
2031-3-25
6:3:8
0
18:19:28
0
12:16:20

12:11:3
0
15
2032-3-25
6:2:9
-1
18:19:59
-1
12:17:50

12:10:49
-1
16
2033-3-25
6:2:28
0
18:19:49
1
12:17:21

12:10:53
0
17
2034-3-25
6:2:46
-1
18:19:39
1
12:16:53

12:10:58
1
18
2035-3-25
6:3:5
-1
18:19:29
1
12:16:24

12:11:2
0
19
2036-3-25
6:2:6
-1
18:20:0
2
12:17:54

12:10:48
1
20
2037-3-25
6:2:25
-1
18:19:50
1
12:17:25

12:10:53
1
21
2038-3-25
6:2:44
0
18:19:40
2
12:16:56

12:10:57
1
22
2039-3-25
6:3:3
0
18:19:30
2
12:16:27

12:11:1
0
23
2040-3-25
6:2:4
-1
18:20:2
1
12:17:57

12:10:48
0
24
2041-3-25
6:2:23
0
18:19:52
3
12:17:28

12:10:52
1
25
2042-3-25
6:2:41
-1
18:19:42
2
12:17:0

12:10:56
0
26
2043-3-25
6:3:0
-1
18:19:32
0
12:16:31

12:11:1
0
27
2044-3-25
6:2:1
-1
18:20:3
1
12:18:1

12:10:47
0
28
2045-3-25
6:2:20
-1
18:19:53
0
12:17:32

12:10:51
-1

2:经纬度开关灯控制器与日梭万年历V5.2时间对照表 南京:经度:118.766700,纬度:32.050000
误差1=开灯-(日梭)天黑  误差2=关灯-(日梭)天亮  误差3=上中天-(日梭)上中天
  
年-月-日   
  
开灯
误差1(分)
关灯
误差2(分)
上中天
误差3(秒)
2018-3-13
18:36
0
5:54
0
12:14:30   
1
2019-3-13
18:35
0
5:54
0
12:14:33   
-2
2020-3-13
18:36
0
5:53
0
12:14:21   
-1
2021-3-13
18:36
0
5:54
0
12:14:25   
0
2022-3-13
18:36
0
5:54
0
12:14:29   
0
2023-3-13
18:36
1
5:54
0
12:14:33   
2
2024-3-13
18:36
0
5:53
0
12:14:20   
0
2025-3-13
18:36
0
5:53
-1
12:14:24   
1
2026-3-13
18:36
0
5:54
0
12:14:28   
1
2027-3-13
18:36
1
5:54
0
12:14:32   
0
2028-3-13
18:36
0
5:53
0
12:14:20   
1
2029-3-13
18:36
0
5:53
0
12:14:23   
0
2030-3-13
18:36
0
5:54
0
12:14:27   
-1
2031-3-13
18:36
1
5:54
0
12:14:31   
0
2032-3-13
18:36
0
5:53
0
12:14:19   
-1
2033-3-13
18:36
0
5:53
0
12:14:23   
0
2034-3-13
18:36
0
5:54
0
12:14:27   
2
2035-3-13
18:36
1
5:54
0
12:14:30   
-1
2036-3-13
18:36
0
5:53
0
12:14:18   
1
2037-3-13
18:36
0
5:53
0
12:14:22   
1
2038-3-13
18:36
0
5:54
0
12:14:26   
0
2039-3-13
18:36
1
5:54
0
12:14:30   
1
2040-3-13
18:36
0
5:53
0
12:14:17   
0
2041-3-13
18:36
0
5:53
0
12:14:21   
0
2042-3-13
18:36
0
5:54
0
12:14:25   
1
2043-3-13
18:36
0
5:54
0
12:14:29   
-1
2044-3-13
18:36
0
5:53
0
12:14:17   
0
2045-3-13
18:36
0
5:53
0
12:14:20   
0
2046-3-13
18:36
0
5:54
0
12:14:24   
0
2047-3-13
18:36
0
5:54
0
12:14:28   
1
2048-3-13
18:36
0
5:53
0
12:14:16   
1
2049-3-13
18:36
0
5:53
0
12:14:20   
1
2050-3-13
18:36
0
5:54
0
12:14:24   
2
2051-3-13
18:36
0
5:54
0
12:14:27   
-1
2052-3-13
18:36
0
5:53
0
12:14:15   
0
2053-3-13
18:36
0
5:53
0
12:14:19   
1
2054-3-13
18:36
0
5:53
-1
12:14:23   
0
2055-3-13
18:36
0
5:54
0
12:14:27   
0
2056-3-13
18:36
0
5:53
0
12:14:14   
-1
2057-3-13
18:36
0
5:53
0
12:14:18   
-1
2058-3-13
18:36
0
5:53
0
12:14:22   
1
2059-3-13
18:36
0
[ign=right]
12:14:18   
1
2083-3-13
18:36
0
5:53
-1
12:14:22   
1
2084-3-13
18:36
0
5:53
0
12:14:9   
0
2085-3-13
18:36
0
5:53
0
12:14:13   
1
2086-3-13
18:36
0
5:53
0
12:14:17   
1
2087-3-13
18:36
0
5:53
0
12:14:21   
0
2088-3-13
18:36
0
5:52
-1
12:14:8   
0
2089-3-13
18:36
0
5:53
0
12:14:12   
0
2090-3-13
18:36
0
5:53
0
12:14:16   
0
2091-3-13
18:36
0
5:53
0
12:14:20   
-1
2092-3-13
18:36
0
5:52
-1
12:14:8   
-1
2093-3-13
18:36
0
5:53
0
12:14:12   
1
2094-3-13
18:36
0
5:53
0
12:14:15   
0
2095-3-13
18:36
0
5:53
0
12:14:19   
0
2096-3-13
18:36
0
5:52
0
12:14:7   
1
2097-3-13
18:36
0
5:53
0
12:14:11   
1
2098-3-13
18:36
0
5:53
0
12:14:15   
1
2099-3-13
18:36
0
5:53
0
12:14:19   
0
10.       演示视频
视频1:天文算法开关灯调试

视频2:天文算法开关灯软件操作


附录1:便民查询网-南京日出日落时刻天亮天黑时间





附录2:日梭万年历V5.0-南京日出日落时刻天亮天黑时间



采用经纬度自动控制的开关灯系统.pdf (2.23 MB, downloads: 22)




小编提醒评委:楼主补充的资在6楼,注意不要漏掉6楼的内容
53[/td][td=105]
0
[/td][td=126]
12:14:19
[/td][td=120]
0
[/td][/tr] [/table]
10. Demo Video
Video 1: Astronomical Algorithm Switch Light Debugging
Video 2: Astronomical algorithm to switch lightsSoftware operation
Appendix 1: Convenient inquiry website - Nanjing sunrise and sunset times and daybreak and dark times
Appendix 2: Daily Calendar V5.0 - Sunrise and Sunset Times in Nanjing
采用经纬度自动控制的开关灯系统.pdf (2.23 MB, downloads: 22)
Editor reminds the judges: The information supplemented by the original poster is on the 6th floor. Be careful not to miss the content on the 6th floor
53
[/td][td=105]
0
[/td][td=126]
12:14:19
[/td][td=120]
0
[/td][/tr] [/table]
10. Demo Video
Video 1: Astronomical Algorithm Switch Light Debugging
Video 2: Astronomical algorithm to switch lightsSoftware operation
Appendix 1: Convenient inquiry website - Nanjing sunrise and sunset times and daybreak and dark times
Appendix 2: Daily Calendar V5.0 - Sunrise and Sunset Times in Nanjing
采用经纬度自动控制的开关灯系统.pdf (2.23 MB, downloads: 22)
Editor reminds the judges: The information supplemented by the original poster is on the 6th floor. Be careful not to miss the content on the 6th floor


图5 UV5调试时的软件界面.jpg (237.64 KB, downloads: 0)

图5 UV5调试时的软件界面.jpg

图7 各窗口控制界面.jpg (35.57 KB, downloads: 0)

图7  各窗口控制界面.jpg

图8a 开关灯时间输出显示界面.jpg (112.5 KB, downloads: 0)

图8a 开关灯时间输出显示界面.jpg

图8b 开关灯时间输出显示界面.jpg (131.06 KB, downloads: 0)

图8b 开关灯时间输出显示界面.jpg

图9a 日出日落时间输出显示界面.jpg (144.22 KB, downloads: 0)

图9a 日出日落时间输出显示界面.jpg

图9b 日出日落时间输出显示界面.jpg (171.91 KB, downloads: 0)

图9b 日出日落时间输出显示界面.jpg
This post is from GD32 MCU

Latest reply

Latitude and longitude astronomical algorithm switch light software installation program  Details Published on 2018-11-6 17:07
Personal signature科技飞速发展,学习永无止境。变压器有载调压,一小时万次切换。
 

5216

Posts

239

Resources
From 2
 
Attached to the judges' supplementary materials:
Experience sharing
tianjiu
The feeling of receiving the GD32F350Rx development board: excitement and anxiety
Experience sharing
tianjiu
GD32F350demo test record (1)
Experience sharing
tianjiu
GD32F350demo test record (2)
Question Discussion
tianjiu
Where can I download the protel component library of GD32


This post is from GD32 MCU
Add and join groups EEWorld service account EEWorld subscription account Automotive development circle
 
 
 

31

Posts

0

Resources
3
 
The web page responds very slowly during editing and the visual effect is poor. If you want to view it with better effect, please download the attachment.
This post is from GD32 MCU
 
Personal signature科技飞速发展,学习永无止境。变压器有载调压,一小时万次切换。
 
 

31

Posts

0

Resources
4
 
I’ll find a chance to post it on WeChat, I hope the visual effect will be better.
This post is from GD32 MCU

Comments

nmg
Can you provide a demonstration video of the work? It will be more intuitive and the judges will be better able to judge the authenticity of the project.  Details Published on 2018-9-30 15:37
 
Personal signature科技飞速发展,学习永无止境。变压器有载调压,一小时万次切换。
 
 

5216

Posts

239

Resources
5
 
tianjiu posted on 2018-9-29 21:41 I will find a chance to publish it on WeChat, and I hope the visual effect will be better.
Can you provide a demonstration video of the work? It will be more intuitive, and the judges will be better able to judge the authenticity of the project
This post is from GD32 MCU
Add and join groups EEWorld service account EEWorld subscription account Automotive development circle
 
 
 

31

Posts

0

Resources
6
 
nmg posted on 2018-9-30 15:37 Can you add a demonstration video of the work? It will be more intuitive and the judges will be better able to judge the authenticity of the project
I haven't found a place to upload the video yet
This post is from GD32 MCU
 
Personal signature科技飞速发展,学习永无止境。变压器有载调压,一小时万次切换。
 
 

31

Posts

0

Resources
7
 
Release information summary (recommended to browse with WeChat on mobile phone): WeChat display (preferred):https://mp.weixin.qq.com/s/x6e1o2_i-fVeNRQU0JgiiQ Attachment: Switching light system using automatic control of longitude and latitude.pdf 采用经纬度自动控制的开关灯系统.pdf (2.42 MB, downloads: 6) [GD32F350 Work Submission] Switching light system using automatic control of longitude and latitude https://en.eeworld.com/bbs/forum.php?mod=viewthread&tid=988209&fromuid=19826 (Source: Electronic Engineering World-Forum) Video 2: Astronomical algorithm switch light PC software operation (screen recording), http://v.youku.com/v_show/id_XMzg0NzY3OTk0NA==.html?spm=a2hzp.8253869.0.0 Video: PC software operation screen recording, http://v.youku.com/v_show/id_XMzg0NzY3ODU1Ng==.html?spm=a2hzp.8253869.0.0 Video 1: Astronomical algorithm switch light MCU software debugging (screen recording), http://v.youku.com/v_show/id_XMzg0NzY3MzAxNg==.html?spm=a2hzp.8253869.0.0 Video: Astronomical algorithm switch light MCU software and PC software joint debugging (screen recording), http://v.youku.com/v_show/id_XMzg0NzY3NzIxNg==.html?spm=a2hzp.8253869.0.0 Video 2: Astronomical algorithm switch light operation (shot by mobile phone), http://v.youku.com/v_show/id_XMzg0NzY3OTM0NA==.html?spm=a2hzp.8253869.0.0 Video 1: Astronomical algorithm switch light debugging (shot by mobile phone), http://v.youku.com/v_show/id_XMzg0NzY3NTk0MA==.html?spm=a2hzp.8253869.0.0 [Experience sharing] GD32F350demo test record (2) https://en.eeworld.com/bbs/forum.php?mod=viewthread&tid=869732&fromuid=19826 (Source: Electronic Engineering World Forum) [Experience sharing] GD32F350demo test record (1) https://en.eeworld.com/bbs/forum.php?mod=viewthread&tid=869707&fromuid=19826 (Source: Electronic Engineering World-Forum) [Experience Sharing] Feelings after receiving the GD32F350Rx development board: excitement and anxiety https://en.eeworld.com/bbs/forum.php?mod=viewthread&tid=869635&fromuid=19826 (Source: Electronic Engineering World-Forum) Statement: This work is original by the author, including the scheme, circuit design, MCU software, PC software, test data and related documents, etc., which are all independently completed by the author and can be freely reproduced. Please indicate the source when reprinting. Thank you! Acknowledgements: Thank you GigaDevice for providing the development board GD32-colibri-F350RX and its chip information for the competition! Thank you EEWORLD Electronic Technology Forum for providing a communication platform! Thank you Tencent for providing the WeChat public account!

This post is from GD32 MCU
 
Personal signature科技飞速发展,学习永无止境。变压器有载调压,一小时万次切换。
 
 

31

Posts

0

Resources
8
 
The video I submitted yesterday was published after review when I posted a reply. I can’t see it now. Should I create a new thread?
This post is from GD32 MCU
 
Personal signature科技飞速发展,学习永无止境。变压器有载调压,一小时万次切换。
 
 

2w

Posts

341

Resources
9
 
Not bad, you can find a company to make it into a product
This post is from GD32 MCU

Comments

This is an improvement on the product I developed for the company before. It was previously implemented with a C8051 microcontroller, but this time with GD32F350, the performance has been greatly improved. I am now a freelancer, and my main job is to help schools and companies solve some technical problems and design products. During this period, I have been working on this competition project.  Details Published on 2018-10-8 08:46
 
 
 

31

Posts

0

Resources
10
 
qwqwqw2088 Published on 2018-10-5 09:42 Not bad, you can find a company to make it into a product
This is an improvement on the product I developed for my company before. It was previously implemented with a C8051 microcontroller, but this time with GD32F350, the performance has been greatly improved. I am now a freelancer, and my main job is to help schools and companies solve some technical problems and design products. During this period, working on this competition project is my only job. This is my first time using a general-purpose MCU with a Cortex-M4 core. I spent a lot of time on software transplantation, debugging, and improvement, especially the transplantation of algorithms. Some functions of C51 are not supported in MDK, resulting in incorrect calculation data. Fortunately, all problems have now been satisfactorily resolved, and the improved design has also been very effective, and can be used as a new product. Thank you for your attention!
This post is from GD32 MCU

Comments

You can find some user groups in professional fields and listen to their requirements for optimization, such as in the maritime field.  Details Published on 2018-10-8 10:32
 
Personal signature科技飞速发展,学习永无止境。变压器有载调压,一小时万次切换。
 
 

3

Posts

1

Resources
11
 
Very good, promising
This post is from GD32 MCU
 
 
 

2w

Posts

341

Resources
12
 
tianjiu posted on 2018-10-8 08:46 This is an improvement on the product I developed for the company before. It was previously implemented with a C8051 microcontroller, but this time with GD32F350, the performance has been improved...
You can find some user groups in professional fields and listen to their requirements for optimization, such as in the maritime field
This post is from GD32 MCU

Comments

Thank you for your suggestion  Details Published on 2018-10-9 14:20
 
 
 

31

Posts

0

Resources
13
 
qwqwqw2088 posted on 2018-10-8 10:32 You can find some user groups in professional fields and listen to their requirements for optimization, such as the maritime field
Thank you for your suggestion
This post is from GD32 MCU
 
Personal signature科技飞速发展,学习永无止境。变压器有载调压,一小时万次切换。
 
 

31

Posts

0

Resources
14
 
GD32F350_RTC.c.pdf (79.84 KB, downloads: 2) Send a real-time clock code. Please note that the internal error of different chips will be different. You can use oscilloscope, frequency meter, timing and other methods to determine the error value and then modify the code for calibration. When used in products, it is best to use a crystal oscillator.
This post is from GD32 MCU
 
Personal signature科技飞速发展,学习永无止境。变压器有载调压,一小时万次切换。
 
 

31

Posts

0

Resources
15
 
GD32F350天文算法开关灯控制器.pdf (209.26 KB, downloads: 4) Post a circuit diagram, and plan to further add dimming function, expand GPS, power detection, leakage detection module, etc.
This post is from GD32 MCU
 
Personal signature科技飞速发展,学习永无止境。变压器有载调压,一小时万次切换。
 
 

31

Posts

0

Resources
16
 
Project.hex (90.39 KB, downloads: 3) Download the program to the GD32-colibri-F350RXdevelopment board chip, and power it through the USBconnection line. Without adding any additional circuit, the main functions of the latitude and longitude astronomical algorithm switch light controller can be tested through the supporting software.
This post is from GD32 MCU
 
Personal signature科技飞速发展,学习永无止境。变压器有载调压,一小时万次切换。
 
 

31

Posts

0

Resources
17
 
经纬度天文算法开关灯软件安装程序.exe (2.43 MB, downloads: 2) This is the "Longitude and Latitude Astronomy Algorithm Switch Light Software Installer.exe", Run as an administrator, install the matching computer software. When testing, first connect the GD32F350 development board to the USB port of the computer via a USB cable, then run LDKZ.exe or LDKZ1.exe, select the corresponding USB serial port, and then you can operate the test according to the uploaded video.
This post is from GD32 MCU
 
Personal signature科技飞速发展,学习永无止境。变压器有载调压,一小时万次切换。
 
 

31

Posts

0

Resources
18
 
For software flow and related instructions, please see my WeChat public account https://mp.weixin.qq.com/s/x6e1o2_i-fVeNRQU0JgiiQ, which has better browsing effect.
This post is from GD32 MCU
 
Personal signature科技飞速发展,学习永无止境。变压器有载调压,一小时万次切换。
 
 

869

Posts

0

Resources
19
 
Latitude and longitude astronomical algorithm switch light software installation program
This post is from GD32 MCU
 
 
 

Guess Your Favourite
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list