papaonn
Newbie level 5
Hi there,
I am new to eletronics,
I have been struggling to get a pwm output to control my motor.
My working is like this :
1) i connected a usb-to-rs232 converter and connecting pin5 to GND, pin3 (TX) to my NPN2222A(transistor) Base.
2) i programmed in C, using baudrate 9600, 8bit data, 1 stopbit, and send 0x00 to 0xFF to the serial port.
3) however, i could not get enough current to rotate my motor!
4) so i decided to change my motor to LED to see what's going on, then i figured out that the signal sent from TX to 2222A Base is too small in current! the LED is dimming with very weak current, and there is no significant changes in receiving different signals (0x00 - 0xFF).
My Question is :
A) am i working right to generate PWM in this way?
B) if so, how am i going to enlarge my current from PWM signal generated from serial port pin3 (TX) ?
C) is using 2222A appropriate for PWM control?
Thank you so much!
I am new to eletronics,
I have been struggling to get a pwm output to control my motor.
My working is like this :
1) i connected a usb-to-rs232 converter and connecting pin5 to GND, pin3 (TX) to my NPN2222A(transistor) Base.
2) i programmed in C, using baudrate 9600, 8bit data, 1 stopbit, and send 0x00 to 0xFF to the serial port.
3) however, i could not get enough current to rotate my motor!
4) so i decided to change my motor to LED to see what's going on, then i figured out that the signal sent from TX to 2222A Base is too small in current! the LED is dimming with very weak current, and there is no significant changes in receiving different signals (0x00 - 0xFF).
My Question is :
A) am i working right to generate PWM in this way?
B) if so, how am i going to enlarge my current from PWM signal generated from serial port pin3 (TX) ?
C) is using 2222A appropriate for PWM control?
Thank you so much!
Last edited: