Loading...
  Show Posts
Pages: 1 2 [3] 4 5 ... 14
31  Using Arduino / General Electronics / Re: Mosfet gate voltage on: February 23, 2013, 02:00:42 pm
I measure anywhere from 1.2V to 4.96V on both sides of the resistor. It jumps all around. I'm going to try to wire up a TIP 120 and see how the motor responds to that.
32  Using Arduino / General Electronics / Re: Mosfet gate voltage on: February 23, 2013, 01:37:42 pm
Quote
Those voltage readings are good. So if we use a 220-ohm resistor between the MCU and MOSFET gate, and just drive the pin with digitalWrite() rather than PWM, when the pin is driven high, what are the voltages on either side of the 220-ohm resistor?

You want me to take the motor out of the circuit or leave it in?
33  Using Arduino / General Electronics / Re: Mosfet gate voltage on: February 23, 2013, 12:23:45 pm
Yea, I'm reading it with the DMM when it is fully on (255). I also have tried code without the PWM by just using digital write.

Quote
@Tesla, two questions:

1. Is there any mechanical load on the motor, or is it just spinning free?
2. Is the 7805 getting hot?

Something to try, test the drive capability of the MCU. Remove the motor and MOSFET, try to drive a purely resistive load from the ATmega. Connect a 220-ohm resistor from an output pin to ground. Drive the pin high, measure the pin voltage. Now connect the resistor from the pin to +5V and drive it low, again measure the pin voltage.

The motor is just spinning free, and the 7805 is not getting hot. In fact I can't find any part of the circuit getting hot. I tried connecting the 220-ohm resistor and read 4.74V when driven high from output to ground. It measures 0.47V when driven low from output to +5V.

Here are some photos of my circuit.

34  Using Arduino / General Electronics / Re: Mosfet gate voltage on: February 23, 2013, 10:51:32 am
As I described above, the motor works fine when the ATmega is plugged back into the arduino board, and I use the same circuit components including the mosfet. I also read 5V from the output pin to the mosfet gate.

When the ATmega 328 is back on the breadboard as a standalone, I have even tried switching out the mosfets and get the negative results.

what is "Voltage(*)" ?
35  Using Arduino / General Electronics / Re: Mosfet gate voltage on: February 23, 2013, 08:20:02 am
thanks majenko,

I do have a 100 ohm series resistor between the I/O pin and the mosfet gate, but I'll try a 220 ohm resistor.

You are right about the breadboard. I am planning to solder the entire circuit into a perf board, but I just wanted to use a breadboard first to test my circuit wiring because I don't have many spare parts.

If I insert the ATmega chip back into the arduino board, power the board from the same batteries and regulator and wire the I/O pin to the mosfet gate the motor runs as it should and I measure 5V between the I/O pin and mosfet gate. Any idea why that works but the standalone arduino doesn't?  Could it be the values of the decoupling capacitors that the arduino uses? That's one more thing I would like to check before I solder the circuit into the perf board. 

36  Using Arduino / General Electronics / Re: Mosfet gate voltage on: February 23, 2013, 06:18:17 am
I edited my first paragraph. I should have clarified that the voltage to the mosfet gate from the output pin is 2v and the rest of the circuit measures 5v where it should measure 5v. I'm having a hard time understanding why when I use the same ATmega chip, same mosfet motor circuit, and same power supply works as expected when the chip is in the arduino board but doesn't work when I have the Atmega chip on the breadboard as a standalone. When I say "works" I mean that I measure 5v between output pin and mosfet gate and the motor is running.
Thanks for the replies.
37  Using Arduino / General Electronics / Mosfet gate voltage on: February 22, 2013, 08:46:07 pm
When I apply power to my breadboarded ATmega 328 with a small DC motor driven through a logic level mosfet, the voltage measures about 5v then drops to around 2v after 4 or 5 seconds. EDIT: I'm referring to the voltage between the output pin and mosfet gate. The rest of the circuit measures 5v where it should measure 5v.

Power:
I'm using 6 AA rechargeable NiMH batteries through a 7805 regulator decoupled with .1uF and 22uF on the input and .1uF and 10uF on the output. Edit: 1.5A regulator
 
Mosfet wiring and datasheet:
see attached photo. I also put a 100 Ohm resistor in series from output pin to mosfet gate per Crossroads and others in other posts.
http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Components/General/FQP30N06L.pdf
 
ATmega 328 wiring:
http://arduino.cc/en/Main/Standalone

Motor:
http://www.pololu.com/catalog/product/77

Code:
Code:
int StartSpeed=0; // you have to experiement to find the magic number.
int StopSpeed=255;//Again experiment ok
const int MotorPin=3;
int i=StartSpeed;
unsigned long TimeNow;
unsigned long PreviousMillis=0;
long Delay=10; // experiment with the value ok, the lower the value the steeper the gradiend of speed

void setup()
{
  pinMode(MotorPin,OUTPUT);
  digitalWrite(MotorPin,LOW);
}

void loop()
{
  if (i<StopSpeed)
  {
    unsigned long CurrentMillis=millis();
    if (CurrentMillis-PreviousMillis>=Delay)
    {
      PreviousMillis=CurrentMillis;
      i ++;
    }
  }
  analogWrite(MotorPin,i);
}

Things I have tried to fix:

1. 0.1uF capacitor in series with the flyback diode
no change

2. switching regulator
no change
http://www.murata-ps.com/data/power/oki-78sr.pdf


3. changing output pins
no change

4. changing ATmega 328
no change

5. changing code to non-PWM using just digital write high
Code:
digitalWrite(motorPin, HIGH);
no change

6. Swapping out motor
no change

7. swapping LED and current limiting resistor for motor
works fine

8. using same code, same power, and same ATmega 328 plugged into the Arduino
works fine!
This is what puzzles me most because I assumed that I had damaged the two ATmega 328's that I am using, but this tells me that they aren't damaged.

Any suggestions are greatly appreciated. Thanks in advance.
38  Using Arduino / Programming Questions / Re: what does this mean 'val is not declared in this scope'? on: February 10, 2013, 08:56:44 am
Code:
val1 = analogRead(potpin1);            // reads the value of the potentiometer (value between 0 and 1023)
(it comes here)

Delete that second line or make it a comment. Also you have imported the servo library twice.

39  Using Arduino / Motors, Mechanics, and Power / Re: Logic Level Mosfet on: February 05, 2013, 06:58:42 pm
Quote
Some surface mount packages like DPAK aren't
particularly small and can be soldered onto strip board fairly easily, note.
Good tip. I was wondering about that. thanks
40  Using Arduino / Motors, Mechanics, and Power / Re: Logic Level Mosfet on: February 05, 2013, 02:16:53 pm
Thanks Lefty.

When I search a company like Mouser or Digi Key for a logic level mosfet, what filter am I looking for?
41  Using Arduino / Motors, Mechanics, and Power / Logic Level Mosfet on: February 05, 2013, 01:49:27 pm
Is the FQP30N06L a logic level mosfet? This is from a post that is about a year old referring to the the FQP30N06L:

http://arduino.cc/forum/index.php/topic,102455.0.html

Quote
Both those MOSFET types require 10V of gate drive, they won't work properly with 5V - they might turn on a little bit, but they won't do so reliably.

When looking for MOSFETs for direct drive from logic level (5V) signals, you must get logic-level MOSFETs.  The key spec on the datasheet is the value of Vgs at which the Rds(on) is specified.  "Rds(on) at Vgs=4.5V" is typically the specification to look for.  4.5V is used to allow for below-spec 5V supplies.  If the only Rds(on) values are given for Vgs=10V, or if Vth is specified as "2--4V" then is NOT logic level.

Vth (threshold voltage) confuses a lot of newcomers - its the voltage at which the device switches OFF.  For logic level devices it will typically be 0.5 to 1.0V or so.

I bought that mosfet from Sparkfun without looking at the data sheet because they claim that it is logic level.
https://www.sparkfun.com/products/10213

Here are some screenshots of the data sheet that I don't understand.  http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Components/General/FQP30N06L.pdf

The first screenshot leads me to believe that is is logic level because of the R
DS
characteristics, but the second screenshot leads me to believe that it isn't logic level. Can somebody please enlighten me?
42  Using Arduino / Motors, Mechanics, and Power / Re: Wishing my Tamiya Motors Had More Drive on: February 03, 2013, 08:02:29 pm
It would be a huge help to get rid of the weight of that lantern battery and to have front wheels that can actually turn instead of dragging on a high friction surface.
43  Using Arduino / Sensors / Re: MaxSonar Noise Problem? on: February 01, 2013, 04:22:45 pm
This wiring diagram is from Maxbotix to help suppress noise.
44  Using Arduino / Sensors / Re: MaxSonar Noise Problem? on: February 01, 2013, 05:55:41 am
Can you post your code and schematic? That would be a huge help for diagnostics.
45  Using Arduino / Project Guidance / Re: FTDI Debugger on: January 30, 2013, 11:24:08 pm
Quote
or because my custom Arduino based boards have a +5v voltage regulator.. which needs more than +5 to power it).. so I power externally.. but I still want my FTDI cable connected (RX/TX/GND) so I can see whats going on in my serial monitor.. or do serial communications..etc..
Yea that's the only reason I would like the FTDI cable connected as well, and I'll also be using a 5V regulator.  Good to know it isn't letting the smoke out. Thanks
Pages: 1 2 [3] 4 5 ... 14