How to connect a Nextion 2.8 Enhanced to Cytron 3A 4-16V Dual Channel DC Motor Driver?

Hi
I am new and learning all about this, so please excuse a daft question.
Am I correct in thinking I can connect a Nextion 2.8 directly to the Cytron 3A 4-16V Dual Channel DC Motor Driver to control a stepper motor?

If so how do I connect the Nextion to the Cytron? The Cytron has connections marked PWM1 to PWM4 for the Microcontroller. I assume I connect one of the PWM-compatible GPIO pins from the Nextion to one of those, say PWM1 but what gets connected to PWM2?

Thank you

1 Like

Hi @Pete56 and welcome to our forum!

According to this library, GitHub - CytronTechnologies/CytronMotorDriver: Arduino library for Cytron motor drivers. , one input is for controlling the speed of the motor in forward direction, and second input is for controlling the speed of the motor in backwards direction.

So you can connect two GPIOs from the display to two PWM connections on the driver board. But this is usually used to control speed of brushed DC motors.

But since steppers are open loop systems, whenever your code should happen to block, your steppers will just run-away which is probably not what you want. So I am not sure if it is a good choice of control.

1 Like