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
Dominoes
Sep 20, 2007

Great stuff. You've convinced me to read up on the Strategy Pattern. You mentioned BDFL model. What I find most frustrating to work with is the Design-By-Committee approach. Example: At one point I was invited to be a member of a Rust webassembly group working on a module called Gloo. I initially submitted a barrage of proposals and PRs, eg of features I'd made independently and thought would be a good fit. Getting them approved turned out to be too frustrating. Like, I'll put in the effort to propose additions I think are net improvements, but I'm not willing to tweak them until everyone's happy, which multiplies the amt of work required. I gave up, and stopped contributing due to how much overhead work was required. I guess the crux of my take is the approve net improvements bit, which isn't for everyone.

On another side, I lost control over a webassembly framework I built, since I didn't have time, and other devs put in a lot of work to maintain it. I had to ask for help with using it last week because I couldn't keep with the API changes. Earlier on, it was nice being apply to fire off whatever commits I wanted, and I had a WTF moment when I realized dudes were requesting PRs and code reviews for everything. That was a big part of me losing interest.

Re PRing this stuff: I'm happy submitting PRs that probably won't get merged, partly for this reason: If someone else comes along with the same issue, they may find the open PR, and know it's there/avail, even if unmerged.

Dominoes fucked around with this message at 21:27 on Jun 12, 2020

Adbot
ADBOT LOVES YOU

Forseti
May 26, 2001
To the lovenasium!
No problem, happy to spread the good word of thoughtful design. If you're interested, a related topic is the SOLID design principles for OOP. Los Techies put together a good resource on the topic in this 81 page eBook. These ideas more or less come from Robert C. "Uncle Bob" Martin, who was one of the authors of the Agile Manifesto and wrote another book that I'd highly recommend to people interested in designing software, "Clean Code".

One nice thing about these ideas is that they are pretty timeless and they are applicable regardless of details like the actual implementation language, so the investment of learning about them has a pretty high return.

Sorry I got pretty far away from your original topic, AliExpress sent me an email yesterday that my order was sent but I think it's just because they bumped up the time window. Who knows though, maybe I'll get my chips soonish and start hacking on the ePaper too and get some more specific ideas for collaboration.

Dominoes
Sep 20, 2007

Maybe I'll have this sorted out by the time you get it. I'd post what I've got, but it'll make more sense once you've dove in.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
As a hardware guy, I'm also annoyed by software stuff, often

For a lot of open source software, I'll submit a trivial PR, like a quick big fix or doc update, and see how long it takes to get merged in. That's often my litmus test for if I want to put some serious work into a project.

(Probably 80% or more take a year or something to finally respond / merge stuff in, and I've usually moved on by then)

Forseti
May 26, 2001
To the lovenasium!
Yeah it can be super annoying. I submitted this PR for a markdown library which I feel like is a slam dunk and it's been sitting for almost 2 years. Literally fixes something that's deprecated in the HTML5 spec. Maybe they don't like the trivial inline CSS? :shrug: It's just been sitting in limbo.

Forseti fucked around with this message at 02:08 on Jun 13, 2020

Dominoes
Sep 20, 2007

Forseti - Through a mixture of luck and stubborn persistence, I got the display to behave as I wished. Let me know if I can help once the boat gets there.

The bigger the chunk of screen you update, the longer it takes. If you try to update one part naively, the other parts will alternate each quick refresh between "new", and "old" quickrefresh buffer data. You can work around this by refreshing all parts of the screen that have content, but skip the whitespace around. If you have enough memory, you can allocate a full screen buffer for when you want to update everything at once, and multiple smaller buffers for the quickrefresh, boxing around the bits of non-whitespace If you don't have much memory, you might be about use a clever streaming approach, but this could make for hard-to-read and write code. A stumbling block I hit was the drivers failing to pass old data, which is required for quick refresh, and using old look up tables.

Dominoes fucked around with this message at 05:22 on Jun 13, 2020

Dawncloack
Nov 26, 2007
ECKS DEE!
Nap Ghost
I realized reading you that pull requests and the vocabulary around open source projects is opaque to me.

Is there a good beginner guide to point me to? Thanks :)

Dominoes
Sep 20, 2007

From Github.

A Pull Request is a request to update a project with changes you've made. You make one by copying the source code locally, making changes, and requesting that a project owner accepts your changes to the main project. If it's not accepted, you can continue using your modified version, called a branch. I've left out some details.

Historically, merging a pull request was considered to be a collapse of the branches into a single objective project history. A competing interpretation is to treat each branch as independent, with perhaps infinitely many existing at once.

Dominoes fucked around with this message at 14:57 on Jun 13, 2020

Dawncloack
Nov 26, 2007
ECKS DEE!
Nap Ghost
Thanks!

Spatial
Nov 15, 2007

I've got a few odd valued ceramic capacitors in my design. I want to make the BOM simpler/cheaper by using smaller caps in parallel, summing up their capacitance values. They all have the same dialectric and voltage rating so it should be okay in theory right? In fact even better since the ESR is lower I think???

Two examples would be:
2.2uF -> 10 + 10 + 0.22
33uF -> 10 + 10 + 10 + 1 + 1 + 1

The last one may be slightly silly but it's still much cheaper and there's plenty of space. :)

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
Are you sure you need those exact values?

Spatial
Nov 15, 2007

One is a regulator output so that doesn't particularly matter as long as it's above the target value. The others are the kind of thing where a datasheet says "use this cap" and doesn't explain it so I don't want to deviate much on those

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
Actual cap values vary wildly based on temperature and applied voltage. Just get within an order of magnitude, and you'll be fine 99% of the time. Some switching regulators can be finicky, but nothing else mattress

Spatial
Nov 15, 2007

Fair enough :)

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe

Spatial posted:

I've got a few odd valued ceramic capacitors in my design. I want to make the BOM simpler/cheaper by using smaller caps in parallel, summing up their capacitance values. They all have the same dialectric and voltage rating so it should be okay in theory right? In fact even better since the ESR is lower I think???

Two examples would be:
2.2uF -> 10 + 10 + 0.22
33uF -> 10 + 10 + 10 + 1 + 1 + 1

The last one may be slightly silly but it's still much cheaper and there's plenty of space. :)

Those are odd-valued? Check out the wikipedia article on the E series of preferred values. 2.2 and 3.3 are both on E6, the series for components with 20% tolerance. Maybe things from E3 (the 40% tolerance series) are cheaper in MLCC land? 2.2 is still on that.

Unless it's for electrical (esl/esr) reasons adding <10% of the value in parallel with what are presumably 20% tolerance caps looks silly. It's like topping off a jug containing 0.8-1.2 liters with a tablespoon.

Spatial
Nov 15, 2007

The values aren't unusual, I meant they're odd ones out in the BOM. It's just easier/cheaper to build the board with fewer unique parts.

Yeah I see your point with the tolerances... I guess I may as well just round up with the biggest size in the group.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe

Spatial posted:

The values aren't unusual, I meant they're odd ones out in the BOM. It's just easier/cheaper to build the board with fewer unique parts.

:doh: that makes a lot more sense.

One thing you can do is compute new tolerances for your aggregate devices and see if they're OK. Like a "22uF" made of 2 10uF caps will have a minimum value of 16uF with 20% components and a maximum value of 24uF and so you could claim it behaved like a "22uF" cap with 27% tolerance. Or you could get tighter-tolerance caps for the values you're doubling/tripling up. 2 10uFs at 10% is like a 22uF at 14%, etc.

Spatial
Nov 15, 2007

Stack Machine posted:

:doh: that makes a lot more sense.

One thing you can do is compute new tolerances for your aggregate devices and see if they're OK. Like a "22uF" made of 2 10uF caps will have a minimum value of 16uF with 20% components and a maximum value of 24uF and so you could claim it behaved like a "22uF" cap with 27% tolerance. Or you could get tighter-tolerance caps for the values you're doubling/tripling up. 2 10uFs at 10% is like a 22uF at 14%, etc.
Good point! I'll stick with the 10% ones to keep it sane.

Spatial
Nov 15, 2007

On a separate topic, I've been working a tiny board for my own general use recently. I wanted to make it really small and cheap but still practical. It's based around the pretty new STM32G03 which is a 64Mhz M0+. Adding to that are an external DAC, 2MB of SPI flash and a few LEDs and buttons. Powered over USB or through the headers.


I got the boards back and tried out some solder paste stencil + reflow last night, which I've never done before. My highly expensive and complex reflow system: a bargain bin kitchen hot plate and a 50 cent thermocouple.


My results with the stencil were middling, it's all too easy to add too much paste and make a mess of it. Balls of solder underneath the caps etc. I messed up by not shrinking the holes in the stencil a bit, they're the same size as the pads. Duhhhhh. Next time!

I got the best results by smearing teeny-weeny amounts of paste on the pads with an even tinier stick. This worked shockingly well and didn't even take long. Using fine tweezers even the 0402s weren't a problem! For the 32-pin MCU I just smeared it thinly across the pads and it magically flowed into place when it melted. Really neat looking when it happens.

Here is the result with bare minimum populated parts and some random headers I had laying around. Reflow result looks great compared to doing it with an iron.


Further along, everything is mounted except the overly-tiny buttons. Was able to program it successfully and it's blinking away! The board is solid enough that I can run the SPI flash at 32 MHz. I'm really happy it turned out so well! :holy:

Forseti
May 26, 2001
To the lovenasium!
That looks really nice, well done! Did you hack the thermostat for the plate or does it work well enough just turning the knob until the thermocouple looks about right?

Spatial
Nov 15, 2007

Thanks! Yeah it's just me turning the knob and keeping an eye on the temperature :v:

Thermal hackery could be a fun project and I might give it a go sometime. I know many people have done custom reflow ovens based on toaster ovens and stuff like that.

Forseti
May 26, 2001
To the lovenasium!
I was curious because I was considering trying to make a board for one of the cheap iCE40s that come in BGA and had been thinking hotplate seems like the easiest route.

I've heard the toaster ovens are workable but really kind of all over the place temperature profile wise since they're not really insulated or evenly heated.

Shame Boy
Mar 2, 2010

Oh hey, my current project I'm working on is literally that, though it's more just remaking the internals of my reflow heater thing. It's one of these, though with slightly different / more advanced controls:



Which... works I guess? But the control circuitry is terrible and the thermocouples it comes with have a weird non-thermocouple plug on them and break easily, and after taking it apart I noticed the separation inside is fairly awful too. I'm redesigning the control board and adding proper thermocouple connection sockets and such.

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib

Spatial posted:

The values aren't unusual, I meant they're odd ones out in the BOM. It's just easier/cheaper to build the board with fewer unique parts.

Yeah I see your point with the tolerances... I guess I may as well just round up with the biggest size in the group.

Dave Jones JUST did a video about this, if you can tolerate him.

https://youtu.be/RwVzLOI4cmA

You'll have to skip ahead to 13:00, but talks about cap selection, value consolidation, etc. It may not matter on small runs or small boards, but even if you're doing it yourself, it means fewer components to stock or feeders to load.

Shame Boy
Mar 2, 2010

Do most circuits these days just use dedicated thermocouple chips that have the amplifier and compensation junction built in? I used those in my design but god they're like $6 a pop and I need one for every thermocouple I'm using. It's not like I'm doing a big run of these or anything so that's not too big a deal but it feels weird that the single most expensive part of my board isn't the CPU or control circuitry or even the display, it's a set of preamplifiers off to one side.

Sagebrush
Feb 26, 2012



:allears:

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe

:dudsmile:

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
Was that person wiring TX to TX and RX to RX or something?

Sagebrush
Feb 26, 2012

It's certainly not impossible that the silkscreen labels were wrong, but "it only works when I connect Tx and Rx backwards!" + them being enough of a beginner to need a library for a basic serial-controlled device sure sounds to me like they were just matching the pin names, yep

Forseti
May 26, 2001
To the lovenasium!
"I tried calling the support line about it but they said they couldn't hear me. I was speaking into the speaker! Up is down!"

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Cojawfee posted:

Was that person wiring TX to TX and RX to RX or something?

The H801 LED controller I was working with turns out to have its connection points labelled from the perspective of the programmer, not the ESP, so you indeed need to wire TX-TX and RX-RX.

Jerks.

KnifeWrench
May 25, 2007

Practical and safe.

Bleak Gremlin

Subjunctive posted:

The H801 LED controller I was working with turns out to have its connection points labelled from the perspective of the programmer, not the ESP, so you indeed need to wire TX-TX and RX-RX.

Jerks.

I've come to learn that the "convention" for UARTs is confusing and so commonly misunderstood that you basically need to check the schematic.

BattleMaster
Aug 14, 2000

KnifeWrench posted:

I've come to learn that the "convention" for UARTs is confusing and so commonly misunderstood that you basically need to check the schematic.

Yeah I've learned you can't make assumptions as to whether RX means "this is the pin that receives" or "this is the pin that transmits, so hook it up to your other device's receive pin"

There is no standard and people just sort of pick one or the other arbitrarily.

Dominoes
Sep 20, 2007

I get tripped up by mosi and miso too (SPI) - similar issue. And the non-syandard SPI that doesn't use mosi, and used extra digital pins instead.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
MOSI and MISO are intentionally extremely explicit, though! They are great.



For a very brief period of time, or maybe in only a very small circle of people, they were using RXD and TXD to mean TX or RX at Device. And then everyone just started doing TX Data everywhere and gently caress

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe

KnifeWrench posted:

I've come to learn that the "convention" for UARTs is confusing and so commonly misunderstood that you basically need to check the schematic.

This makes that review all the funnier. There's no labeling of "tx" and "rx" here that's entirely wrong by every (generous) interpretation so the fact that they're completely shaken by tx/rx being swapped is some good pedantry porn no matter whether the board uses "yours" or "mine" labels.

csammis
Aug 26, 2003

Mental Institution

Dominoes posted:

I get tripped up by mosi and miso too (SPI) - similar issue.

MISO and MOSI stand for Master In Slave Out and Master Out Slave In, respectively, so the relationship between host and peripheral is made explicit. Sometimes it’s SIMO and SOMI but the meaning is the same. Does that help?


e: the department I used to work in had an explicit convention for RX and TX labeling on schematics and assemblies which was helpful...until one EE swapped them “to make it easier for the software people” and now some designs use one method and some use the other and anyway I left that department :unsmith:

csammis fucked around with this message at 00:49 on Jun 16, 2020

Foxfire_
Nov 8, 2010

Shame Boy posted:

Do most circuits these days just use dedicated thermocouple chips that have the amplifier and compensation junction built in? I used those in my design but god they're like $6 a pop and I need one for every thermocouple I'm using. It's not like I'm doing a big run of these or anything so that's not too big a deal but it feels weird that the single most expensive part of my board isn't the CPU or control circuitry or even the display, it's a set of preamplifiers off to one side.

I always just use thermistors instead

mobby_6kl
Aug 9, 2009

by Fluffdaddy
I don't even bother looking at the labels and just hook it up in whatever way and see if it works, or I need to swap them because this will be faster than trying to dig up the relevant documentation.

Adbot
ADBOT LOVES YOU

Splode
Jun 18, 2013

put some clothes on you little freak

mobby_6kl posted:

I don't even bother looking at the labels and just hook it up in whatever way and see if it works, or I need to swap them because this will be faster than trying to dig up the relevant documentation.

Yep and first run prototypes have 0 ohm series resistors just in case, especially if I can't try it with dev boards first

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