I am using the Sain Smart 16-channel relay module. A relay is energized when the corresponding input pin is connected to the ground. I am using an Arduino to control the relay module using the GPIO pins. The suggested wiring was to use a NPN transistor to ground the input pin. However, I did this and it seems to work without any transistor. I basically connected the input pin to the ground with a 5k ohm resistor. When the GPIO is 0, the voltage is 0 and the relay closes and the light turns on. And when the GPIO pin pulls it to 5V,the relay opens and turns off the light.
Is that a good way to do this?