Author Topic: Help with circuit advice.  (Read 1122 times)

0 Members and 2 Guests are viewing this topic.

Offline Regenerate3dTopic starter

  • Contributor
  • Posts: 15
  • Country: gb
Help with circuit advice.
« on: August 31, 2024, 12:54:37 pm »
Hi all I've made a simple circuit for a 15ch mosfett output on easyeda would anyone be happy to have a look and give advice?

Arduino Mega input to control 28V micro bulb. Will need to use arduino PWM outputs as the lamps may require dimming.

Many thanks
 

Online tooki

  • Super Contributor
  • ***
  • Posts: 12568
  • Country: ch
Re: Help with circuit advice.
« Reply #1 on: August 31, 2024, 01:19:16 pm »
As drawn it cannot work, because those are p-channel MOSFETs. Your circuit would fundamentally work if you used n-channel MOSFETs instead.

Also, one resistor is missing a connection.

For future schematics, draw grounds towards the bottom and positive power on top. This is just customary and makes it easier to follow.
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3820
  • Country: nl
Re: Help with circuit advice.
« Reply #2 on: August 31, 2024, 09:02:59 pm »
I agree with all tooki wrote.
In addition:
Your PCB layout is quite bad. No GND plane at all, and if you had put the FET's in the same order as they are on the connector, You can easily make a perfect PCB layout on one layer.
On the schematic, connect the pull down resistor to the same GND symbol as the FET. This makes it's intention more clear.
This PCB looks like you have just let some autorouter mess it up. It's Yuch!
On the input connector, there is no GND at all, and these (faulty P-channel?) Fets have a low gate voltage. That is a bad combination.
Gates of Fets are sensitive to ESD. Where is that input cable coming from?

This is how I would do it.
1). First I create a main sheet.
2). Then I create a hierarchical sheet for a FET. It would look like:
2357167-0

"Thick" is a "net directive label". It's used to assign a netclass, and these FET's can do a few Amps, so thick tracks are nice.

3). Then I go back to the main sheet and make a bunch of copies of the hierarchical sheet:


4). With the schematic mostly done It's time for the PCB. The resistors are all connected to two pins of the Fet's, so we orient them so that everything fits. Altogether, the transistors are however much wider then the connector, so we stagger the transistors. Odd numbers on top, even numbers on the bottom. The result:

2357161-2

Doing it this way has a bunch of advantages. For example, by using the hierarchical sheet, you only have to draw one transistor in the whole schematic. If you change that single transistor, they all change! It also has advantages for the PCB. To get all the texts to line up nicely, I just placed the text for one transistor and one resistor, and then I ran the Replicate Layout plugin in KiCad. You can choose what you want to replicate. Text locations, or also footprints and tracks. This saves a lot of drawing time.


And euhm, I made these screenshots in KiCad  :) I did not want to spend too much time on finding a 1.mm pitch flex connector, so I just subtituted it for an available THT connector with a 1mm pitch.
* 2024-08-31_fet_15x.zip (54.88 kB - downloaded 13 times.)
« Last Edit: August 31, 2024, 11:39:59 pm by Doctorandus_P »
 
The following users thanked this post: tooki, Nominal Animal, rhodges

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3820
  • Country: nl
Re: Help with circuit advice.
« Reply #3 on: August 31, 2024, 09:09:09 pm »
Another note:
If you want to control 28V with your FET's, then FET's that can only handle 30 Volts is not enough. You need some headroom. I would use at least FET's that can handle over 50V, and I would add TVS protection diodes too.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6215
  • Country: de
Re: Help with circuit advice.
« Reply #4 on: August 31, 2024, 09:35:55 pm »
And just draw one channel, that's easier to read. We have no problems imagining the other 14.
 

Offline shabaz

  • Frequent Contributor
  • **
  • Posts: 390
Re: Help with circuit advice.
« Reply #5 on: August 31, 2024, 10:13:33 pm »
If "micro bulbs" means grain-of-rice type lamps with a few tens of mA of current consumption, then you could just use BJTs. A lot easier for a beginner, since there's less chance of damaging them during soldering if you don't have at least a minimal ESD setup, and not using a USB or other non-grounded iron, etc. Nothing special required, something like a BC847 and a base resistor. Might be cheaper too. Of course, it's not as efficient, but it might not matter, if you're not powering from batteries.
 

Online tooki

  • Super Contributor
  • ***
  • Posts: 12568
  • Country: ch
Re: Help with circuit advice.
« Reply #6 on: August 31, 2024, 10:28:08 pm »
Gates of Fets are sensitive to ESD. Where is that input cable coming from?
The original post says it's an Arduino Mega.

This is how I would do it.
...
Could you edit your post to remove the "align=left" from the image tags? It's causing the images to... not do what you want. (See screenshot.)
 

Offline Regenerate3dTopic starter

  • Contributor
  • Posts: 15
  • Country: gb
Re: Help with circuit advice.
« Reply #7 on: August 31, 2024, 10:35:47 pm »
Doctorandus_P thank you for getting back to me with ideas. ive tried to open in easyeda but the pcb is all messed up etc. Would prefer a single sided board if i can help it but not sure how to convert your board design?
« Last Edit: August 31, 2024, 10:49:50 pm by Regenerate3d »
 

Offline Regenerate3dTopic starter

  • Contributor
  • Posts: 15
  • Country: gb
Re: Help with circuit advice.
« Reply #8 on: August 31, 2024, 10:50:40 pm »
yes they are grain of rice very low current but i would hope to use fets for the pwm control for potential dimming.
 

Online tooki

  • Super Contributor
  • ***
  • Posts: 12568
  • Country: ch
Re: Help with circuit advice.
« Reply #9 on: August 31, 2024, 10:57:04 pm »
Doctorandus_P thank you for getting back to me with ideas. ive tried to open in easyeda but the pcb is all messed up etc
EasyEDA Pro will import it fine. EasyEDA Standard seems to choke on it -- I think it doesn't support hierarchical schematics so it skips them.

But I'm pretty sure his intent in providing the KiCad files to you is for you to open them in KiCad.
 

Online tooki

  • Super Contributor
  • ***
  • Posts: 12568
  • Country: ch
Re: Help with circuit advice.
« Reply #10 on: August 31, 2024, 10:57:56 pm »
yes they are grain of rice very low current but i would hope to use fets for the pwm control for potential dimming.
You can definitely use MOSFETs (and in fact that is my preference), but FYI you can also PWM with BJTs.
 

Offline Regenerate3dTopic starter

  • Contributor
  • Posts: 15
  • Country: gb
Re: Help with circuit advice.
« Reply #11 on: August 31, 2024, 11:09:48 pm »
now downloading
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6215
  • Country: de
Re: Help with circuit advice.
« Reply #12 on: August 31, 2024, 11:12:56 pm »
I don't quite understand why two ULN2803 (or a ULN2803 plus a ULN2003) won't do the job in a much simpler and cheaper way.
 

Offline Regenerate3dTopic starter

  • Contributor
  • Posts: 15
  • Country: gb
Re: Help with circuit advice.
« Reply #13 on: August 31, 2024, 11:20:16 pm »
I've only investigated mosfetts. can you give more of an explanation and example of idea please? from my calculations i'm going to be pushing more than 500ma and will need relatively high switching rate for pwm.

Many thanks
« Last Edit: August 31, 2024, 11:22:17 pm by Regenerate3d »
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6215
  • Country: de
Re: Help with circuit advice.
« Reply #14 on: August 31, 2024, 11:43:42 pm »
I've only investigated mosfetts. can you give more of an explanation and example of idea please? from my calculations i'm going to be pushing more than 500ma and will need relatively high switching rate for pwm.

Many thanks

500 mA? For rice-grain bulbs? I hope you mean in total.
Yes, the ULNs will handle that easily.
Why would you need high switching rates for bulbs?

Edit: here you go. I'm too lazy to draw the remaining 13 inputs and lamps.

« Last Edit: September 01, 2024, 12:01:28 am by Benta »
 
The following users thanked this post: tooki

Offline Regenerate3dTopic starter

  • Contributor
  • Posts: 15
  • Country: gb
Re: Help with circuit advice.
« Reply #15 on: September 01, 2024, 01:51:23 pm »
Appreciate the input will look into your schematic, the bulbs are about 50ma as far as i remember from measurements.
 

Online Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6836
  • Country: fi
    • My home page and email address
Re: Help with circuit advice.
« Reply #16 on: September 01, 2024, 04:41:44 pm »
50mA per channel is no biggie for ULN2003A.  As a Darlington transistor array, it has eight seven equivalents of the following circuits in it:

Stolen from the TI ULN2003A datasheet, click to embiggen

You connect the output pin to the low side of the load.  That is, you need to connect each bulb to your positive lamp supply voltage, and to one of the ULN2003A output pins (instead of ground).  You connect the E pin to your lamp supply ground, noting that the sum current will flow through this pin (400mA per chip).  COM is only used with inductive loads like relays.  For lamps, being resistive loads, you leave it unconnected.

When the corresponding input pin is high low, the outer transistor does not conduct.

When the corresponding input is low high, the outer transistor conducts.  You can PWM the input pins at quite high frequencies, definitely high enough to dim micro bulbs.

There will be a voltage drop between the output pin and the common E (ground) pin, that depends on the current and the voltage on the input pin, but it should be less than a volt for your case.  (If your lamp supply is 28V, the lamps will see 27V.  ULN2003A can handle up to 50V between an output pin and the E pin.)

With all eight seven outputs enabled, 50mA current per pin (350mA through E), ULN2003A generates about 7×1V×0.050mA ≃ 350mW = 0.35W of heat, similar to a 2kOhm resistor in series with your 28V supply.
« Last Edit: September 02, 2024, 09:47:56 am by Nominal Animal »
 

Offline Regenerate3dTopic starter

  • Contributor
  • Posts: 15
  • Country: gb
Re: Help with circuit advice.
« Reply #17 on: September 01, 2024, 05:04:17 pm »
And this is ok for PWM too?
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6215
  • Country: de
Re: Help with circuit advice.
« Reply #18 on: September 01, 2024, 05:17:40 pm »
When the corresponding input pin is high, the outer transistor does not conduct.

When the corresponding input is low, the outer transistor conducts.  You can PWM the input pins at quite high frequencies, definitely high enough to dim micro bulbs.

It's the other way around. Input high = conducting output transistor. Just as the symbol in my schematic shows.
 
The following users thanked this post: Nominal Animal

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6215
  • Country: de
Re: Help with circuit advice.
« Reply #19 on: September 01, 2024, 07:43:01 pm »
And this is ok for PWM too?

Yes.
But you still haven't answered why "high rate" is necessary, or what that term even means.
It's all very nebulous.
 

Offline Regenerate3dTopic starter

  • Contributor
  • Posts: 15
  • Country: gb
Re: Help with circuit advice.
« Reply #20 on: September 01, 2024, 07:50:01 pm »
Sorry i'm lost "high rate" where did i say that? i would have meant fast switching rate that's why i went for mosfetts. 
 

Offline Andy Chee

  • Super Contributor
  • ***
  • Posts: 1064
  • Country: au
Re: Help with circuit advice.
« Reply #21 on: September 01, 2024, 08:08:56 pm »
Why do you need to switch rice-grain bulbs at fast switching rate?  Are you creating a display of some sort?  Please explain more detail!
 

Offline Regenerate3dTopic starter

  • Contributor
  • Posts: 15
  • Country: gb
Re: Help with circuit advice.
« Reply #22 on: September 01, 2024, 08:26:30 pm »
I'm converting aircraft panels for simulator project. Fast switching to prevent flickering when dimmed.
 

Offline Andy Chee

  • Super Contributor
  • ***
  • Posts: 1064
  • Country: au
Re: Help with circuit advice.
« Reply #23 on: September 01, 2024, 08:33:09 pm »
 In your application, "flickering" is a human visual perception phenomenon.  Switching speed of 1kHz is more than adequate.

When you said fast switching, some might've thought 1MHz or more!
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6215
  • Country: de
Re: Help with circuit advice.
« Reply #24 on: September 01, 2024, 08:43:11 pm »
Sorry i'm lost "high rate" where did i say that? i would have meant fast switching rate that's why i went for mosfetts.
What you said exactly was "relatively high switching rate", which is meaningless. 1 kHz? 100 kHz? 10 MHz?...
For incandescent bulbs, even the small ones, everything over 200 Hz is fine.
The ULN2x03 ICs will do it at several kHz, don't worry.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf