Originally posted by eccerr0r
View Post
Announcement
Collapse
No announcement yet.
How could I find a FET with specific specs?
Collapse
X
-
Re: How could I find a FET with specific specs?
-
Re: How could I find a FET with specific specs?
capacitor filtering if done wrong will also cause that to happen too... hence best for no capacitor.
Leave a comment:
-
Re: How could I find a FET with specific specs?
I have a nano controller for my engraving machine and I to test the PWM output pin I hooked up a LED to it and adjusted the 0 to 255 scaler but what I noticed is there only seem to either very dim or very bright but no real in between or is the way the controller program is written ( this is for laser diode input to its controller ) and also for the spindle motor controller has the same problem
I actually had to buy a controller that the controller could adjust the frequency lower for it to work correctly
This is why I did not recommend a nano for his projectLast edited by sam_sam_sam; 01-26-2021, 02:58 PM.
Leave a comment:
-
Re: How could I find a FET with specific specs?
Just need to write your code faster. I fear that perhaps it's the "arduino" thing that may be limiting people to speeds that cause flicker, I don't know - I've never used "arduino". I've used Atmel AVRs with straight gcc and assembly, as well as used the hardware PWM controller. At 3KHz I can barely discern any flickering if at all at any intensity, without any capacitor filtering. Granted using a video camera you may still get aliasing so maybe a small 0.01uF capacitor may help, but the idea is to completely omit it.
After all I don't know how many people here still use LED digital clocks from the 1980s-1990s. A lot of those those flicker at 60 or 120 Hz (or 50/100Hz, whatever your line frequency is at) - yet people don't really notice any flickering. Yes with a camera you'll see aliasing, but all in all this is the goal. Faster loops! And this isn't even the KHz that would be ideal.
Leave a comment:
-
Re: How could I find a FET with specific specs?
Originally posted by eccerr0r View PostIf you write your microcontroller software right, you won't see the LED pulsing, key is that you need it to be fast, very fast, like many kilohertz fast, then you won't see the pulsing anymore.
I would like to learn something here could you please tell me what controller would you use ( or micro controller can do what you are talking about )and could you also give a code example of how you would do this
thanks
Leave a comment:
-
Re: How could I find a FET with specific specs?
I'm done. I think I've already stated all the problems, in the design - even if you wish to mass produce them and reduce amount of defective devices - at this point, whether you take the red pill or the blue pill is up to you.
Leave a comment:
-
Re: How could I find a FET with specific specs?
Easygoing
Are you using a USB battery charger unit for the ( battery or batteries) for this project if so why not run the LEDs at 5 volts and use the correct value resistor for this voltage
Leave a comment:
-
Re: How could I find a FET with specific specs?
Actually even if you stick it on the output, you'd also waste power unless you also add an inductor.
If you write your microcontroller software right, you won't see the LED pulsing, key is that you need it to be fast, very fast, like many kilohertz fast, then you won't see the pulsing anymore.
Leave a comment:
-
Re: How could I find a FET with specific specs?
Originally posted by eccerr0r View Postyou MUST COMPLETELY LOSE THAT CAPACITOR if you want to save energy from battery use. That sole capacitor is causing you to waste a lot of the energy stored in the battery.
If you do not want to have this effect then you have to put this capacitor on the output pin
Trust me I have run into this problem before
Now you are probably right trying to run the mosfet at 3.3 volts might have issues I would agree with you about this
And if this is the case then use a ULN2803 which I mentioned earlier and if I can remember correctly I think you use it all the way down to 3 volts but you would have to look at the data sheet to make sureLast edited by sam_sam_sam; 01-26-2021, 12:58 PM.
Leave a comment:
-
Re: How could I find a FET with specific specs?
Originally posted by eccerr0r View PostThat sole capacitor is causing you to waste a lot of the energy stored in the battery.
Besides ... I don't see how the cap could cause any more loss than not having it since it's only mitigating the signal coming out of the microprocessor which can only put out a max of 40ma at the 3.3V that it's being fed.
Leave a comment:
-
Re: How could I find a FET with specific specs?
Originally posted by eccerr0r View PostHowever one thing that we're being lied to about is that the IRF510. These are not "logic level" FETs and will barely turn on if at all at 3.3V gate drive, again maybe you can cherry pick a device that will turn on, but in a production environment you'll get a lot of failures. A BJT here will guarantee turn on in all cases but it will limit LED voltages to 3.1V or so due to saturation voltage drop.
https://youtu.be/gLwZeiql5uc
Leave a comment:
-
Re: How could I find a FET with specific specs?
Yeah you got lucky, the threshold voltage of these FETs are not cut out for 3.3V usage and if you mass produce, you'll find a lot that don't work as planned.
And again you MUST COMPLETELY LOSE THAT CAPACITOR if you want to save energy from battery use. That sole capacitor is causing you to waste a lot of the energy stored in the battery.
Leave a comment:
-
Re: How could I find a FET with specific specs?
Originally posted by eccerr0r View PostHowever one thing that we're being lied to about is that the IRF510. These are not "logic level" FETs and will barely turn on if at all at 3.3V gate drive, again maybe you can cherry pick a device that will turn on, but in a production environment you'll get a lot of failures. A BJT here will guarantee turn on in all cases but it will limit LED voltages to 3.1V or so due to saturation voltage drop.
Here is a picture of the exact MOSFET that I used in the test. I also uploaded the pic file itself so you can check the date and time on it or whatever to confirm that I just took that picture.
Leave a comment:
-
Re: How could I find a FET with specific specs?
Originally posted by sam_sam_sam View PostThis looks ok but I would have the one ohm resistor on each LED and remove the one the mosfet to negative side of the power supply I might be wrong about this part it might not work correctly ——>
Or put the LEDs on the other side of the mosfet and have a resistor on each LEDs that goes to the negative side of the power supply
The reason why is so each led has the same current
Originally posted by sam_sam_sam View PostHave you tried a raising value capacitor on the output pin to the negative rail of the controller and what results do you get ( or maybe put a 5 UF more before the resistor) with higher value ( just curious what the difference is with capacitors values
Originally posted by sam_sam_sam View PostCan I ask you what are you making
I am glad you are making progress on this project
Is the mosfet getting warm or hot driving it at full brightness or at low brightness what happens then
and NO, the MOSFET doesn't get warm at all but it's a pretty beefy MOSFET rated I believe at 5 amps - which I couldn't imagine driving it that hard especially without a heat sync. It would be nice to scale it down for the final PCB, but then again ... I do have a lot of real estate in this project for a relatively simple circuit.
:-)
Leave a comment:
-
Re: How could I find a FET with specific specs?
Yes the proper way is to have individual resistors for each LED unless your LEDs are perfectly matched. In a prototype environment this is possible; in a production, not so much.
I think the OP got lucky that the mosfet likely won't get warm or hot at all due to the low/limited currents involved here. 270mA times negligible voltage drop in an ideal situation is not many watts of power.
However one thing that we're being lied to about is that the IRF510. These are not "logic level" FETs and will barely turn on if at all at 3.3V gate drive, again maybe you can cherry pick a device that will turn on, but in a production environment you'll get a lot of failures. A BJT here will guarantee turn on in all cases but it will limit LED voltages to 3.1V or so due to saturation voltage drop.
Leave a comment:
-
Re: How could I find a FET with specific specs?
Originally posted by sam_sam_sam View PostThis is the article that has how to hook a transistor to a micro controller output pin
Plus it gives you the resistance values for what type of transistor you might be using
I have even use a 2N3904 it also works very well with a 1k ohm resistor if I remember correctly but this is at 5 volts output from the pin
Originally posted by sam_sam_sam View PostBecause I would like to see what you have in mind with this project that is the reason I am following it
Because I might learn something I did not know for maybe a future project
HOWEVER, I found some reflective PLA material that I want to use to print the cones with as you can see here:
After some testing with the reflective material, I'm not too happy with the way it works, and have been considering using this mirror finish spray paint that they have for plastic model projects which would no doubt work much better, BUT ... I had also planned on getting these thin sheets of clear acrylic that has a melting point tens of degrees C lower than PLA, which means if I print the cones onto the plexiglass, it could possibly bond with it in the print process creating a protective transparent cover for the cones - but if I do that, then I can't spray paint the mirror finish on the inside of the cones ... so I'm not yet decided ... but the LEDs I've been experimenting within this post are significantly brighter than the LEDs I have in the prototype hat light now, which means they COULD be bright enough so that the lack of performance I get from the PLA reflective material might be offset and I could use it anyways and then print to the plexiglass sheet.
The microcontroller I'm using is an ATTINY85, here's the code that seems to work pretty well:
Code:#include <Arduino.h> #include <avr/sleep.h> #include <avr/interrupt.h> #include <BlockNot.h> #define BUTTON 3 #define P0 0 #define LO 0 #define MED 1 #define HI 2 int mode = 0; #define BUTTON_PRESSED digitalRead(BUTTON) == LOW #define TOO_HIGH mode > 2 BlockNot offTimer(2500); void setPins() { pinMode(BUTTON, INPUT); pinMode(P0, OUTPUT); } void sleep() { GIMSK |= _BV(PCIE); // Enable Pin Change Interrupts PCMSK |= _BV(PCINT3); // Use PB3 as interrupt pin ADCSRA &= ~_BV(ADEN); // ADC off set_sleep_mode(SLEEP_MODE_PWR_DOWN); sleep_enable(); // Sets the Sleep Enable bit in the MCUCR Register (SE BIT) sei(); // Enable interrupts sleep_cpu(); // sleep cli(); // Disable interrupts PCMSK &= ~_BV(PCINT3); // Turn off PB3 as interrupt pin sleep_disable(); // Clear SE bit ADCSRA |= _BV(ADEN); // ADC on sei(); // Enable interrupts <---THIS IS THE PROBLEM setPins(); } void allOff(){ analogWrite(P0, 0); } void ledLow() { analogWrite(P0, 193); } void ledMedium() { analogWrite(P0, 208); } void ledHIGH() { analogWrite(P0, 253); } void setup() { setPins(); allOff(); ledLow(); } void loop() { if (BUTTON_PRESSED) { offTimer.RESET; delay(100); while(BUTTON_PRESSED) { if (offTimer.ON_TRIGGER) { allOff(); delay(1000); sleep(); mode = -1; } } mode ++; if (TOO_HIGH) mode = LO; switch(mode) { case LO: ledLow(); break; case MED: ledMedium(); break; case HI: ledHIGH(); break; default: break; } delay(1000); } }
Originally posted by sam_sam_sam View PostOne interesting thing that has happened while looking up this information I found some information about a problem that I have been having using a battery spot welding machine controller board and this might help solve this issue
Here is the website that I found the answer to question about zero crossing and using the right optic sensor to a micro controller
https://microcontrollerslab.com/pc81...les-datasheet/
I found an error with the circuit diagram it does not show the right hook up for a load but it does give a code example which I am going to have to try
Leave a comment:
-
Re: How could I find a FET with specific specs?
This looks ok but I would have the one ohm resistor on each LED and remove the one the mosfet to negative side of the power supply
I might be wrong about this part it might not work correctly ——>
Or put the LEDs on the other side of the mosfet and have a resistor on each LEDs that goes to the negative side of the power supply
The reason why is so each led has the same current
Have you tried a raising value capacitor on the output pin to the negative rail of the controller and what results do you get ( or maybe put a 5 UF more before the resistor) with higher value ( just curious what the difference is with capacitors values I kind-a of know what might do but I only have experience doing it on the solenoid valve controller but have not tried this on LEDs before ) see if this makes a difference the only problem might be that response time for changing in brightness level will take longer ( this might be able to corrected this in the PWM code routine )
Can I ask you what are you making
Originally posted by EasyGoing1 View PostBy varying the duty cycle of the PWM output, I am able to get three states of brightness ... basically, in the low state, I drive them at 90mA then at 170mA then on the highest setting, I get 270mA and the LEDs are rated at 280. And that is all from a 3.3V source.
Is the mosfet getting warm or hot driving it at full brightness or at low brightness what happens thenLast edited by sam_sam_sam; 01-26-2021, 12:08 PM.
Leave a comment:
-
Re: How could I find a FET with specific specs?
Originally posted by eccerr0r View PostIn any case, proper drive needs to be figured out. OP apparently still hasn't figured out how to properly turn LEDs fully on and off - a requirement for PWM.
The circuit where I had three different output pins driving three different transistors (TIP-120 in this case) actually worked.
However, based on the feedback here, I decided to try this configuration:
And after playing around with the RC filter, I settled on the values in the schematic. I used an online calculator which told me to use a 68Ω resistor and a 4.7uF cap but when I tried that, there was still significant ripple in the output so I bumped up the values and as you see here, the results are pretty good:
(This is at the medium brightness PWM duty cycle before attaching the MOSFET)
Yellow is channel 1 on the scope attached to the output pin of the Arduino chip and green is channel 2 attached to the output of the RC filter. It's still kinda noisy, but I think that has more to do with the Hanetk USB scope that I'm using, and my final power source will be a battery and not this buck converter that I'm using now which may also be part of the noise.
By varying the duty cycle of the PWM output, I am able to get three states of brightness ... basically, in the low state, I drive them at 90mA then at 170mA then on the highest setting, I get 270mA and the LEDs are rated at 280. And that is all from a 3.3V source.
Leave a comment:
-
Re: How could I find a FET with specific specs?
This is the article that has how to hook a transistor to a micro controller output pin
Plus it gives you the resistance values for what type of transistor you might be using
I have even use a 2N3904 it also works very well with a 1k ohm resistor if I remember correctly but this is at 5 volts output from the pin
I have also use ULN2803 before these are very easy to use as well and is also covered in this article below
These values might be different depending on how your micro controller input/output pins are configured
I am using the Basic Stamp Controller as an example because I have used this controller many times in the past and because it well documented and easy to find the information
As far as writing the code for the micro controller that you are using you would have to research for example codes to get a rough idea of how to correctly write the code
I have tried in the past to use a circuit simulator program and was not impressed with the results I have to actually build the circuit to see if it would work correctly or not
EasyGoing
One note I am NOT trying be little you
I am posting this information just in case you do not have a full understanding of how and what it takes to get this project to work
I hope this helps you and I hope you understand what my intentions are
Because I would like to see what you have in mind with this project that is the reason I am following it
Because I might learn something I did not know for maybe a future project
One interesting thing that has happened while looking up this information I found some information about a problem that I have been having using a battery spot welding machine controller board and this might help solve this issue
Here is the website that I found the answer to question about zero crossing and using the right optic sensor to a micro controller
https://microcontrollerslab.com/pc81...les-datasheet/
I found an error with the circuit diagram it does not show the right hook up for a load but it does give a code example which I am going to have to tryAttached FilesLast edited by sam_sam_sam; 01-26-2021, 07:39 AM.
Leave a comment:
-
Re: How could I find a FET with specific specs?
The one thing that you have to understand using the PWM signal from at least the micro controller ( the one that I am using ) is that full ON and full OFF is not the same thing as what you see with your naked eye with a led light bulb output you have to use a volt meter to measure the average voltage output signal
The way to solve the output issue with a micro controller device is turn on the output and get this to work first then use the PWM signal command and it should work correctly after
If you want to understand how a PWM output works on a micro controller look at page 356 of this manual and it explain it in some detail of how you would use it
Also in this manual it also has a section that shows you how to hook up a transistor to an output pin
I hope this helpsAttached FilesLast edited by sam_sam_sam; 01-26-2021, 05:27 AM.
Leave a comment:
Leave a comment: