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
ryanrs
Jul 12, 2011

100 V * 10mA = 1 watt power dissipation in the resistor, which will burn up a normal size one. If you are actually going to use this circuit at 100V, please use a 5W ceramic resistor.

Adbot
ADBOT LOVES YOU

ryanrs
Jul 12, 2011

If anyone is interested, I'm developing a Bear Radar to guard my picnic basket while camping in my minivan. It's a network of radar + thermal motion sensors that chat with each other over radio. The idea is to go full sci-fi / heist movie with the design.

Each sensor node has:
Nordic nRF52840 ARM processor
Bluetooth LE
900 MHz LoRa radio
U-blox GPS
BNO055 orientation sensor (up, north)
Passive IR motion detection
Radar
LED floodlight

My plan is to set up a few nodes around my campsite in the evening. They'll watch my stuff and compare notes over 900 MHz. If they see a bear, they can wake me up and I'll scare it away.

It is, of course, ridiculously over-engineered because it incorporates every cool module I've ever wanted to play with. It's basically a sensor + radio dev board. And although I don't plan to, it should be possible to port Meshtastic to this hardware pretty easily.

So far I've hand-soldered one board and it seems to work ok, so I'm putting together all the files to get another 10 made in a factory. That includes the BOM, pick and place data, test and debugging docs, etc.

ryanrs
Jul 12, 2011

It won't be able to tell the difference between a bear, human, deer, or probably a raccoon. But that's fine. I don't want raccoons in my stuff either (though they probably won't open containers, these are wilderness raccoons, not professional suburban raccoons).

It would only be annoying if it triggered on mice or small birds. I think I can set detection limits to avoid very small animals, though.

e: it can also ID vehicles since the radar measures speed and direction (only towards/away, not full vector).

ryanrs
Jul 12, 2011

Sorry, an nvidia jetson will not fit within my power budget.

ryanrs
Jul 12, 2011

Remote controlled ultrasonic humidifier full of dog piss.

ryanrs
Jul 12, 2011

Bear Radar manufacturing cost: $289/unit.

BOM cost is kicking my rear end, but that was expected. Buying tiny quantities of chips and sensors off Digikey is pretty expensive.

ryanrs
Jul 12, 2011

The design goal is mostly to gain experience outsourcing prototyping/test production of a consumer electronics type product. I don't really care how much the BOM costs, though I felt I should point out why it is so high.

Also, the manufacturer is not building the whole device, just the floodlight pcb which is fairly cheap power/analog stuff. So there is only $28 worth of BOM soldered on in China. The other $165 of BOM is stuff I solder on myself, and I don't need to do that in lots of 10.

OTOH, I had to buy a stockpile of those sensors to guard against them going out of stock, so it's not like I'm saving any money.

ryanrs
Jul 12, 2011

Could be as simple as de-glitch logic on the reset pin.

You've also neatly explained most of the reasons I only use 32-bit ARM microcontrollers these days. Absolutely nothing I build is cost-sensitive enough to deal with that kind of 8-bit aggravation.

ryanrs
Jul 12, 2011

Yeah, standard 8051 was 12 clocks/cycles. Dallas had some faster ones with 4 clocks/cycle. High-performance 8051 cores were definitely a thing for while (because the original was so slow).

e: EETimes 10.24.2000
Dallas Semi’s souped up 8051 MCU clocks in at 50 MIPS

ryanrs fucked around with this message at 17:03 on Oct 20, 2022

ryanrs
Jul 12, 2011

mobby_6kl posted:

There's a shitload of empty space in the chassis so they're clearly reusing the motherboard from somewhere.

like the blank switches when you buy a base model car

ryanrs
Jul 12, 2011

Engineering costs dominate small runs, I remind myself, as I submit another $2,500 Digikey order.

ryanrs
Jul 12, 2011

Bench multimeter in 4-wire resistance mode.

ryanrs
Jul 12, 2011

What's a good non-China PCB fab + assembly factory for small hobbyist projects, like PCBWAY? I need some regional diversity in suppliers. Fancy US assembly places are likely too expensive for me. I'm looking for pretty basic single- and double-sided SMT assembly on runs of 2-10 boards. 0402 and QFN and other stuff I don't want to hand solder.

(not racist, but kinda lunar new year-ist)

ryanrs
Jul 12, 2011

Even for bullshit passives like resistors and ceramic caps?

ryanrs
Jul 12, 2011

It's not cost, I just don't want to look up a bunch of yageo part numbers and keep up with what's in stock this week.

ryanrs
Jul 12, 2011

My other goal is to gain experience. I figure I will learn more by doing 5 boards at 5 different factories vs 5 boards all at PCBWAY.

I'm in the middle of a career move from software to electronics, so having experience with multiple vendors makes me more credible, I hope. What are EE job interviews like? Are you asked to draw circuits or is it mostly about software tools, or what?

ryanrs
Jul 12, 2011

I don't know complex analysis. :rip:

ryanrs
Jul 12, 2011

Maybe I should also mention I am 42, have no degree, and I'm entirely self-taught. I do have a number of multimeters, though, including an HP 3457a. So I am down with multimeter chat. I am also down with writing low-level mcu peripheral code, and I'm learning FreeRTOS for my current project.

Here's my latest project over in AI. Sort of an IoT dev board that crams together a bunch of stuff I've been wanting to play with. Right now, I'm focused on gaining experience with PCB assembly houses, because I want to use QFNs and and other stuff that's hard to solder by hand. For example, the microcontroller board linked above is build from an Adafruit dev board, but on the next rev I want to use this raytac module directly. It has a sparse BGA footprint underneath and probably should be x-rayed or something after soldering.

I think I've made 20-30 boards? Almost all worked with zero or minimal rework.

I'm sure I have weird gaps in my knowledge, but I'm also able to design circuits and get boards manufactured from start to finish, which should be pretty useful I hope.

ryanrs
Jul 12, 2011

One time I made a buck converter that hummed, even though the switching frequency was >100 kHz, and even under load (so not related to burst mode stuff). The circuit did work, but I didn't think it should be making any noise at all.

The culprit was the output capacitor. I used a very low ESR polymer cap, which caused subharmonic oscillations in the regulator. Something about the low ESR not playing nice with the regulator's internal compensation? The solution was to use a cheaper, higher ESR electrolytic capacitor on the output. Didn't need to re-spin the board because the footprints were the same.

ryanrs
Jul 12, 2011

My tantalum caps kept blowing just due to inrush.

ryanrs
Jul 12, 2011

Splode posted:

Is it true that tantalum capacitors catch fire if they're exposed to too much voltage?

Tantalum caps go short-circuit when they fail, which tends to be dramatic when they're placed across the power rails. I think they generally explode, rather than catch fire.

The problem with tantalum caps is that there is a race between their internal self-healing chemistry and exothermic failure. So there are a pile of guidelines re. voltage derating to take into account stresses from inrush current, voltage surges, etc, and you end up speccing a tantalum cap with a voltage rating 2x the nominal circuit voltage. Most tantalum cap manufacturers have app notes that talk about this phenomenon. Here's one from AVX.

Why All Capacitors Suck:
Aluminum Electrolytic: electrolyte dries out over time, high ESR
Aluminum Polymer: high leakage current
Ceramic: nonlinear, capacitance changes with applied voltage & temp, big ones are delicate
Plastic film: physically huge
Tantalum: blows up

Every type of capacitor sucks in its own special way.

ryanrs
Jul 12, 2011

ante posted:

That's true of the old true tantalum caps. The new tantalum polymer ones are fine. I intentionally killed a few to test, they just heated up and then politely desoldered themselves

Leakage current is probably a lot higher though? (if you're losing the self-healing)

ryanrs
Jul 12, 2011

PRADA SLUT posted:

If you want to build one for informative purposes, The Art Of Electronics.

But which edition? For the 3rd edition, the authors deleted a bunch of cool stuff that was in the 2nd ed (like weird capacitor facts).

Pirated 2nd ed PDF is the best, IMO, though the microcontroller chapters are super out-of-date.

e: and the big lebowski jokes in the 3rd ed date it as badly as the 68000 assembly in the 2nd

ryanrs fucked around with this message at 19:20 on Nov 28, 2022

ryanrs
Jul 12, 2011

Wow, that is a lot of words and then a link to even more words hundreds of pages ago.

So to summarize:
You have two momentary switches.
When they are both activated within, say, 0.5 seconds, it turns on a GPIO for a Rasp Pi.

For various reasons, you only have one GPIO available to do this. You also don't want to add a tiny 8-pin microcontroller to do it, heh.

But you are in luck! You can definitely do this with a single 555 and some resistors and capacitors. I'll post a circuit in a bit.

ryanrs
Jul 12, 2011



Falstad: 555 + 2 buttons

Operation:
When you close one of the pushbuttons, the discharged 1.5uF cap sucks some charge out of the 1uF cap on the 555. But 1 switched cap is not enough to pull the trigger voltage below 1/3 Vcc. Meanwhile, the 470k resistor is recharging the 1uF and the 1.5uF switched cap.

So to force the trigger voltage below 1/3 Vcc, both switches need to be flipped. And you need to do it before the 470k resistor can add much charge. Note the second 1.5uF can't drop the voltage as much as the first, because it's pulling charge off two caps (1uf + 1.5uF).

If both switches are flipped within 0.5 secs or so, the 555 output will go high, and stay there until at least one of the switches is released, plus a delay.

Notes:
1) There is a false pulse at startup after power is applied. It'll clear in under a second, which is probably less than your raspberry pi takes to boot. This isn't shown in simulation because it's kinda annoying when playing with the buttons.

2) When the switches are closed and re-opened, it takes 3-5 seconds to recharge them before they can be used for another activation. This feels like forever in simulation.

3) Use TLC555 or LMC555 or a similar CMOS timer. Not NE555.

4) Use reasonably accurate 5-10% tolerance film capacitors. Not ceramic or electrolytic.

5) The 10 ohm resistors are just to keep the simulator happy, though they probably save some wear on the switch contacts, too. Anything between 0 and 1k is fine.

6) If these buttons are at the end of several feet of cable, maybe multiply all the capacitor values by 10 and divide the 3 large resistors by 10.

code:
$ 1 0.000005 54.00526672067058 59 5 43 5e-11
v 704 272 704 80 0 0 40 5 0 0 0.5
165 512 128 560 128 6 0
r 32 96 32 176 0 1000000
c 96 96 96 176 0 0.0000015 0.001 0.001
s 144 96 256 96 0 1 false
w 32 96 96 96 0
w 96 96 144 96 0
w 32 176 96 176 0
g 64 176 64 208 0 0
g 64 368 64 400 0 0
w 32 352 96 352 0
w 96 272 144 272 0
w 32 272 96 272 0
s 144 272 256 272 0 1 false
c 464 288 464 368 0 0.000001 5 5
r 32 272 32 352 0 1000000
c 96 272 96 352 0 0.0000015 0.001 0.001
r 464 176 464 80 0 470000
w 464 80 576 80 0
w 576 96 576 80 0
w 704 80 576 80 0
g 704 272 704 320 0 0
g 608 288 608 320 0 0
w 640 160 640 80 0
g 464 368 464 400 0 0
w 64 368 64 352 0
w 64 352 32 352 0
w 32 176 64 176 0
w 576 80 640 80 0
O 640 192 672 192 0 0
r 256 96 256 176 0 10
r 256 176 256 272 0 10
w 256 176 464 176 0
w 512 256 464 256 0
w 464 288 464 256 0
O 464 256 400 256 1 1
w 464 256 464 176 0
w 512 224 464 224 0
w 464 224 464 256 0
o 29 64 0 x81016 4.999999950000001 0.0001 0 1 1 -98
o 35 64 0 x81016 5 0.1 0 1 2 -98
o 3 64 0 x81016 0.0007120995926876256 0.0001 0 2 2 -98 3 3 0.000049999999999999996 0
o 12 64 0 x81016 0.0048828125 0.00009765625 0 2 2 -98 12 3 0.000049999999999999996 0

ryanrs fucked around with this message at 01:08 on Nov 29, 2022

ryanrs
Jul 12, 2011

Don't use my 555 circuit if you have enough GPIOs to wire the switches directly.

ryanrs
Jul 12, 2011

Qwijib0 posted:

I am concerned about some glitch on a smart dimmer running them at 100% so I need some sort of way to guarantee they never break ~60V.

Put pairs of identical bulbs/strings in series. 120 / 2 = 60V, ta da!

e: this also reduces the power-on stress by 75%

ryanrs fucked around with this message at 21:59 on Nov 29, 2022

ryanrs
Jul 12, 2011

Sense pin is probably a resistor to ground or similar. The resistor value will be specific to the laptop/brand, so it lives in the swappable tip, and only +/- go back to the charger board.

ryanrs
Jul 12, 2011



I made a thing with this micro USB connector and it seems pretty solid. It's not going to be waterproof with my rough, 3D-printed enclosures, but it fits the enclosure opening pretty tightly. It seems like a lot of the stress might transfer to the enclosure, not the leads. OTOH, the silicone gasket is more compliant than the metal leads, so maybe it won't help.

ryanrs
Jul 12, 2011

ryanrs
Jul 12, 2011

Yes, thanks! It took a surprising amount of time getting the silkscreen perfect. This was my first PCB designed for 3rd party assembly. More pics in my AI minivan build thread.

That screw can be left out. In fact, you can leave out all the screws and the pcb will stay in place until you whack the enclosure against your desk to dislodge it. The board 'clicks' into the housing, with full contact along the perimeter. Finished units will have an acrylic window, which will make it even stronger and stiffer.

ryanrs
Jul 12, 2011

Goddamn, I am having bad luck with PCB assembly houses loving up my paste stencils.

The thing is, I want them to tweak the paste stencil to optimize their reflow process. But twice I've had pcb assemblers put paste where there was no paste before! And to be clear, both times I submitted correct paste stencil gerbers, and they changed them without asking.

The first time, PCBWAY decided to add paste to every do-not-place component pad on the board. Fortunately they sent pics so I got to tell them to wick it all off.

The second time, I used JLC and I included a few sentences about Not Doing That. So instead, they added paste to the fiducials on one side of the board. This isn't actually a problem, but WTF? Shouldn't their CAM software have explicit checks not to do that?

Please help me understand the manufacturing CAD workflow. Why are these factories making such stupid changes to my paste stencils? Do I really need to say "Do Not Modify My Paste Stencil"? Because if they want to tweak the stencil apertures or whatever, then they should. But don't change the paste/no-paste state of a pad.

They seem pretty good at not randomly changing the solder mask and copper layers without needing to be reminded. Why is paste layer special?

e: In JLC's case, they added tooling strips with their own fiducials because the board was small. So at least they (probably) weren't running their pick-and-place off the pasted fiducials.

ryanrs fucked around with this message at 00:10 on Dec 5, 2022

ryanrs
Jul 12, 2011

Circuitpeople.com seems broken (like most online viewers probably). But my gerbers looked fine in KiCad's 3D viewer. Here are some screenshots from pcbgogo.com's online viewer:


Both boards were only partially assembled at the factory, so I was careful to enable paste on only the right pads (pain in the rear end in KiCad, btw). In PCBWAY's case, they said they generated the stencil from the soldermask. Now, I only provided them with a top layer paste gerber, so maybe they thought a file was missing? But it was only a single-side assembly job, so...

ryanrs
Jul 12, 2011

Huh, Circuitpeople is only rendering the inner copper layers of my boards, but barfing re. nearly everything else.

quote:

We were unable to render the following files:

lolra-light-F_Paste.gtp has Gerber274X content to be used for Stencil .
lolra-light-F_Silkscreen.gto has Gerber274X content to be used for Silk .
lolra-light-B_Mask.gbs has Gerber274X content to be used for Mask .
lolra-light-F_Cu.gtl has Gerber274X content to be used for Copper .
lolra-light-B_Cu.gbl has Gerber274X content to be used for Copper .
lolra-light-B_Silkscreen.gbo has Gerber274X content to be used for Silk .
lolra-light-F_Mask.gts has Gerber274X content to be used for Unknown .
lolra-light-PTH.drl has Excellon content to be used for DrillData .
lolra-light-NPTH.drl has Excellon content to be used for Unknown .
In the near future we will be offering automatic rendering of drill drawings and aperture files (aperture files will show the apertures defined in the file). After that we'll look at rendering other formats as well (text, PDF, DXF, etc.)

ryanrs
Jul 12, 2011

well it's definitely safer than the cigarette lighter

ryanrs
Jul 12, 2011

I've been playing around with UV adhesives for stuff like that (wire tacking, misc assembly). Today I discovered that while 365nm UV LEDs are pretty neat, they have almost zero penetration of acrylic. I got a 395nm flashlight and it works much better for curing through the plastic.

ryanrs
Jul 12, 2011

Resistors power ratings reflect their max temperature, which is way higher than a lot of other components (e.g. chips). So a resistor being run at max power rating is hot. Really hot.

I oversize my power resistors by a lot.

ryanrs
Jul 12, 2011

Stickvise + Mantis microscope at work. The low profile is really nice for soldering under the microscope.

ryanrs
Jul 12, 2011

5V@200A requires a power architecture.

You can and should do this with an off-the-shelf 48V 1.5kW supply and many smaller point of load regulators to drop the 48V it down to 5V. But you will need to do some engineering wrt heat dissipation (I guess mostly the LEDs?), wiring, connectors, etc.

Also, have you already made a 5V@20A LED panel and did it work out ok?

Adbot
ADBOT LOVES YOU

ryanrs
Jul 12, 2011

slurm posted:

Working on my electronics repair kit, a lot of times I have to fix something that's failed because of vibration. Is there a 1-part glue that dries soft and has a good shelf life that I should be packing for those "the voltage regulator snapped off again" moments?

Yes!

Norland NEA 123 and this UV flashlight. It's a very thick fluid that cures in a few seconds to a firm consistency. Firmer than silicone caulk, not as hard as epoxy. Similar to (cooled) hot glue.

The catch is you need to light up everything you want cured. It can't cure if sandwiched between two opaque objects, for example. Well, you can bake it for 10 minutes at 125 C or 3 hours at 80 C, but that is a pain in the rear end.

Use a 400 nm flashlight, not 365 nm, if you want to cure through acrylic. NEA 123 cures fine at 400.

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