Actuators play a crucial role in modern distributed electric grids and renewable energy network architectures, implementing control actions based on sensor data to ensure optimal system performance and stability. This paper addresses the economic dispatch (ED) problem of distributed DC microgrids with renewable energy. In these systems, numerous sensors and actuators are integral for monitoring and controlling various parameters to ensure optimal performance. A new event-triggered distributed optimization algorithm in the discrete time domain is employed to ensure the minimum production cost of the power grid. This algorithm leverages data from sensors to make real-time adjustments through actuators, ensuring the maximum energy utilization rate of renewable generators (RGs) and the minimum cost of conventional generators (CGs). It realizes the optimal synergy between conventional energy and renewable energy. Compared to the continuous sampling optimization algorithm, the event-triggered control (ETC) optimization algorithm reduces the frequency of communication and current sampling, thus improving communication efficiency and extending the system’s lifetime. The use of actuators in this context is crucial for implementing these adjustments effectively. Additionally, the convergence and stability of the DC microgrid are proven by the designed Lyapunov function. Finally, the effectiveness of the proposed optimization algorithm is validated through simulations of the DC microgrid.