18V Digital I/O Board?

Discussion in 'Embedded Systems and Microcontrollers' started by tecno40, Feb 9, 2013.

  1. tecno40

    Thread Starter Member

    Feb 9, 2013
    36
    0
    Hi,

    I was wondering if anyone could recommend a good development board that could control an 18v motor (reverse and forward motion), and accept input from push buttons via usb. I have experience with programming, and can pick up new languages pretty quick, but I'm new to hardware programming so helping me find the right board would be greatly appreciated.
     
  2. tecno40

    Thread Starter Member

    Feb 9, 2013
    36
    0
    I read on another forum that the arduino uno (https://www.sparkfun.com/products/11021) could handle up to 20v (12v was recommended). If I bought the board would I just plug the motor into a digital I/O port, and create a program to operate it?
     
  3. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    You'll need 2 items: H-Bridge capable of switching enough current to drive the motor, and a USB-> H-Bridge "interface", which can be done with a PIC microcontroller or other uC that has on-board USB client. The PIC will appear as a Serial Port to windows, so serial commands are sent over USB and the motor switches.

    A version could be made with an FTDI USB-> TTL Serial IC, then a serial UART controlled H-Bridge, but the price would be higher, though embedded programming would be taken out of the loop, all the "work" would be in the application with with USB host.
     
  4. tecno40

    Thread Starter Member

    Feb 9, 2013
    36
    0
    I've been looking at the setup someone else used for a 18v motor (http://arduino.cc/forum/index.php?topic=135477.0 -- the main parts for the drill being the uC and pwm I believe), and I don't see the h-bridge. Is he using a different method, or is one of the parts he has listed functioning as an H-Bridge?
     
    Last edited: Feb 9, 2013
  5. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    That is only for On/Off control on the low side (switching the ground on and off on the motor).

    If you want a reversible motor, you need an H-Bridge, if you only want to turn the power on/off, a logic level MOSFET like the one in his Sparkfun link would suffice, depending on the current your motor requires (this is a BIG requirement to know so the magic smoke stays inside your components).
     
  6. tecno40

    Thread Starter Member

    Feb 9, 2013
    36
    0
    Ah, thanks for the clarification

    I found one H-Bridge that supports the voltage i need SparkFun (https://www.sparkfun.com/products/315), but it only goes up to 1 amp, while the motor needs around 30 amps.
     
    Last edited: Feb 9, 2013
  7. tecno40

    Thread Starter Member

    Feb 9, 2013
    36
    0
    After searching for a while it is proving to be very difficult to find a H-Bridge that matches my requirements, so I'm considering creating one. Would something like this work http://switchit001.com/motor.png?
     
  8. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    The circuit above is all NPN, so they are only in parallel switching the motor on and off with a higher current ability.

    Here is a solution Though not cheap.

    I'm not sure if you could parallel two Of these or not, essentially treat the board as one H-Bridge.

    Realize that you are talking about switching and reversing nearly 600 Watts of power. That is a lot of current and requires special connectors and heavy gauge wire.

    If the voltage was lower, there would be more options, but 18V@30A won't be "cheap". The best solution wouldn't be a single IC, but an H-Bridge MOSFET Driver controller running 4 MOSFETS (2 N-Channel for low side, 2-Pchannel for high side - which is why the driver is required) with rather large heat sinks on the MOSFETs.
     
  9. tecno40

    Thread Starter Member

    Feb 9, 2013
    36
    0
  10. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    Where is the 30A coming from?

    Draw each state as a separate schematic. You are either putting 18V on your uC, which will kill it, or wanting your uC to somehow produce a 20V signal at 3 Amps to turn on an NPN transistor on the high side, as well as source another 3Amps on the low side, either of which will also kill the uC.

    Is 30A the running current or peak/stall current of the motor?
     
  11. tecno40

    Thread Starter Member

    Feb 9, 2013
    36
    0
    30A is the black line and running current.

    I will be using a smaller current to turn the switch so of the two options it would be the two 3A currents.

    How do you calculate the current needed to flip a MOSFET, and where do you find the max amps of the board? I looked at http://arduino.cc/en/Main/arduinoBoardUno, and it said the I/O pins use a 40mA current, so does that mean a single 3A current would kill it?

    EDIT: This is what I'm using for each MOSFET http://bildr.org/blog/wp-content/uploads/2012/03/rfp30n06le-arduino-solenoid.png
     
  12. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    Power Mosfets with low RDSON need a driver circuit. Search this forum for H-Bridge to see how bootstrap drivers have been used in the past.

    Logic Level MOSFETs (Identified by "Logic Level" in name, or in datasheet, RDSON is @5V) Though most low RDSon LL MOSFETS are all surface mount and lower voltage.

    Your earlier [SIZE=3]diagram was showing bipolar transis[SIZE=3]tors, specifically NPN of unknown type, which are [SIZE=3]held on with [SIZE=3]a base current of 1/1[SIZE=3]0th [SIZE=3]collector current, or 3A. [SIZE=3]This is fine if you have a driver, BJTs switch faster than MOSFETs, but also have power dissipation issues. 30A is where the line is blurry [SIZE=3]on choice (or Bi[SIZE=3]-FET, which is a bit m[SIZE=3]ore complex).

    [SIZE=3]In short, [SIZE=3]if you want [SIZE=3]to control forward and reverse by microcontroller, you'll need to spend money. It may not be a ton, but it will be more than just [SIZE=3]4 transistors[SIZE=3] @ 1.60 ea[SIZE=3] from Dig[SIZE=3]iKey (Spark[SIZE=3]Fun [SIZE=3]charges about $6 for same item, mor[SIZE=3]e[SIZE=3] if on a [SIZE=3]PCB[/SIZE][/SIZE][/SIZE]).[/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE] You'll need wire capable of carrying [SIZE=3]30A, which means 8 Gauge, which is not cheap. If the connections aren't soldered, you'll need [SIZE=3]50A Rated connectors.

    [SIZE=3]You may want [SIZE=3]to either st[SIZE=3]art with smaller motors ([SIZE=3]1-2A[SIZE=3] @6-12V[SIZE=3]) or learn a bit of [SIZE=3]ele[SIZE=3]ctronic[SIZE=3] theory [SIZE=3](e-book across top of screen is an EXCEL[SIZE=3]LENT source). If not spending money [SIZE=3]and [SIZE=3]wanting to use p[SIZE=3]arts you alr[SIZE=3]eady ha[SIZE=3]ve are limitations, th[SIZE=3]e system you are looking at cannot be done.[/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE]
    [/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE]
     
  13. tecno40

    Thread Starter Member

    Feb 9, 2013
    36
    0
    After reading some more about MOSFETs my understanding is that they quickly draw or release a strong current when they turn on/off, then draw virtually no current while they're in an on/off state. After reading some more on drivers, it seems most people are saying they're just capacitors to hold the energy for when the mosfet needs to quickly draw the current. Also someone told me the amperage to turn the MOSFET on doesn't really matter (only the volts matter), is that true?

    Based on this information I made a new MOSFET diagram that would only turn the motor on/off http://switchit001.com/motor2.png. Is this correct, or am I still missing something? I will move onto forward/reverse after I get the MOSFETs down, but I've realized that there is no chance of understanding H-Bridges if I can't understand MOSFETs.

    As for the wiring, I'm using 16 Gauge, so the wire should be able to hold the current.
     
  14. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    Your diagram is confusing. Now you have a 60V supply instead of an 18V supply.

    The transistor drawn is a P-Channel JFET, which is Much different than a MOSFET (For switching ground off/on, an N-Channel MOSFET is used).

    It is correct that MOSFETS only draw current while switching, this isn't much if used for a switch, but when switched tens of thousands of times per second, the current does add up a bit (PWM Speed Control), but most microcontrollers can source enough to switch one MOSFET.

    The MOSFET Driver I was referring to is actually a way to overcome the internal capacitance of the gate, usually a small BJT Transistor which switches a higher voltage, which is then fed to the gate.

    Does this make sense?
     
  15. tecno40

    Thread Starter Member

    Feb 9, 2013
    36
    0
    I'm using 60V instead of 18V as an example since the MOSFET stat sheet I was reading was for 60V (I will adjust it for 18V when I create the correct concept). As for the MOSFET I used the wrong symbol :/, but that is fixed now.

    As for the driver is it just a series of BJT transistors used to step the voltage up to the amount required by the MOSFET?
     
  16. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    The 60V is the maximum voltage the MOSFET can switch. You can use 18V through it without a problem.

    Important ratings:
    Part Number:
    Current capability:
    RDSon@5V:
    Gate Charge:

    I'd suggest downloading LTSpice IV (free) so you can test the circuit in simulation. There are a decent number of getting started tutorials for LTSpice, and a lot of component libraries. It will save you a lot of headaches/money trying to make something work.
     
  17. tecno40

    Thread Starter Member

    Feb 9, 2013
    36
    0
    Ok, so I download LTSpice, and created a few simple circuits just to get the hang of the program, but whenever I add a load and a battery in a series there is no voltage after the load. Should this be happening, or did I set something up wrong? http://switchit001.com/motor3.png
     
  18. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    You have an 18V Voltage source in parallel with a 30 Amp Controlled Current Sink.

    There isn't a motor, just two "virtuals". A motor can be modeled by a small inductor of about 1mH in series with a small resistor, such as 0.6Ω

    There are actual motor models available.

    Here is one I just threw together so you can mess with it.

    One is a .png image of simulation, you can see the gate charge effects, and the inductive spike from the motor at the top of the green wave (motor voltage @ MOSFET), blue line is uC-input, Here just a random PWM. You'll want to change the MOSFET to a model that you are using, the gate charge can have a large effect on turn on time.

    The 100k resistor is to ensure the MOSFET switches OFF when the Gate Voltage goes away (tie-down resistor). If it is left out, the MOSFET will stay on after the first pulse, try it in simulation. It's about the capacitance again.
     
  19. tecno40

    Thread Starter Member

    Feb 9, 2013
    36
    0
    Ok, so I got the motor working in LTSpice, and found a good tutorial on how to make an H-Bridge (http://www.pyroelectro.com/tutorials/h_bridge_4_transistor/index.html). The only problem is the tutorial is rated for a lower amperage (10 A). To get the tutorial/schematic(http://www.pyroelectro.com/tutorials/h_bridge_4_transistor/img/schematic.png) to work at the amperage I need, do I just need to replace the MOSFETS and BJTs with something similar to the ones I have listed below?

    P & N MOSFETS
    Pass through current: 55V 80A
    Gate Charge: 20V

    Transistor
    Collector Emitter Voltage: 30V
    Base Emitter Voltage: 5V
     
  20. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    Please take some time and Please Read This completely. If you don't understand a section, just ask. That paper covers nearly every aspect you'll need to take into consideration.

    BJTs are not used for high power H-Bridges due to the large amount of current drive needed to switch them on to saturation, and the VCE drop of a BJT generates a lot of heat when dealing with the currents you are looking at.

    An H-Bridge with MOSFET Drivers, or sometimes parallel MOSFETs are common solutions.

    Be sure to look at the datasheet of the components before buying. Never use the "MAX" for average current. If 30A is average, 60A could be the stall current!
     
Loading...