This circuit is designed to control a DC motor using a NodeMCU V3 ESP8266 microcontroller and a 2-channel relay module. The power for the circuit is provided by a LiPoly Battery (1300mAh), which is stepped down to a suitable voltage for the NodeMCU and relay module by an XL4015 5A DC Buck Step-down converter. The NodeMCU controls the relay module, which in turn controls the power supplied to the DC motor. The circuit does not include any embedded code as none was provided.
Vin
connected to the output voltage of the XL4015 step-down converter.GND
connected to the ground of the XL4015 step-down converter.D1
connected to IN 1
on the 2 channel relay module.D2
connected to IN 2
on the 2 channel relay module.positive
connected to Input +
on the XL4015 step-down converter and N.C. 2
on the 2 channel relay module.negative
connected to Input -
on the XL4015 step-down converter, N.O. 2
, and N.O. 1
on the 2 channel relay module.VCC+
connected to the output voltage of the XL4015 step-down converter.VCC- (GND)
connected to the ground of the XL4015 step-down converter.IN 1
controlled by D1
on the NodeMCU.IN 2
controlled by D2
on the NodeMCU.N.O. 1
and N.O. 2
connected to the negative of the LiPoly Battery.COM 1
connected to pin 1
of the DC Motor.COM 2
and N.C. 1
are not connected to any other components in the circuit.N.C. 2
connected to the positive of the LiPoly Battery and pin 2
of the DC Motor.Input +
connected to the positive of the LiPoly Battery.Input -
connected to the negative of the LiPoly Battery.Output +
connected to VCC+
on the 2 channel relay module and Vin
on the NodeMCU.Output -
connected to VCC- (GND)
on the 2 channel relay module and GND
on the NodeMCU.pin 1
connected to COM 1
on the 2 channel relay module.pin 2
connected to N.C. 2
on the 2 channel relay module and the positive of the LiPoly Battery.No code was provided for the microcontroller. If code is later provided, it should be documented here with explanations of how it interacts with the hardware components, including setup, main loop, and any functions or libraries used to control the relay module and, by extension, the DC motor.