Author Topic: 24VAC to DC  (Read 5910 times)

0 Members and 1 Guest are viewing this topic.

Offline joeyjoejoeTopic starter

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: ca
Re: 24VAC to DC
« Reply #25 on: January 22, 2020, 11:41:43 pm »
Presuming K1_EN is a 3.3v output from a uC, watch out:  that MOSFET has a Vgs(th) of up to 3.1volts.  The threshold means that's when it just starts to turn on.  Note that Rds(ON) is specified only down to a Vgs of 4.5 volts (3.3 ohms).  Check out the pg 3 top left graph with drain current vs Vgs.  Pretty marginal at 50mA eh?  Especially if it gets cold?  And what exactly is the voltage on K1_EN when loaded down with a LED there anyway? 
I'm pretty sure you can get a better part for less money.  Sorting by quantity in stock is a quick way of turning up the good ones.  ;)

The 10K resistor is presumably a pull down to keep the MOSFET switched off while K1_EN is booting up?  Maybe LED1 is enough depending on it's colour and the Vgs of the MOSFET you select.

Damn, good catch! Something like the DMN63D8LDW-7 might be better? (3rd cheapest too :) )

The 10k is indeed a pulldown during bootup/etc. Good point that the LED might take care of it. I think I'll go chinese on the LED's - I could always leave the footprint in place and see if the pulldown needs populating or not.
 

Offline Paul Moir

  • Frequent Contributor
  • **
  • Posts: 926
  • Country: ca
Re: 24VAC to DC
« Reply #26 on: January 23, 2020, 04:13:49 pm »
All old is new again:  Muntzing  And I'm sure Muntz got it from somewhere.

DMN63D8LDW-7 looks much better.  Much better specified too.  And a quarter million in stock.  :)

 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19522
  • Country: gb
  • 0999
Re: 24VAC to DC
« Reply #27 on: January 25, 2020, 05:22:10 pm »
Presuming K1_EN is a 3.3v output from a uC, watch out:  that MOSFET has a Vgs(th) of up to 3.1volts.  The threshold means that's when it just starts to turn on.  Note that Rds(ON) is specified only down to a Vgs of 4.5 volts (3.3 ohms).  Check out the pg 3 top left graph with drain current vs Vgs.  Pretty marginal at 50mA eh?  Especially if it gets cold?  And what exactly is the voltage on K1_EN when loaded down with a LED there anyway? 
I'm pretty sure you can get a better part for less money.  Sorting by quantity in stock is a quick way of turning up the good ones.  ;)

The 10K resistor is presumably a pull down to keep the MOSFET switched off while K1_EN is booting up?  Maybe LED1 is enough depending on it's colour and the Vgs of the MOSFET you select.

Damn, good catch! Something like the DMN63D8LDW-7 might be better? (3rd cheapest too :) )

The 10k is indeed a pulldown during bootup/etc. Good point that the LED might take care of it. I think I'll go chinese on the LED's - I could always leave the footprint in place and see if the pulldown needs populating or not.
Why not swap the MOSFET for a BJT and suitable base resistor?
 

Offline joeyjoejoeTopic starter

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: ca
Re: 24VAC to DC
« Reply #28 on: January 25, 2020, 05:30:22 pm »
Parts count mostly. 4 less resistors, 4 less manual placements.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19522
  • Country: gb
  • 0999
Re: 24VAC to DC
« Reply #29 on: January 26, 2020, 01:51:53 pm »
Parts count mostly. 4 less resistors, 4 less manual placements.
How did you draw that conclusion? A BJT would use exactly the same number of parts and small BJTs are normally cheaper, than MOSFETs.
 

Offline joeyjoejoeTopic starter

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: ca
Re: 24VAC to DC
« Reply #30 on: January 26, 2020, 03:00:28 pm »
Would the transistors not need pulldowns?
 

Online mariush

  • Super Contributor
  • ***
  • Posts: 5027
  • Country: ro
  • .
Re: 24VAC to DC
« Reply #31 on: January 26, 2020, 03:48:08 pm »
There are transistors with resistors built in, some even have diodes in the package.

Here's an example (first Digikey result, not saying it's cheapest or best): https://www.digikey.com/product-detail/en/diodes-incorporated/DRDNB16W-7/DRDNB16WDITR-ND/816539
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19522
  • Country: gb
  • 0999
Re: 24VAC to DC
« Reply #32 on: January 26, 2020, 04:53:03 pm »
Would the transistors not need pulldowns?
No, especially with the LED. It's certainly less important, than with a MOSFET.
 

Offline joeyjoejoeTopic starter

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: ca
Re: 24VAC to DC
« Reply #33 on: January 26, 2020, 05:52:16 pm »
It would only shave a few cents off, but I do have two BC817's already for programming. And it means a bunch more questions

Sorted by price and still active components, I have

Currently,
DMN63D8LDW- N-channel mosfet (45 cents)

Options (sorted by price)
MBT3904DW1T3G - dual NPN (31 cents)
MUN5213DW1T1G- dual NPN, prebiased (33 cents)

I need 50mA for the coil. Will the MUN5213DW1T1G save me a pull-down resistor?

Resistors/diodes/led's are basically free, but the labor to place them isn't. I'd take fewer parts over a 10cent BOM increase anyday - the relays themselves from a legitimate supplier are just over 2$ a pop in small quantities, ESP32 5$ and coil for the switching regulator is 2$.



« Last Edit: January 26, 2020, 05:55:05 pm by joeyjoejoe »
 

Offline joeyjoejoeTopic starter

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: ca
Re: 24VAC to DC
« Reply #34 on: January 26, 2020, 05:54:57 pm »
This might be useful as well.

 

Online mariush

  • Super Contributor
  • ***
  • Posts: 5027
  • Country: ro
  • .
Re: 24VAC to DC
« Reply #35 on: January 26, 2020, 07:10:12 pm »
Here's a suggestion

You could use a switching regulator that runs at higher frequency, allowing you to save money on the inductor and other components.

See for example :

https://www.digikey.com/product-detail/en/monolithic-power-systems-inc/MP2456GJ-Z/1589-1894-1-ND/5292060
https://www.digikey.com/product-detail/en/monolithic-power-systems-inc/MP2459GJ-P/1589-1121-1-ND/5298208


If the relays are so expensive, what's stopping you from using cheaper 5v relays? Change to a 5v switching regulator and you can add a 10-20 cent 5v to 3.3v LDO for your microcontroller, but you can save money on the relays. You have 4 relays... you'd save around 1-2$ on relays alone if you go with 5v relays.

example of 5v relay: https://www.digikey.com/product-detail/en/kemet/EE2-5NU-L/399-11017-1-ND/4506469

Also, if you need let's say more than 50, consider other stores that have better prices than Digikey.
For example, TME.EU in Europe stocks some brands less known in US, here's an example: https://www.tme.eu/ro/en/details/rs-5-l/miniature-electromagnetic-relays/rayex-electronics/
But pay attention at the secondary, the AC and DC current rating... for ex. the one above is only rated for 1A and 120Vac or 24v DC.

If you have multiple relays, you could use transistor relays like ULN2003A (7 transistors with resistors built in) : https://www.digikey.com/products/en/discrete-semiconductor-products/transistors-bipolar-bjt-arrays/277?FV=-8%7C277&quantity=0&ColumnSort=1000011&page=1&k=uln2003a&pageSize=25
 
The following users thanked this post: joeyjoejoe

Offline joeyjoejoeTopic starter

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: ca
Re: 24VAC to DC
« Reply #36 on: January 26, 2020, 08:12:22 pm »
I'll check out those regulators, hopefully they are simple and the part count is low.

That 5v relay costs more then the 3v one I am using. https://www.digikey.ca/products/en?keywords=ec2-3nu

 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19522
  • Country: gb
  • 0999
Re: 24VAC to DC
« Reply #37 on: January 26, 2020, 08:15:30 pm »
It would only shave a few cents off, but I do have two BC817's already for programming. And it means a bunch more questions

Sorted by price and still active components, I have

Currently,
DMN63D8LDW- N-channel mosfet (45 cents)

Options (sorted by price)
MBT3904DW1T3G - dual NPN (31 cents)
MUN5213DW1T1G- dual NPN, prebiased (33 cents)

I need 50mA for the coil. Will the MUN5213DW1T1G save me a pull-down resistor?

Resistors/diodes/led's are basically free, but the labor to place them isn't. I'd take fewer parts over a 10cent BOM increase anyday - the relays themselves from a legitimate supplier are just over 2$ a pop in small quantities, ESP32 5$ and coil for the switching regulator is 2$.
The dual BJTs seem sensible, but a base resistor of 47k is too high, so it won't saturate. You need around 1k, as per my schematic and there is no need for pull-down resistors, because the BJT will turn off, if there's no base current, so if the MCU's I/O ports are set to inputs, the BJTs will be off.
 

Offline joeyjoejoeTopic starter

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: ca
Re: 24VAC to DC
« Reply #38 on: January 26, 2020, 09:18:41 pm »
I need to brush up on transistors/current, but I did find MUN5230DW1T1G with a 1k base resistor and 1k base-emitter.

 

Offline thinkfat

  • Supporter
  • ****
  • Posts: 2152
  • Country: de
  • This is just a hobby I spend too much time on.
    • Matthias' Hackerstübchen
Re: 24VAC to DC
« Reply #39 on: January 26, 2020, 10:45:03 pm »
For a single quantity from a retail supplier?

We don't know if the OP wants to make a few or just a one off.

There is no place for LM2676 anymore. It runs at low frequency (meaning needs large LC), it is expensive from big distributors, and from elsewhere you get 100% fake.

The chip itself is a huge package, combined with a stupidly large 100uH choke, it has no power density.

The LM2676 is actually not half bad a choice. It is a step up from the LM2596, switching at 250khz instead of 150khz, works reasonably well with a 33µH coil which you can get in a 10mm square package. Of course it is not a synchronous buck converter and the diode you need is also relatively big, but it should be possible to cram it all into a 15mm by 30mm area.
Everybody likes gadgets. Until they try to make them.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19522
  • Country: gb
  • 0999
Re: 24VAC to DC
« Reply #40 on: January 26, 2020, 11:20:58 pm »
I need to brush up on transistors/current, but I did find MUN5230DW1T1G with a 1k base resistor and 1k base-emitter.


That's more sensible. You need sufficient current to saturate the BJT.
 
The following users thanked this post: joeyjoejoe

Offline joeyjoejoeTopic starter

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: ca
Re: 24VAC to DC
« Reply #41 on: January 27, 2020, 02:37:17 am »
So on the power side, I've found a more suitable component perhaps.

Power section with reference from TI Power Designer.


My question is on my inductor ( NRS4018T150MDGJ ) selection. It matches the impedance and inductance. On digikey, it lists the inductance frequency test at 100kHz. Does this mean it's not suitable for a 1.1MHz switching supply?

Other options -
SDEM25201B-150MS, 768mOhm @ 1Mhz
LQH3NPN150MMEL, 350mOhm @ 1MHz

(Since this is powered from a 24VAC transformer off mains, I don't care too much about efficiency.)
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21686
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: 24VAC to DC
« Reply #42 on: January 27, 2020, 02:41:54 am »
Test frequency is just what it's tested at.  They tested at 100kHz and found 15uH +/- whatever, and Q = whatever.

Doesn't mean anything about other frequencies.

Self resonant frequency is more relevant, but switching at SRF isn't a problem in itself, as that's the frequency where the inductor's impedance is maximal (parallel resonance).  It's the best filter it can be, eh?  Not for harmonics, however, and there's usually a second resonance somewhat above SRF which is series resonant (low impedance) which makes some harmonics much worse.  So you typically want SRF more than, say, 5 or 10 times Fsw.  Which is probably fine here.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: joeyjoejoe

Offline joeyjoejoeTopic starter

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: ca
Re: 24VAC to DC
« Reply #43 on: January 27, 2020, 02:55:46 am »
Thanks! Indeed, I notice on their sheet a bit further down the inductance is fine into the MHz.

 

Offline joeyjoejoeTopic starter

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: ca
Re: 24VAC to DC
« Reply #44 on: January 27, 2020, 11:26:57 pm »
I need to brush up on transistors/current, but I did find MUN5230DW1T1G with a 1k base resistor and 1k base-emitter.


That's more sensible. You need sufficient current to saturate the BJT.

I'm trying to learn how to figure out base resistor selection. Using https://www.petervis.com/GCSE_Design_and_Technology_Electronic_Products/transistor_base_resistor_calculator/transistor_base_resistor_calculator.html, and populating an hFE of 3, 50mA load and 3.3Vcc/Vi, it spits out 200ohm.

So don't I need to find a BJT with a higher hFE?

Second, can I put an LED in series with the base resistor to light the LED when turned on as well as switch the relay? Would this be risky if I don't know the voltage drop of the LED (going the chinese route for LEDs), or there a good chance it falls in a standard range, and if there's enough overhead after the voltage drop we're good?

 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21686
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: 24VAC to DC
« Reply #45 on: January 28, 2020, 12:50:42 am »
LED in series -- not recommended, even a red LED is 1.5-2V drop.  Not much left for the 0.7V Vbe out of a 3.3V supply.

China can't really screw up the voltage, but they might deliver parts that are fully shorted or open (a dark emitting diode).

hFE(sat) is typically chosen as 20, where'd 3 come from?

Or if you mean minimum required is 3 (but, based on what, I don't know?), then yes, and you can expect to find much better in real parts out there. :P  So much better in fact that you can use a higher value for the resistor calculation.


there is no need for pull-down resistors, because the BJT will turn off, if there's no base current, so if the MCU's I/O ports are set to inputs, the BJTs will be off.

FYI, better to have them: faster turn-off, lower leakage, more noise immunity.

BJTs aren't controlled by current so much as voltage, or charge; it just so happens the base is...rather leaky, in a rather predictable way in fact, so we can drive it as a current amplifier in certain situations.  This does happen to be one of those situations, but that's no excuse to fully ignore the transistor's nature. :)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline joeyjoejoeTopic starter

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: ca
Re: 24VAC to DC
« Reply #46 on: January 28, 2020, 12:55:18 am »
MUN5230DW1T1G  says the hFE min is 3.

https://www.onsemi.com/pub/Collateral/DTC113ED-D.PDF

 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21686
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: 24VAC to DC
« Reply #47 on: January 28, 2020, 01:07:08 am »
Yes, measured hFE will be very low at low currents and linear operation.  Note Vce = 10V, so Vin has been controlled (to about 1.5V as it happens) to set Ic as specified.  This doesn't affect the hFE of the transistor itself.

Pretty sure I've seen prebiased transistors before, that are rated as the bare transistor (so, hFE ~ 200 at whatever currents).  Which is actually more strange than this, as the resistors are monolithic (right on the transistor die itself), there's not really any way to measure that parameter apart from the resistors.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19522
  • Country: gb
  • 0999
Re: 24VAC to DC
« Reply #48 on: January 28, 2020, 09:00:11 am »
there is no need for pull-down resistors, because the BJT will turn off, if there's no base current, so if the MCU's I/O ports are set to inputs, the BJTs will be off.

FYI, better to have them: faster turn-off, lower leakage, more noise immunity.

BJTs aren't controlled by current so much as voltage, or charge; it just so happens the base is...rather leaky, in a rather predictable way in fact, so we can drive it as a current amplifier in certain situations.  This does happen to be one of those situations, but that's no excuse to fully ignore the transistor's nature. :)
Yes, base-emitter resistors are often a good idea, but I think they're superfluous in this application. The BJT is switches a relay and its base is driven from a CMOS output which is push-pull, so when it's low, the base will be pulled to the emitter anyway. The only time it could help is if the output goes into a high impedance state, but that's something outside of normal operation, it shouldn't last long and the leakage current will be tiny.

MUN5230DW1T1G  says the hFE min is 3.

https://www.onsemi.com/pub/Collateral/DTC113ED-D.PDF

Yes, that does look low, but I think it will be fine at 50mA. Figure 6 shows IC = 50mA, when the input voltage is 3V and output voltage 0.2V.

You might be better with a 10k base-emitter resistor, which will rob less base current from the BJT.
https://assets.nexperia.com/documents/data-sheet/PIMC31.pdf
https://au.mouser.com/datasheet/2/348/dtc113zebtl-e-1664170.pdf
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf