Badcaps.net Forum
Go Back   Badcaps Forums > Troubleshooting Hardware & Devices and Electronics Theory > General Electronics Technical Discussion
Register FAQ Calendar Search Today's Posts Mark Forums Read

 
Thread Tools Display Modes
Old 01-26-2021, 12:55 PM   #41
eccerr0r
Solder Sloth
 
eccerr0r's Avatar
 
Join Date: Nov 2012
City & State: CO
My Country: USA
Line Voltage: 120VAC 60Hz
I'm a: Hobbyist Tech
Posts: 5,706
Default 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.
eccerr0r is offline   Reply With Quote
Old 01-26-2021, 01:05 PM   #42
sam_sam_sam
Badcaps Veteran
 
Join Date: Jul 2011
City & State: Sunny Jacksonville FL
My Country: USA
Line Voltage: 120 Volts 60 HZ
I'm a: Knowledge Seeker
Posts: 2,607
Default 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
__________________
9 PC LCD Monitor
6 LCD Flat Screen TV
30 Desk Top Switching Power Supply
10 Battery Charger Switching Power Supply for Power Tool
6 18v Lithium Battery Power Boards for Tool Battery Packs
1 XBox 360 Switching Power Supply and M Board
25 Servo Drives 220/460 3 Phase
6 De-soldering Station Switching Power Supply 1 Power Supply
1 Dell Mother Board
15 Computer Power Supply
1 HP Printer Supply & Control Board * lighting finished it *


These two repairs where found with a ESR meter...> Temp at 50*F then at 90*F the ESR reading more than 10%

1 Over Head Crane Current Sensing Board ( VFD Failure Five Years Later )
2 Hem Saw Computer Stack Board

All of these had CAPs POOF
All of the mosfet that are taken out by bad caps
sam_sam_sam is offline   Reply With Quote
Old 01-26-2021, 01:15 PM   #43
eccerr0r
Solder Sloth
 
eccerr0r's Avatar
 
Join Date: Nov 2012
City & State: CO
My Country: USA
Line Voltage: 120VAC 60Hz
I'm a: Hobbyist Tech
Posts: 5,706
Default 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.
eccerr0r is offline   Reply With Quote
Old 01-26-2021, 02:00 PM   #44
sam_sam_sam
Badcaps Veteran
 
Join Date: Jul 2011
City & State: Sunny Jacksonville FL
My Country: USA
Line Voltage: 120 Volts 60 HZ
I'm a: Knowledge Seeker
Posts: 2,607
Default Re: How could I find a FET with specific specs?

Quote:
Originally Posted by eccerr0r View Post
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.
i am not trying to be an a** here with you but you made this statement above

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
sam_sam_sam is offline   Reply With Quote
Old 01-26-2021, 02:19 PM   #45
eccerr0r
Solder Sloth
 
eccerr0r's Avatar
 
Join Date: Nov 2012
City & State: CO
My Country: USA
Line Voltage: 120VAC 60Hz
I'm a: Hobbyist Tech
Posts: 5,706
Default 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.01F 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.
eccerr0r is offline   Reply With Quote
Old 01-26-2021, 02:55 PM   #46
sam_sam_sam
Badcaps Veteran
 
Join Date: Jul 2011
City & State: Sunny Jacksonville FL
My Country: USA
Line Voltage: 120 Volts 60 HZ
I'm a: Knowledge Seeker
Posts: 2,607
Default 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 project

Last edited by sam_sam_sam; 01-26-2021 at 02:58 PM..
sam_sam_sam is offline   Reply With Quote
Old 01-26-2021, 04:22 PM   #47
eccerr0r
Solder Sloth
 
eccerr0r's Avatar
 
Join Date: Nov 2012
City & State: CO
My Country: USA
Line Voltage: 120VAC 60Hz
I'm a: Hobbyist Tech
Posts: 5,706
Default 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.
eccerr0r is offline   Reply With Quote
Old 01-26-2021, 05:31 PM   #48
sam_sam_sam
Badcaps Veteran
 
Join Date: Jul 2011
City & State: Sunny Jacksonville FL
My Country: USA
Line Voltage: 120 Volts 60 HZ
I'm a: Knowledge Seeker
Posts: 2,607
Default Re: How could I find a FET with specific specs?

Quote:
Originally Posted by eccerr0r View Post
capacitor filtering if done wrong will also cause that to happen too... hence best for no capacitor.
This was the way the board is set up I did not add anything but the board might have one
sam_sam_sam is offline   Reply With Quote
Old 01-26-2021, 05:57 PM   #49
eccerr0r
Solder Sloth
 
eccerr0r's Avatar
 
Join Date: Nov 2012
City & State: CO
My Country: USA
Line Voltage: 120VAC 60Hz
I'm a: Hobbyist Tech
Posts: 5,706
Default Re: How could I find a FET with specific specs?

Also need to consider the fact that there are so many variables are involved, but if there's a capacitor that can sustain the LED for longer than the pulse width and the switching transistor output impedance is low, well, there you have it - a recipe for the LED to be on full brightness that has no dimming capability.

As for why I think the design OP had created is "broken" - notice he had hardcoded constants in his code. These hardcoded constants are specific to the specific transistor being used: if a different IRF510 was substituted, there's no guarantee the behavior would be the same - some would be brighter at some values, other dimmer, and very possible that some transistors would not even light up at all even though the transistor is considered "working". That's the concern I have.
eccerr0r is offline   Reply With Quote
Old 01-26-2021, 07:05 PM   #50
sam_sam_sam
Badcaps Veteran
 
Join Date: Jul 2011
City & State: Sunny Jacksonville FL
My Country: USA
Line Voltage: 120 Volts 60 HZ
I'm a: Knowledge Seeker
Posts: 2,607
Default Re: How could I find a FET with specific specs?

I realize that and I also know that probably the manufacturers of these DYI kits for engraver machines are probably taking as many short cut as they can to keep the cost down

So I have to see if I can improve the functionality of the the board that I plain to use if that means removing components that should not be there for how I want to use it

Or make my own board but I am not up to doing this at this point

I have one question are there any PWM code that would adjust from 0 to 255 and you can see the difference as you increase/decrease the scaler value

( now if you hook a meter to the output you do see the voltage climb but increments are to large for what I want in steps or I might be asking for to much )

I am not a nano programmer and never programmed one but I would like to see if I could learn enough to some what get good enough at it to maybe correct some issues with the way this program is written and I aware of the fact that it will take time

Last edited by sam_sam_sam; 01-26-2021 at 07:35 PM..
sam_sam_sam is offline   Reply With Quote
Old 01-26-2021, 07:21 PM   #51
budm
Badcaps Veteran
 
budm's Avatar
 
Join Date: Feb 2010
City & State: S.F. Bay area
My Country: USA
Line Voltage: 120V 60Hz
I'm a: Knowledge Seeker
Posts: 39,120
Default Re: How could I find a FET with specific specs?

That large RC on the GATE of the MOSFET defeats the purpose of turning MOSFET ON and OFF in PWM fashion, you are using MOSFET in linear mode, wasting energy. 3.3V drive is barely enough to turn MOSFET fully ON and OFF, look at the spec sheet of the MOSFET for clarification.
Look at the RC Time constant and look at you PWM frequency, is the cap able to be fully charged and discharged based on your PWM frequency?
Study the effect of that RC and experiment with changing the value of RC and the PWM frequency to see what effect you will see if you want to learn.
__________________
Never stop learning
Basic LCD TV and Monitor troubleshooting guides.
http://www.badcaps.net/forum/showthr...956#post305956

Voltage Regulator (LDO) testing:
http://www.badcaps.net/forum/showthr...999#post300999

Inverter testing using old CFL:
http://www.badcaps.net/forum/showthr...er+testing+cfl

Tear down pictures : Hit the ">" Show Albums and stories" on the left side
http://s807.photobucket.com/user/budm/library/

TV Factory reset codes listing:
http://www.badcaps.net/forum/showthread.php?t=24809

Last edited by budm; 01-26-2021 at 07:31 PM..
budm is offline   Reply With Quote
Old 01-26-2021, 10:53 PM   #52
EasyGoing1
Shock Therapist
 
EasyGoing1's Avatar
 
Join Date: Sep 2016
City & State: Victorville, CA
My Country: USA
Line Voltage: 120VAC 60Hz
I'm a: Hardcore Geek
Posts: 580
Default Re: How could I find a FET with specific specs?

Quote:
Originally Posted by eccerr0r View Post
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.
This is actually a solid statement... the MC currently defaults to only 450 Hz on the PWM frequency, but I was looking at the datasheet as it tries to explain how to speed that up ... but datasheets sometimes are very ... ummm ... concise??? might be the word I'm looking for? Of course, they assume a certain level of knowledge then they're very brief in what they say ... so I'll look for some blogs on how to do it because you're on to something here. If I could get that PWM frequency up into the Khz range it certainly would not be noticeable.

I'm curious though ... how is that cap sucking down energy when all it can do is balance the waveform that the pin is kicking out? I mean whether the cap is there or not, the chip only puts out what it puts out... and it would put out the same whether the cap was there or not ... so I'm a bit confused about that point.
__________________
EasyGoing1 is offline   Reply With Quote
Old 01-26-2021, 10:56 PM   #53
EasyGoing1
Shock Therapist
 
EasyGoing1's Avatar
 
Join Date: Sep 2016
City & State: Victorville, CA
My Country: USA
Line Voltage: 120VAC 60Hz
I'm a: Hardcore Geek
Posts: 580
Default Re: How could I find a FET with specific specs?

Quote:
Originally Posted by budm View Post
That large RC on the GATE of the MOSFET defeats the purpose of turning MOSFET ON and OFF in PWM fashion, you are using MOSFET in linear mode, wasting energy. 3.3V drive is barely enough to turn MOSFET fully ON and OFF, look at the spec sheet of the MOSFET for clarification.
Look at the RC Time constant and look at you PWM frequency, is the cap able to be fully charged and discharged based on your PWM frequency?
Study the effect of that RC and experiment with changing the value of RC and the PWM frequency to see what effect you will see if you want to learn.
I posted this earlier, but here it is again ... this was taken from my scope on this exact RC filter... The yellow line obviously is the output of the MC and the green is at the point where the resistor and the cap meet ... so basically this is the waveform both before and after the resistor...



EasyGoing1 is offline   Reply With Quote
Old 01-26-2021, 11:03 PM   #54
EasyGoing1
Shock Therapist
 
EasyGoing1's Avatar
 
Join Date: Sep 2016
City & State: Victorville, CA
My Country: USA
Line Voltage: 120VAC 60Hz
I'm a: Hardcore Geek
Posts: 580
Default Re: How could I find a FET with specific specs?

Quote:
Originally Posted by sam_sam_sam View Post
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
Yes, one of those chargers for LiIon that lets you both run the circuit and charge the battery at the same time. It was an experiment for me and I'm not happy with it because when the battery discharges and gets sufficiently low enough, you can't run the circuit even if you recharge the battery without first disconnecting the battery then re-connecting it ... I don't know if it is an anomaly with this specific charger or if that is the standard behavior of all such chargers ... this is my first experience with this type.

And the reason why not 5 volts is because the best I can get from the battery is 4.2.
EasyGoing1 is offline   Reply With Quote
Old 01-26-2021, 11:04 PM   #55
EasyGoing1
Shock Therapist
 
EasyGoing1's Avatar
 
Join Date: Sep 2016
City & State: Victorville, CA
My Country: USA
Line Voltage: 120VAC 60Hz
I'm a: Hardcore Geek
Posts: 580
Default Re: How could I find a FET with specific specs?

Quote:
Originally Posted by eccerr0r View Post
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.
Mass production wasn't in the plan ... but making some for friends and family definitely was in the plans.
EasyGoing1 is offline   Reply With Quote
Old 01-26-2021, 11:12 PM   #56
EasyGoing1
Shock Therapist
 
EasyGoing1's Avatar
 
Join Date: Sep 2016
City & State: Victorville, CA
My Country: USA
Line Voltage: 120VAC 60Hz
I'm a: Hardcore Geek
Posts: 580
Default Re: How could I find a FET with specific specs?

Quote:
Originally Posted by sam_sam_sam View Post
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 project
I've worked with the Arduino Nano more than any other microcontroller... you have to make sure that you're on a pin capable of PWM and on the Nano those pins are 3, 5, 6, 9, 10, 11 - both the physical pin number and the number you reference in code... you set the pinMode to OUTPUT, then you vary the duty cycle using the analogWrite command like this:

analogWrite(5, 100);

You can choose a value anywhere from 0 to 254 and each higher value is a faster duty cycle, but NOT a faster frequency. In order to increase the frequency, you have to set certain control registers to get clock multiplication or even switch over to a different clock depending on the MC...

BUT, I'm not using a nano for this project ... I'm using an ATMEL ATTINY85
EasyGoing1 is offline   Reply With Quote
Old 01-26-2021, 11:16 PM   #57
EasyGoing1
Shock Therapist
 
EasyGoing1's Avatar
 
Join Date: Sep 2016
City & State: Victorville, CA
My Country: USA
Line Voltage: 120VAC 60Hz
I'm a: Hardcore Geek
Posts: 580
Default Re: How could I find a FET with specific specs?

Quote:
Originally Posted by eccerr0r View Post
Also need to consider the fact that there are so many variables are involved, but if there's a capacitor that can sustain the LED for longer than the pulse width and the switching transistor output impedance is low, well, there you have it - a recipe for the LED to be on full brightness that has no dimming capability.

As for why I think the design OP had created is "broken" - notice he had hardcoded constants in his code. These hardcoded constants are specific to the specific transistor being used: if a different IRF510 was substituted, there's no guarantee the behavior would be the same - some would be brighter at some values, other dimmer, and very possible that some transistors would not even light up at all even though the transistor is considered "working". That's the concern I have.
You know to be honest with you ... I thought you guys were pushing for the RC filter earlier in this discussion and that presumption, along with noticing the flicker I just threw it in, but I would definitely rather not use it ... and as far as the code goes, the final PCB will have a 6 pin header on it for re-programming as needed. But I'm going to look at bumping the PWM frequency because Id much rather drive this with as few components as necessary.
EasyGoing1 is offline   Reply With Quote
Old 01-26-2021, 11:17 PM   #58
eccerr0r
Solder Sloth
 
eccerr0r's Avatar
 
Join Date: Nov 2012
City & State: CO
My Country: USA
Line Voltage: 120VAC 60Hz
I'm a: Hobbyist Tech
Posts: 5,706
Default Re: How could I find a FET with specific specs?

Ever since your stirrer project: I've been saying: NO analog, NO filtering. budm hit it on the nose, go reread his post.

Your microcontroller should not deal with any analog at all. If you're thinking analog on the microcontroller, you're doing it wrong.
eccerr0r is offline   Reply With Quote
Old 01-26-2021, 11:28 PM   #59
EasyGoing1
Shock Therapist
 
EasyGoing1's Avatar
 
Join Date: Sep 2016
City & State: Victorville, CA
My Country: USA
Line Voltage: 120VAC 60Hz
I'm a: Hardcore Geek
Posts: 580
Default Re: How could I find a FET with specific specs?

Quote:
Originally Posted by sam_sam_sam View Post
I am not a nano programmer and never programmed one but I would like to see if I could learn enough to some what get good enough at it to maybe correct some issues with the way this program is written and I aware of the fact that it will take time
Sam,

Take a look at those three scope screenshots that I posted ... click on them to make them bigger then look at the bottom of the screen and notice that the frequency of the PWM signal is the same at every different duty cycle.

That analogWrite command from 0 to 254 is only controlling the duty cycle, the frequency is not easily adjusted ... you have to get into the control registers for that and there are no simple C++ commands to do it, you have to know the name of the register and which bit to set at which value then you set it in code by naming the register and setting it equal to an 8-bit binary number to set those bits ... or you can do other tricks like using an OR statement so that you can flag the other bits in the register at 0 so that they don't change because you don't always know what affect you could have changing them, so let's say you had to set bit 2 to 1 but you don't want to mess with the other bits in the register, you would just OR B00000100 that way you're guaranteed to set the bit in position 2 to a 1 while whatever values are in the other bits, you won't be affecting them at all.

And if memory serves ... that would look something like this (assuming the name of the register you wanted to change was MCRC):

MCRC |= B00000100

Notice the pipe symbol before the = sign ... which means OR ... if you wanted to AND the bits, you would use an ampersand etc...

Last edited by EasyGoing1; 01-26-2021 at 11:31 PM..
EasyGoing1 is offline   Reply With Quote
Old 01-26-2021, 11:37 PM   #60
EasyGoing1
Shock Therapist
 
EasyGoing1's Avatar
 
Join Date: Sep 2016
City & State: Victorville, CA
My Country: USA
Line Voltage: 120VAC 60Hz
I'm a: Hardcore Geek
Posts: 580
Default Re: How could I find a FET with specific specs?

Quote:
Originally Posted by eccerr0r View Post
Ever since your stirrer project: I've been saying: NO analog, NO filtering. budm hit it on the nose, go reread his post.

Your microcontroller should not deal with any analog at all. If you're thinking analog on the microcontroller, you're doing it wrong.
Well if you remember, I got the best results on the stirrer project using a stepper motor controller ... I'm kind of in neutral on that project because I can't seem to figure out how to get enough electromagnetic strength in terms of coil specs and required voltage, etc. Coil design seems to be an entire discipline in it of itself and I'm just not knowledgable enough to know how to proceed with it.
EasyGoing1 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Badcaps.net Technical Forums 2003 - 2021
Powered by vBulletin ®
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
All times are GMT -6. The time now is 07:01 AM.
Did you find this forum helpful?