Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
FatCow
Apr 22, 2002
I MAP THE FUCK OUT OF PEOPLE

PDP-1 posted:

Unless we know that that unit has a pull-up resistor somewhere inside of it, leaving the ~RST line floating may lead to some unpredictable results. It's expected to be pulled low to reset and high for normal operations, so if we don't connect it and it doesn't have an internal pull-up what will it do?

One common way to handle reset pins is with the circuit below. When you turn on the power the RC network connected to the reset pin starts at zero and gradually pulls the pin high as the capacitor charges up so your CPU only turns on after the power lines have had a chance to stabilize. Then pushing the switch pulls the reset pin down to reset the system. You can leave the switch off if you don't think you'll need it, or put a place for a future switch to go on the board if you're not sure.



Just as a general rule, never leave an input pin disconnected and floating.

https://oshwlab.com/Miraculix200/wemos-d1-mini

Here are the schematics for the module that IC lives on. It looks like they have the same circuit that you proposed, with a pulldown instead of pullup. Good to know for when I do things without a dev board though.


PDP-1 posted:

It's fine to do it like that, just check the power dissipation of those resistors. You have a diode and a couple of LEDs in line with them which may eat up 3V or so, the resistors split the remaining 21V so 10.5V each. Then P=V^2/R=10.5*10.5/1000=110mW per resistor. Depending on what physical size of resistor you are using that could be fine with a 1/4W thru hole but could overheat, say an 0603.

You're also pulling 10.5V/1kΩ=10.5mA through that branch, that seems like a bit much. I normally power my LEDs at about 5mA and they're plenty bright. You could double the resistance for R1/R5 and similar stages and it would consume less power and not be so dazzlingly bright for the visible LED.

e: Also, it might be a good idea to have a fuse of some kind on the AC line input if there isn't one present off the PCB. You can get 5mm x 20mm thru-hole PCB mount fuse holders and size the fuse to be more than the current you expect to draw in normal operation.

Keep in mind that's 24VAC RMS, I put in a 5.6k resistor and see a 28v drop across it now. I replaced the pair with a single 1W resistor. This circuit will be running outdoors, in NC, in a sealed container in NC, sometimes in the sun.

Fuses were on the list of things to add. I have them on order and updated the schematic to include them.

I have another question, I'd assumed that my power would come as +24v and 0v with ground also being at 0v. The transformer I'm using in the house to power this is actually 14.8vac and 14vac in respect to ground on the two AC terminals. Is that normal/expected?

I checked on the AC unit and it is what I expected, +24VAC on one wire and 0v on the other, both fed from the 24v transformer I believe. Should I pull a ground wire from the chassis into the enclosure and tie the 0vdc rail to it? or is the circuit fine as it is with 0v being derived from the rectifier and left floating?

Adbot
ADBOT LOVES YOU

PRADA SLUT
Mar 14, 2006

Inexperienced,
heartless,
but even so
VIP is a thing, but it adds fab complexity that usually not worth it for hobbyist projects.

Normally for VIP the fab will fill/planarize the via but that’s expensive.

Splode
Jun 18, 2013

put some clothes on you little freak
Don't even attempt power planes on a two layer board, it doesn't make sense. You can have some block areas of copper for power if you're expecting big currents, or you have an area where it makes the routing simpler, but it's not something you need to do for all power nets in all designs.

Via in pad is also not worth it for hobbiest boards unless you have no choice, which is not the case here.

Bad Munki
Nov 4, 2008

We're all mad here.


I assume that when you all say power planes, you mean like the entire layer, not just a medium-ish fill, which is what I ended up doing. I may go back to just super fat traces before I place the order, but it'll more or less be the same end result, a 4mm-wide track.

With that in mind, I think this thing is done.






(again, left out the caps so I don't get them mixed up with each other)



It all fits great and looks good to my eye!

Splode
Jun 18, 2013

put some clothes on you little freak
Woah hang on - I don't like the ground pour on the mains side of things, I think it's too close for that voltage.

Run the ground connection from the connector to the transformer as a fat trace with the same clearances you have the live and neutral, not as a pour. This is on the mains side of things only - the low voltage side looks good.

Splode fucked around with this message at 01:43 on Aug 27, 2023

Bad Munki
Nov 4, 2008

We're all mad here.


Roger that, thanks

Bad Munki fucked around with this message at 02:06 on Aug 27, 2023

Bad Munki
Nov 4, 2008

We're all mad here.


Like so, if I'm reading you right:



As before, I still I also have some of those doubled up on the back, at least prior to the fuse and between the transformer and neutral/ground. Maybe that's not doing anything for me, but it felt right:


Those are all 3mm traces.

PRADA SLUT
Mar 14, 2006

Inexperienced,
heartless,
but even so
Power planes are good and useful, just not on 2-layer boards since you need your bottom layer for ground.

Typical stack for a 2 layer is SG, 4 layer is like SGPS, and more layers have at least 1-2 power planes in the center of the board. 10 layer could be something like SGSGPPGSGS.

Splode posted:

Woah hang on - I don't like the ground pour on the mains side of things, I think it's too close for that voltage.

Run the ground connection from the connector to the transformer as a fat trace with the same clearances you have the live and neutral, not as a pour. This is on the mains side of things only - the low voltage side looks good.

Same, don't have a ground pour on the hot side of the transformer, and void copper around the hot traces and vias. I'd void 30mil for 120V. Otherwise you could arc. Make sure you're covering that with solder mask so there's no exposed copper that could create an arc if something falls over it, or it like collects dust or whatever over the years.

Power planes are good and useful, just not on 2-layer boards since you need your bottom layer for ground.

Typical stack for a 2 layer is SG, 4 layer is like SGPS, and more layers have at least 1-2 power planes in the center of the board. 10 layer could be something like SGSGPPGSGS.

Splode posted:

Woah hang on - I don't like the ground pour on the mains side of things, I think it's too close for that voltage.

Run the ground connection from the connector to the transformer as a fat trace with the same clearances you have the live and neutral, not as a pour. This is on the mains side of things only - the low voltage side looks good.

Same, don't have a ground pour on the hot side of the transformer, and void copper around the hot traces and vias. I'd void 30mil for 120V. Otherwise you could arc. Make sure you're covering that with solder mask so there's no exposed copper that could create an arc if something falls over it, or it like collects dust or whatever over the years.

Bad Munki posted:

Like so, if I'm reading you right:



As before, I still I also have some of those doubled up on the back, at least prior to the fuse and between the transformer and neutral/ground. Maybe that's not doing anything for me, but it felt right:


Those are all 3mm traces.

Doubling up routing on layers is fine for high current applications in areas where you have a limited number of pins providing input. I don't see an issue with it here. I've used it on some high wattage power boards before.

12mil traces are good for ~2A with a 40c rise and 1oz copper.

PRADA SLUT fucked around with this message at 02:16 on Aug 27, 2023

Bad Munki
Nov 4, 2008

We're all mad here.


PRADA SLUT posted:

Same, don't have a ground pour on the hot side of the transformer, and void copper around the hot traces and vias. I'd void 30mil for 120V. Otherwise you could arc. Make sure you're covering that with solder mask so there's no exposed copper that could create an arc if something falls over it, or it like collects dust or whatever over the years.

With the current (lol) above layout, there's like an 80mil margin around everything now. And everything except the pads themselves should be masked. The whole thing will be buttoned up in a case, too. I was planning to make it a multipart case that would still keep that end of the board covered up whether the other end was open or not.

PRADA SLUT posted:

12mil traces are good for ~2A with a 40c rise and 1oz copper.
Well I'm at 10x that, so uhhhh

3 wasn't a typo, it's 3.0mm not 0.3mm

e: if it's of interest, here's the render:



Bad Munki fucked around with this message at 02:27 on Aug 27, 2023

Bad Munki
Nov 4, 2008

We're all mad here.


Starting to look at PCB fab options, I used OSHPark a long while back and their boards are pretty and appear to be high quality (and you can give them your kicad pcb file directly, that's cool), but their prices have gone up. Poked around a bit and...JLCPCB is, like, unsettlingly cheap? Is that real? Six bucks for five of the same board that OSH wants $50 for three of? With a 48-hour turnaround?

Otherwise, any crowd favorites here that I should consider?

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
They are cheap but they ship from china, so it will take a week or two to get to you.

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:

It is unsettlingly cheap but also real.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
PCBWay is the other go-to


Edit: the typical order-to-arrival time to me is 6-7 days, it's absolutely bananas

ante fucked around with this message at 03:55 on Aug 27, 2023

Bad Munki
Nov 4, 2008

We're all mad here.


Cojawfee posted:

They are cheap but they ship from china, so it will take a week or two to get to you.

That sounds like time for getting the software side of this thing whipped into shape.

PRADA SLUT
Mar 14, 2006

Inexperienced,
heartless,
but even so

Cojawfee posted:

They are cheap but they ship from china, so it will take a week or two to get to you.

Last time I used PCBway it was three days and OSHpark was significantly slower because it took them a week just to start the order.

Shame Boy
Mar 2, 2010

Yeah JLC is the one I use these days and it Works. Ships from china but ships using DHL so it's not unreasonably slow freight or anything. I also appreciate the lil' preview viewer of the board, not all of them have that and it's helpful to know I didn't gently caress up exporting somehow.

Bad Munki
Nov 4, 2008

We're all mad here.


Plus they have a cooler color selection, and not all of them cost more than default green. Thinkin' about that white option :swoon:

Plus a stencil for 8 bucks or whatever, not bad.

ryanrs
Jul 12, 2011

JLC is fast. I’m in California and I can do 1 week respin cadence with them, with no expedite fees. DHL shipping from Shenzhen is 2 days.

JLC quality is very good for small prototype orders. Larger production runs perhaps less so.

Splode
Jun 18, 2013

put some clothes on you little freak

PRADA SLUT posted:

Same, don't have a ground pour on the hot side of the transformer, and void copper around the hot traces and vias. I'd void 30mil for 120V. Otherwise you could arc. Make sure you're covering that with solder mask so there's no exposed copper that could create an arc if something falls over it, or it like collects dust or whatever over the years.

12mil traces are good for ~2A with a 40c rise and 1oz copper.

Thanks for checking the numbers - I don't work with mains often and when I do it's 240V so I don't know the clearances.
Honestly my general feeling for this thread and beginner electronics is stay the hell away from mains. I certainly avoid it wherever I can.

Splode
Jun 18, 2013

put some clothes on you little freak
I use PCBway for fast prototypes all the time. I haven't heard many good things about their turnkey assembly service, but their blank PCBs are good.

I haven't used JLCPCB but I would happily, they've got a good rep

Bad Munki
Nov 4, 2008

We're all mad here.


Splode posted:

Honestly my general feeling for this thread and beginner electronics is stay the hell away from mains. I certainly avoid it wherever I can.

That'd be my preference but the project necessitated it. That was why I chose a fully enclosed transformer, though, so that all I had to do was get power to it. Still room for mistakes, but that's why I have all of you :science:

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS

Splode posted:

I use PCBway for fast prototypes all the time. I haven't heard many good things about their turnkey assembly service, but their blank PCBs are good.

I haven't used JLCPCB but I would happily, they've got a good rep

PCBWay's assembly service is excellent.

PRADA SLUT
Mar 14, 2006

Inexperienced,
heartless,
but even so
I've used PCBWay's SMT assembly service for a small run of boards. No complaints from me.

ryanrs
Jul 12, 2011

PCBWAY is a step above JLC, IMO. PCBWAY has better capabilities like heavy copper, thick boards, and full assembly. I have heard that PCBWAY's quality on larger production runs is better than JLC.

For basic 4-layer, 1.6mm ENIG boards with no assembly, I usually use JLC because they are cheaper. But I also make a lot of weird boards and those all go to PCBWAY. Like the time I designed a 4-layer, 250 sq in board out of 3.2 mm FR-4. $1300 for the pcbs, but you could beat a man with one, ha ha.

I've also had nice boards made by Quickturn Korea when the Chinese factories were shut down in the early days of COVID.

Bad Munki
Nov 4, 2008

We're all mad here.


Aesthetics are clutch, especially on the parts you'll never see again once installed



e: Sweet, first-time-customer coupon for $10 off paid for a stencil to go with this thing, might as well.

Bad Munki fucked around with this message at 17:37 on Aug 27, 2023

PRADA SLUT
Mar 14, 2006

Inexperienced,
heartless,
but even so
I sure hope that’s not silk on your pads

Bad Munki
Nov 4, 2008

We're all mad here.


Hah, whoops. I thought it would mask those out and then didn't notice it hadn't. Hmm, how do I get kicad to do this...

e: It’s weird. I know I did this exact sort of nonsense back in the day. But that was via Eagle and Oshpark, and one of those two appears to automatically clip the silkscreen over exposed copper.



e: Ah ha!


It doesn't show up in the kicad 3d preview, but the JLCPCB render looks correct:

Bad Munki fucked around with this message at 20:16 on Aug 27, 2023

ryanrs
Jul 12, 2011

And just to link back to PCB fab recommendations, a decent manufacturer would catch that error (silkscreen on pads) and either email you, or maybe silently fix it for you (which might make you mad if you really wanted silkscreen there). I would definitely expect PCBWAY and JLC to catch this.

For many consumer things, "cheap Chinese vendor" means bad instructions and lovely support. I want to emphasize that that is not the case here. These Chinese pcb factories have good engineers that know way more about pcbs than you do, responsive support that communicates in excellent written English, and in general they've been great to work with. I wish my local machine shops were as professional, lol.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
These fabs are phenomenal, agreed, and they would 100% just fix that particular error without saying anything.


I sent in an art PCB a few months ago, and they asked me a few questions that subtly implied they thought I was kinda an idiot, but also if they could make some changes. Of course I said sure, and requested the gerbers back, after they'd modified them, just so I could see what the changes were. Good lessons into future manufacturability. Anyway, they did, and they made some quite clever changes, like identified a section of the PCB where I clearly didn't care about the art aspect, and filled it with copper polka dots in order to even out the copper distribution of the panel.

Stellar customer service.


I've done a lot of reasonable (50-200) assembly runs with them too, and they always impress the hell out of me. I've worked with some Real Bad manufacturers from North America, so I know doubly how good they are, at a quarter of the cost.

ante fucked around with this message at 06:13 on Aug 28, 2023

Splode
Jun 18, 2013

put some clothes on you little freak
One of my computer monitors is drawing too much current. I've already replaced it, but I'm curious if it's worth trying to repair it.

Here is my diagnosis:
After running for many hours, the monitor would power cycle. Once it started power cycling, it would continue to do so regularly until left off for an extended period of time.
Power supply was getting very hot too.

I tried replacing the power supply, as this monitor has an external AC/DC power supply (it takes 19V). The original supply was rated for 2.1A, replacement the same.

Same issue - new power supply got hot and power cycling happened.

I then tried powering it from my lab PSU and it drew 3A. No wonder these power supplies are overheating, it's cooking them!

At this point I just bought a new monitor, but is it worth it to try fixing the old one? There's a warning on the back about high voltages, which surprised me given it's powered from 19V DC.

If there's some 500V boost supply in there for the backlight or whatever I don't want to shock myself.

kid sinister
Nov 16, 2002
Did you try hitting it? No, seriously. I bet there's a bad solder joint inside making the magic pixies jump the gap and causing the amps to go up. Does it act up (or stop acting up) if you give it a good thump? That would make sense if it only acts up after it's been on for awhile: it got hot and connections expanded.

kid sinister fucked around with this message at 04:38 on Aug 29, 2023

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
Aside from opening it up and looking for anything that looks damaged, that seems like it would be really annoying to try to diagnose if you don't understand what's going on inside it. But don't trust me. I'm the guy who was working on a project involving a CRT and I shocked myself while rotating the tube to make the display level.

ryanrs
Jul 12, 2011

Splode posted:

If there's some 500V boost supply in there for the backlight or whatever I don't want to shock myself.

Yes, there is a 500V supply inside if the display has a cold cathode backlight (vs newer displays that use LED backlights). Getting shocked by it is not going to kill you, but you won't like very much.

Charles Ford
Nov 27, 2004

The Earth is a farm. We are someone else’s Ford Focus.
I did once have an issue with PCBWay, in that they used the wrong component in a bunch of spaces. My BoM was correct, instead they blamed their supplier. They had sent me pictures for orientation purposes so I could have noticed then, but it didn't occur to me at the time. They initially asked me to get local quotes for PCB repair places they'd cover, but since I'm in Silicon Valley and all the companies round here charge ludicrous amounts, they just gave me a voucher for my next order.

E: I will say their suppliers seem pretty good at finding chips, though. On one PCB during the height of the chip shortage I used a cheapest Lattice ice40 FPGA and they found some dated a decade before, from before Lattice bought Silicon Blue, who created that product line.

Charles Ford fucked around with this message at 04:59 on Aug 29, 2023

I would blow Dane Cook
Dec 26, 2008
I just killed my LED sound activated glasses kit by putting in one of the 12v batteries in the wrong way round. What components do you think I killed?

I would blow Dane Cook fucked around with this message at 05:43 on Aug 29, 2023

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
Probably that KA2284. Everything else aside from the capacitors C1 and C2 aren't really going to care one way or the other. The datasheet doesn't list a tolerance for reverse voltage but I assume it doesn't like it.

I would blow Dane Cook
Dec 26, 2008
and how would I protect the circuit from this happening again? some kind of diode on each of the negative terminals?

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
Wait, I'm re-reading it and you only put one of the two batteries in backwards? if so, you ended up putting the batteries in series with each other when they are supposed to be in parallel. So they'd just swap electrons with each other held back only by the internal resistance of each battery. That could heat up the traces on the board and potentially burn them up. Was it really hot when you realized what had happened?

I would blow Dane Cook
Dec 26, 2008
they are located on opposite sides of the board. I noticed one of the batteries was getting really hot and pulled it out.

Adbot
ADBOT LOVES YOU

His Divine Shadow
Aug 7, 2000

I'm not a fascist. I'm a priest. Fascists dress up in black and tell people what to do.
I'm looking at making a simple relay based circuit for my car to make a pair of extra lamps run dimly (position lights) or strongly (fog lights).

I believe I can either use a pair of 24v lights and run them on 12V for the dim position lights mode, and then boost the voltage using a voltage step up converter like this for fog light mode:
https://www.ebay.com/itm/385673345099

Or I do the reverse, I run a pair of 12V lights at 12 volt for fog light mode, and then I use a 12>6V converter for position light mode. You can find a similar buck converter as the link above for about the same price and same listed efficiency.

My question is, is there any practical difference in boosting or reducing voltage? They seem like mirror solutions to me without either being better than the other. I do know that in the car industry there have since the 80s existed switch based buck converters for cars for doing basically the above, I was told Opels from the 80s was a good source for these converters if I wanted 6v and had access to a scrap yard.

I was also looking at a 3rd option, to run a pair of 12v lights, but parallel in foglight mode and serially in position light mode, I tried this on my bench and they gave a nice weak glow connected serially, felt very clever, no need for voltage conversion. But this was difficult to design a workable circuit, got a basic circuit for how it could be done for switching between serial/parallel, but then also incorporating the other logic I wanted (position lights must turn off automatically when headlights turn on for instance) made it a real PITA. So I'm going for voltage conversion.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply