Motor controller dc with trinket
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88152
- Joined: Sat Feb 07, 2009 10:11 am
Re: Motor controller dc with trinket
The Trinket can take up to 16V on the BAT+ pin. If you connect power to the USB+ pin, it must be 5v only.
- emcma002
- Posts: 4
- Joined: Thu Jan 26, 2017 3:14 pm
Re: Motor controller dc with trinket
Hello, I recently purchased a trinket 5v and 3.3v. I am trying to use it to control a dc motor with a potentiometer. could you please help me with the code that i need to do this with? that would be greatly appreciated!
- adafruit_support_bill
- Posts: 88152
- Joined: Sat Feb 07, 2009 10:11 am
Re: Motor controller dc with trinket
Please post a link to the electrical specifications for the motor you want to drive.
Also, what kind of control do you need? Speed only? Or direction and speed?
Also, what kind of control do you need? Speed only? Or direction and speed?
- emcma002
- Posts: 4
- Joined: Thu Jan 26, 2017 3:14 pm
Re: Motor controller dc with trinket
I need just speed control and the specifications for the motor are: 12VDC motor
- adafruit_support_bill
- Posts: 88152
- Joined: Sat Feb 07, 2009 10:11 am
Re: Motor controller dc with trinket
12v DC motors come in many sized and have a wide range of current requirements. We'll need a bit more detail than that.
- emcma002
- Posts: 4
- Joined: Thu Jan 26, 2017 3:14 pm
Re: Motor controller dc with trinket
Brand new motor manufactured by Nichibo
Model UC-280P-19160
Operates on 12 VDC nominal
Operating voltage range: 6 VDC to 12 VDC
No load speed at 12 VDC: 11,500 RPM
No load current: 150 mA
Full load (maximum efficiency @ 12 VDC) performance characteristics:
Speed: 9,000 RPM
Current: 570 mA
Torque: 46 g-cm (4.51 mN-m)
Power output: 4.3 Watts
Stall torque: 250 g-cm (24.51 mN-m)
Stall current: 2,900 mA
Model UC-280P-19160
Operates on 12 VDC nominal
Operating voltage range: 6 VDC to 12 VDC
No load speed at 12 VDC: 11,500 RPM
No load current: 150 mA
Full load (maximum efficiency @ 12 VDC) performance characteristics:
Speed: 9,000 RPM
Current: 570 mA
Torque: 46 g-cm (4.51 mN-m)
Power output: 4.3 Watts
Stall torque: 250 g-cm (24.51 mN-m)
Stall current: 2,900 mA
- adafruit_support_bill
- Posts: 88152
- Joined: Sat Feb 07, 2009 10:11 am
Re: Motor controller dc with trinket
That is a relatively small motor, so a small transistor like a PN2222 will be sufficient to drive it. You can use the circuit and code here, with the Trinket substitued for the Arduino.:
https://learn.adafruit.com/adafruit-ard ... ransistors
Also, you will need to use pin #0 or pin #1 on the Trinket instead of pin D3 on the Arduino.
The code will be the same as the Arduino code in that tutorial also - except you will need to change "motorPin" to the pin number you are using on the Trinket.
https://learn.adafruit.com/adafruit-ard ... duino-code
https://learn.adafruit.com/adafruit-ard ... ransistors
Also, you will need to use pin #0 or pin #1 on the Trinket instead of pin D3 on the Arduino.
The code will be the same as the Arduino code in that tutorial also - except you will need to change "motorPin" to the pin number you are using on the Trinket.
https://learn.adafruit.com/adafruit-ard ... duino-code
- emcma002
- Posts: 4
- Joined: Thu Jan 26, 2017 3:14 pm
Re: Motor controller dc with trinket
How would i go about adding a potentiometer to the circuit?
- adafruit_support_bill
- Posts: 88152
- Joined: Sat Feb 07, 2009 10:11 am
Re: Motor controller dc with trinket
See the potentiometer wiring in this guide:
https://learn.adafruit.com/trinket-gemm ... rol/wiring
https://learn.adafruit.com/trinket-gemm ... rol/wiring
Please be positive and constructive with your questions and comments.