Loading...
  Show Posts
Pages: [1] 2 3 ... 5
1  Using Arduino / LEDs and Multiplexing / Re: PWM with transistor and mosfet on: October 27, 2011, 11:05:49 am
Changed the mosfet to an IRFIZ34EPBF and it works. WTF? Only thing changed was the type of mosfet. Tried multiples of the other and nothing.
2  Using Arduino / LEDs and Multiplexing / Re: PWM with transistor and mosfet on: October 27, 2011, 10:54:29 am
Thanks for the help guys. Not sure where I'm going wrong. this is very frustrating, still have not got that circuit going properly.
So I went out and got some logic level mosfets, using Fairchild FDP7030BL n-channel mosfets now.

I hooked up the circuit and was getting PWM yesterday but now today when I hook it up I get just constant full brightness no pwm.

Have a 2k2 across the gate and source on the mosftet then the gate of mosfet attached to pwm pin, source of mosfet attached to ground and drain to - side of LEDs with an external +12v to + side of leds. Grounds are together.
3  Using Arduino / Project Guidance / Re: Not sure where to put this so its here... on: October 21, 2011, 03:25:18 pm
Thanks Grumpy. Reason I thought it was slower is because on Adafruit store it says "In a pinch, you can even use it to program AVRs (its a bit slow but works!)"
4  Using Arduino / Project Guidance / Not sure where to put this so its here... on: October 21, 2011, 02:27:36 pm
I have a standalone arduino project which needs to communicate with a pc. Besides the FT232 breakout board from adafruit are there any other smaller boards that I can hook up to the standalone that will allow the transfer of serial data?

If not, I heard the FT232 breakout board is slow at programming, would it also be to slow to use as a communication board in a project? Only really need 9600 baud but would like more if possible.
5  Using Arduino / LEDs and Multiplexing / Re: PWM with transistor and mosfet on: October 19, 2011, 03:18:36 pm
Not much of an EE is he?

Looks that way eh..

Hooked it up exactly like the schematic and how yall have said. Still no luck. Going to try a different breadboard, seems I have no luck with breadboards.
6  Using Arduino / LEDs and Multiplexing / Re: PWM with transistor and mosfet on: October 18, 2011, 09:33:07 am
Well, I must be looking over something small thats messing me up cause I have checked the wiring multiple times and have found nothing wrong. Even had an EE friend take a look and he said it looks right.

Its funny cause without the resistor from the FET gate to ground it works full brightness but no pwm.
When I have a resistor from the FET gate to ground no matter what size pwm works but with no brightness.

Hopefully one day I will get a hang of these dang circuits. These are supposed to be easy too, Im just wiring up LEDs for gosh sakes.

Excuse the crappy schematic, my first time using Fritzing.
7  Using Arduino / LEDs and Multiplexing / Re: PWM with transistor and mosfet on: October 17, 2011, 03:02:19 pm
My fault, I will give Magician suggestion a try.


~EDIT~

I hooked up the circuit as you wrote Magician and I get full brightness but no PWM.

By collector - gate MOSFET; you mean NPN collector to MOSFET gate correct?
8  Using Arduino / LEDs and Multiplexing / Re: PWM with transistor and mosfet on: October 17, 2011, 02:46:19 pm
Yes sir grumpy, I know they are not logic level thats why I'm running them off of the transistors. Yet even with the transistors switching +12v I can't get the full brightness with this setup and have PWM ability.

Magician:
If I put +12v to the transistor collector and then run the mosfet gate to the transistor collector wont it just get a solid +12v at the gate not allowing for pwm?
9  Using Arduino / LEDs and Multiplexing / PWM with transistor and mosfet on: October 17, 2011, 12:13:41 pm
Afternoon guys,
So I went away from my 5940's which did not have the current capacity I needed and am currently using IRF510 mosfets to power my LEDs.
These are rated @ 5.6A and 100V.
I cannot seem to get PWM working through this setup while allowing full brightness of my LEDs. If I just digitalWrite them high and low they are full power, then when I try to analogWrite they will not pwm at all just stay on full with intermittent quick flash as if it went on/off extremely quickly.
I can only get the pwm to work when I put a resistor on the FET gate to common ground, but then the are only about 1/4 bright if not less. Have tried resistor values between 2.2k - 10k with no difference.

current setup:

Arduino > NPN Transistor gate (collector connected to external +12v, emitter connected to FET gate) > FET (mosfet source connected to common ground, Drain connected to LED negative side. LED positive side connected to external +12v.

very simple code just to make sure things work as they should.
Code:
int fadevalues[] = {0, 2, 6, 8, 11, 16, 23, 32, 45, 55, 64, 78, 90, 109, 128, 140, 162, 181, 200, 222, 255};
const int led1 = 10;
const int led2 = 11;

void setup()
{
  pinMode(led1, OUTPUT);
  pinMode(led2, OUTPUT);
}
void loop()
{
  for (int i=0;i<20;i++)
  {
  analogWrite(led1,i);
  analogWrite(led2,i);
  delay(100);
  }
  for (int i=20;i>0;i--)
  {
  analogWrite(led1,i);
  analogWrite(led2,i);
  delay(100);
  }
}
10  Using Arduino / Programming Questions / Re: RPM reading is delayed... on: October 13, 2011, 03:31:11 pm
Solved the problem. I just changed the button input pins to high and made the sketch look for a low and it works. Thanks for the interrupt suggestion. I need to start using them more often, very useful.
11  Using Arduino / Programming Questions / Re: RPM reading is delayed... on: October 13, 2011, 02:45:15 pm
Here is my new code using interrupts. It seemed to work rather well before I added the reset buttons. Now I am having the same problem I was originally having.

Code:
volatile unsigned int rpm = 0;
volatile unsigned int rpm1 = 0;
const int b0 = 10;
const int b1 = 12;
int bs0 = 0;
int bs1 = 0;
void setup()
{
        attachInterrupt(0, irq_1, FALLING);
        attachInterrupt(1, irq_2, FALLING);
        Serial.begin(9600);
}

void loop(){
bs0 = digitalRead(b0);
bs1 = digitalRead(b1);

if (bs0 == HIGH)
{
  rpm = 0;
}
if (bs1 == HIGH)
{
  rpm1 = 0;
}}

void irq_1(){
  rpm++;
  Serial.print(rpm, DEC);
  Serial.println(" S1 RPMS");
}
void irq_2(){
  rpm1++;
  Serial.print(rpm1, DEC);
  Serial.println(" S2 RPMS");
}
Maybe I need some debouncing code? It works fine with 1 button without debounce code so I don't see why I would need it now.
12  Using Arduino / Networking, Protocols, and Devices / Additional Interrupts on: October 13, 2011, 02:32:13 pm
Is it possible to multiply the interrupts on the Arduino UNO? Or "spoof" more in code? I just started playing with them today due to feedback from another thread and was curious if I can add more to the uno? Sort of like multiplexing or hardwire other pins as interrupts?
13  Using Arduino / Programming Questions / Re: RPM reading is delayed... on: October 13, 2011, 01:30:03 pm
I will try the interrupts way, as for the buttons I am using 10k from the "ground" pin from my button to the digital pin on my Arduino. So +5v -> button -> 10k ->Arduino
14  Using Arduino / Programming Questions / RPM reading is delayed... on: October 13, 2011, 12:40:32 pm
I have a setup with 2 hall effect sensors to read 2 shafts and different rpms. When my code was just setup for one everything worked fine, now that I have two for some reason its not working properly anymore.. It takes anywhere from 5-10 revolutions before it starts counting up. Before that it will just display 1, 1, 1, 1 etc then finally goto 2,3,etc... Also once its counting properly if I hit my button to reset the count it has the same issue. Horrible code issue? I am using 2.2k resistors across my power & signal pin on each sensor.

Code:
const int SENSOR = 12;
const int SENSOR1 = 10;
int rpm = 0;
int rpm1 = 0;
int lasthall = 0;
int lasthall1 = 0;
int hallstate = 0;
int hallstate1 = 0;
const int button = 8;
const int button1 = 9;
int buttonstate = 0;
int buttonstate1 = 0;
void setup()
{
pinMode(SENSOR, INPUT);
        pinMode(SENSOR1, INPUT);
        pinMode(button, INPUT);
        pinMode(button1, INPUT);
digitalWrite(SENSOR, HIGH);
        digitalWrite(SENSOR1, HIGH);
        Serial.begin(9600);
}

void loop()
{   
  hallstate = digitalRead(SENSOR);
  hallstate1 = digitalRead(SENSOR1);

if (hallstate != lasthall)
{
  if (hallstate == LOW)
  {
    rpm++;
    Serial.print(rpm, DEC);
    Serial.println(" RPMs S1");
  }
}
  lasthall = hallstate;
  buttonstate = digitalRead(button);
  if (buttonstate == HIGH)
  {
    rpm = 0;
  }
 
if (hallstate1 != lasthall1)
{
  if (hallstate1 == LOW)
  {
    rpm1++;
    Serial.print(rpm1, DEC);
    Serial.println(" RPMs S2");
  }
}
  lasthall1 = hallstate1;
   
  buttonstate1 = digitalRead(button1);
  if (buttonstate1 == HIGH)
  {
    rpm1 = 0;
  }
}
15  Using Arduino / Project Guidance / Re: Arduino+TLC5940+12.8A LEDs on: September 28, 2011, 04:01:05 pm
Each set of LEDs I would like to control independently pulls 800mA. For the LEDs in the picture there are 4 sets of 4 strips. Each set pulling 800mA with the total pulling 3.2A

I would like to fade them all from full on to almost off at the same time. I know I can go to something like a MOSFET which I will be doing for the final product but I would really like to get this working correctly (full brightness) with the components I have listed in the first post just to give me a better understanding of circuits.
Pages: [1] 2 3 ... 5