Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: Controlling a pump with teensy3

  1. #1
    Junior Member
    Join Date
    Dec 2012
    Posts
    15

    Controlling a pump with teensy3

    Hello,

    I would like to control a small pump using teensy3. The pump requires 5-6V and I am looking at AQV112KL to take 3.3 output voltage from teensy3 pin and apply 5V to the pump. Is this the approach I should take, or there is a simpler way? I am also having dificulty understanding the spec for AQV112KL (spec), mainly how do I properly connect this relay. It seems that pin 4 gets +5V and pin 6 gets the load, 1 is 5V , 2 is ground, but which pin do I use for control? Any advise is welcome.

    Thanks,
    Alexander
    Last edited by sjcomp; 12-05-2012 at 01:25 AM.

  2. #2
    Alexander,

    I believe the teensy3 can provide 9mA of current on an output pin from what I read here. That opto may work, but it looks like it is rated at 10mA. On the drive side, it can only drive 0.5A, is that enough for the motor? Have you considered using a logic level FET to drive the motor instead of an opto? It looks like an IRL110 would work. Others with more experience would have to comment. I have used these with 5V micros and have had no issues. VND5N07 is another favorite logic level fet.

    Keith

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,088
    I'd use a TIP120 transistor, 1N5817 diode, and 470 ohm resistor, like this:

    Click image for larger version. 

Name:	s-000.jpg 
Views:	183 
Size:	16.5 KB 
ID:	81

    Whatever you do....


    Always use a diode in parallel with the motor!


    When you turn off the current to the motor, energy will be stored in the magnetic field inside the winding and iron. Without the diode, to provide a path for current to temporarily continue conducting with this energy dissipates (into a tiny amount of heating in the diode), it would create a high voltage spike that can easily destroy the transistor and maybe even Teensy. Always connect the diode in parallel with the motor, with the cathode side (the side with the stripe) facing towards positive.

  4. #4
    Junior Member
    Join Date
    Dec 2012
    Posts
    15
    Quote Originally Posted by PaulStoffregen View Post
    I'd use a TIP120 transistor, 1N5817 diode, and 470 ohm resistor, like this
    Thanks for the diagram and the diode hint, given that I am new to this, such advice is very valuable for me.

    I assume I can use the same diagram (adjusting for a different power source) to control a 12V motor, am I correct?

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,088
    Yes, this same circuit works for 12 volts, except of course you would not connect 12 volts to VIN. Connect the 12 volts only to the motor positive and the diode's cathode.

    Of course, it also depends on the ground or negative wire of the 12 volt supply connecting to the ground on Teensy 3.0.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •