[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/diy/ - Do It Yourself


View post   

File: 330 KB, 1488x1166, new attiny pre inflation.png [View same] [iqdb] [saucenao] [google]
2733332 No.2733332 [Reply] [Original]

Previous thread:>>xxxxxxx

Here we discuss microcontrollers (MCUs), single board computers (SBCs), and their accessories, such as Atmel mega and tiny AVRs (Arduinos), PICs, ARM boards such as blue/black pill STM32, ESP8266/32s, RP2040, Raspberry Pi, and others.

For general electronics questions (power supplies, level shifting, motor driving, etc.) please ask /ohm/.

>where can I find verified quality microcontrollers and other electronic sensors or parts
digikey.com
mouser.com
arrow.com
newark.com

>but that's too expensive
aliexpress.com (many parts here are fake, particularly specific parts out of stock in the above sites)
lcsc.com

>I need a part that does X and Y, with Z specifications. How can I find it?
use DigiKey's or Octopart's parametric part search. Then purchase from one of the sellers listed above.

>how do I get started with microcontrollers, where should I start?
There is no defined starting point, grab a book and start reading or buy an arduino off ebay/amazon and start messing around. There are a plethora of examples online to get started.

>resources:
https://github.com/kitspace/awesome-electronics

>RISC-V microcontroller list:
https://codeberg.org/20-100/Awesome_RISC-V/raw/branch/master/RISC-V_MCU_development_boards.pdf

p.s. don't eat solder

>> No.2733335

actual previous thread:
>>2733332

>> No.2733336

actual actual previous thread:
>>2707804

>> No.2735138

holy shit i hate arduino

>> No.2735149

>>2735138
based

>> No.2735231

>>2735138
Everyone should.

>> No.2735236

>>2735138
This. I spent years and tons of money learning how to program an AVR in assembly language and now they let literal faggots do the same things with ease for a few dollars. We need fucking guilds to come back.

>> No.2735240
File: 77 KB, 600x393, godfather+cat-2698044235.jpg [View same] [iqdb] [saucenao] [google]
2735240

>>2735138
>>2735149
>>2735231
>>2735236
What have I ever done to make you treat me so disrespectfully?

>> No.2735243
File: 399 KB, 1098x1440, 1665666437808314.png [View same] [iqdb] [saucenao] [google]
2735243

>>2735236
>spending tons of actual money
>to learn how to program an assembly language
>that was designed to work with C compilers

>> No.2735333

M68HC11. Do you really need more?

>> No.2735354

>>2735333
I've got some of those in 40-pin DIP (-D0 variant) that I want to fire up on a breadboard.
Still, I'd have been happier if they had built off of the 6809 instead of keeping the little wierdnesses of the 6800. (like the stack pointer pointing to the next location instead of the last byte of data)

>> No.2735427

>>2735354
>happier if they had built off of the 6809

pining for 1Mhz processors, when you have 1Ghz ones aplenty = INSANITY

>> No.2735449

>>2735427
A lot of the CISC chips run at slower frequencies but achieved more compute work per unit time because of things like hardware multiply in the 6809 et al.

The 68HC11 and it’s successor, the '12, added some of the 6809 goodness, and the code density is unparalleled, so you need less on-board memory.

For a microcontroller, you don’t always (or, in my opinion, hardly ever) need at 32-bit/GHz processor, and I absolutely hate programming ARM, AVR, and I will probably hate RISC-V.

I absolutely hate some of these tiny BGA GHz microcontrollers, and the use polling loops or whatever hopelessly inefficient code, or worse: micropython, and then they end up having to add a heatsink and fan to the thing. Ridiculous.

>> No.2735464

>>2735427
The speed was only because of the silicon process of the day. I think the HC11 was Motorola's first go at using microcode, and it was probably just easier not to deal with complexity of the 6809 instruction set. Also their big customers were probably automotive, who were already familiar with the original 6800.
Some guys recently made an HDL core based on the 6809, and when it was all done, the stats showed that the Motorola guys were right about their choices with the instruction set design. It was really an awesome core that they came up with.

>> No.2735842
File: 131 KB, 1090x469, Screenshot_2023-12-31_14-04-55.png [View same] [iqdb] [saucenao] [google]
2735842

If you're bored and would like a nice little project, buy 5 - 10 pic related, and a 2-4k resistor. Then, without looking at any online code, write in C or assembly a method for the Search Rom command.

https://onlinedocs.microchip.com/pr/GUID-1618003F-992B-4E48-9411-5E5D5D952C06-en-US-3/index.html?GUID-EE2B21FC-9AA9-4C04-88EF-1951F703A56C

>> No.2735847

>>2735240
normies and niggers can now program because of you

>> No.2736073

Nothing is more comfy than to programm a microcontroller on early morning in the new year.
:)

>> No.2736085

How do I define a GPIO in Zephyr device tree which isn't a button or LED. How the fuck do software people make something so simple so complicated

>> No.2736141

>>2733332
I'm an expert on STM32, but don't have any ideas
What can I make that has real world implications and I can make some side money?

>> No.2736195

>>2736141
anything that can make you real cash requires a whole tonne of regulation compliance and certification. either that, or make some gay iot rgb slop.

>> No.2736414

>>2736141
Use DMA to make an audio DSP pipeline between an I2S ADC and DAC, ideally you’d have enough RAM for 5+ concurrent STFTs for ideal enveloping. Then you add some general-purpose buttons and pots and plugs for pedals, and some rudimentary way of controlling it. You’ve got yourself every guitar pedal ever possible for under $100. If you add a couple of half-bridges you could also use it as a general-purpose controller for switching loads from sensor measurements (e.g. PID control), motor driving, or even using as a class-D amplifier.

>> No.2736450

>>2736141
> stm32
What series? There’s hundreds of STM32 devices in various stages of deprecation. They’re just arm cores anyway. Seen one, seen ‘em all.

>>2736414
That guitar pedal won’t sound as warm as my tube based pedals… junk.
> class-d
Jeez… why bother. Class A tube amp is the only way forward.

>> No.2736515

>>2736450
>won’t sound as warm as my tube based pedals
Tubes don't have some magical aura that blesses any sound that goes through them, they just add some light distortion - which is predictable and can be replicated highly accurately with DSP.
Regardless, the vast majority of pedals and effects are not based on tubes, so it's kind of a moot point anyway.

>> No.2736556

>>2736515
Digital effects and amplifiers have a harsh and cold sound. Discrete transistor based pedals are the next best thing. Both tubes and transistors affect the sound in quantum-mechanical ways that are impossible to reproduce using standard digital computers (e.g. thermionic emission)

>> No.2736600

>>2736515
I suspect he was posting ironically. I refuse to believe someone self aware enough to post on /mcg/ without being an arduino kiddie actually believes:
>Class A tube amp is the only way forward

>> No.2736609

>>2736600
We’re talking about an electric guitar. The pedals and the amp with their distortion, harmonics and resonances form part of the instrument’s sound.
If it’s loud enough, there’s even feedback from the amp through the pickups to some degree.
There is too much to digitally reproduce.
Otherwise, you could just ditch the guitar altogether and use a keyboard to synthesize everything, and that would lead to ridiculous scenarios like electric guitars with midi outputs. Okay, I think there was one guitar with a midi out—but someone had to do it.

>> No.2736660

>>2736600
I would certainly hope someone that does programming would have enough critical thinking to look at it rationally, but you never know when it comes to audiophools and guitarfags. The amount of people smart enough to work on tube equipment that actually believe that shit is astonishing.
Whatever. If it's bait, it rides the line damn well.

>> No.2736733

I posted in an old thread about replacing the control circuit in a gate operator with an Arduino. Thanks to the anon that believed in me because I successfully went from 0 to coding and prototyping the circuit after only 15 hours of Paul mcgorter. It was actually pretty simple and it works but my problem now is mostly the vibration from the gate motor. It doesn't take much to shake the pins out of place, short something, get stuck in the wrong loop and require intervention. Thinking hot glue or el6000 but that might be too permanent.its likely I'll need to add components or tweak functionality as time goes and don't want to be stuck with a solid mass of glue and tiny wires.
The other question which I can probably Google is whether a pin on the Arduino can digitalWrite to and then read from the same pin. My code is super simple with 3 inputs,2 outputs and a couple of if statements. Id like to add redundancy to protect from unforseen conditions and being able to tell the Arduino to know what it's doing would help. For example it only takes either one of the limit switches which are 5v w/pulldown resistor and the trigger which I have wired with internal pullups and ground signal because of long run of thin wire.. there's almost always one limit switch active as the gate is either open or close most of the time and I'm worried a stray current or condensation could cause it to open for no reason.

>> No.2736757
File: 105 KB, 355x347, Screenshot_2024-01-02_14-25-57.png [View same] [iqdb] [saucenao] [google]
2736757

>>2736733
>It doesn't take much to shake the pins out of place

I had the same problem when I tried to use an Arduino knockoff to regulate a jack hammer, and found out that soldered connections are preferred, and if you have to use dupont connectors try to buy high quality ones and don't mount them on something that vibrates.

> whether a pin on the Arduino can digitalWrite to and then read from the same pin.

And this is why Arduino fags are hated. I don't know what exactly you are saying and what your problem is, but if you are asking if a GPIO pin can be an output for a while then be an input for a while then in general that is correct, but it's not something that is usually the best way to do something. There's nothing at all wrong with it, as it's how I2C and some other protocols are handled.

>> No.2736803

>>2736609
>We’re talking about an electric guitar
>The pedals and the amp with their distortion, harmonics and resonances form part of the instrument’s sound
I'm just suggesting you replace the analog pedals with a single digital pedal that has the characteristic curves of all the analog pedals coded into it. Like what people already do with digital simulated instruments, but with a real guitar and amplifier in the loop.
>There is too much to digitally reproduce
There really fucking isn't. You've got distortion (literally just soft/hard clipping), then a bunch of static or variable analog filter stages (wah, tone, phaser, etc.), then some variable gain stages (compressor, tremolo, etc.). These are all trivial to do with bog-standard z-transform digital filters. Even strange effects like octave up/down or BBD-based effects are easily doable. You could even simulate a damn spice file with all the transistors and tubes and parasitics from a circuit of your choosing, though probably not in an STM32.

FYI these digital pedals already exist, but they were designed in like 2005 and cost over $500.

>> No.2736982

>>2735236
wtf i love arduino now

>> No.2737026

>>2736803
> probably not in an STM32
They make beefy STM 32s with DSP instructions, so maybe. OP probably meant “I’m a (chinese knock-off) blue pill expert” rater than a STM 32 expert.

>> No.2737033
File: 43 KB, 600x315, hdd vibration proofing using rubber bands.jpg [View same] [iqdb] [saucenao] [google]
2737033

>>2736733
>It doesn't take much to shake the pins out of place

you can use strips of rubber from a bike tire, hair band, or whatever, to isolate vibration.
hang the PCB in mid-air until such time as you've leveled up your soldering skillz.

>> No.2737043

>>2737026
>They make beefy STM 32s with DSP instructions
LTspice spins up the fans of my 8 year old mid/high-tier 64-bit laptop as it simulates nowhere near real-time. I doubt something like spice will be used for real-time circuit emulation on an MCU any time soon. Maybe on a beefy FPGA.

I'd like to see a PINN (physics informed neural network) trained on spice, such a thing could take a fraction of the computational resources. I think it could be a cool project to try and make a precursor neural net that can turn circuit pdfs and jpgs from the web into netlists to get more training data for such a PINN. Also a neural net that can generate arbitrarily complex spice part models by scraping datasheets off the web.

>> No.2737101
File: 1.76 MB, 1818x1122, 2E970A85-A30D-4503-A260-2455396CCB66.jpg [View same] [iqdb] [saucenao] [google]
2737101

>>2737043
> neural networks, dsp, fans, pentium
i built my working filter in less time than it will take you to read through the STM catalogue and pick a device.

>> No.2737205

>>2737043
>PINN
I think this is just a big meme from mlbros who never attended college and are trying to sell a square wheel
I have yet to see an example where their results cant be achieved by a model

>> No.2737317
File: 104 KB, 750x750, two_mass_schematic.png [View same] [iqdb] [saucenao] [google]
2737317

>>2737033
Nta. I think it could use a relatively big mass in the middle of the rubber spring.

>> No.2737371
File: 7 KB, 857x261, dec_hex.png [View same] [iqdb] [saucenao] [google]
2737371

>>2737043
A spice to spice simplifier seems like a better use for ml. The real opamp circuit might turn into the ideal opamp, a 1 pole filter might be close enough, a small resistance might be negligible etc.. Surrogate modeling ignores model structure. Salome Homard goes in the opposite direction: when Homard refines a mesh it adds equations whereas I want to remove/replace them.

>> No.2737425

>>2737101
Yes. And you have to build a different circuit for each different filter you want.

>>2737205
>I have yet to see an example where their results cant be achieved by a model
Fluid and fabric sims from what I've seen are faster when done with neural nets. But those are approximations that are fine for aesthetic purposes, whether they're good enough to replace engineering simulation is another thing entirely. There's also light-transport and DLSS.

>>2737371
So long as the network can understand what simplifications don't lose important features, yes. Imagine giving it one of those tempco compensating discrete transistor circuits drawn by the greybeards.

>> No.2738005

>>2735138
what should i be learning instead of arduino? i already know c and been having fun with it, but the limitations are obvious

>> No.2738215

>>2738005
zoomer option: micropython
glowie option: closed source vendor ide (there's also some third-party ides like that ch32v ide based off eclipse)
normie option: platformio
wizard option: text editor of your choice, gcc, gdb, and a command-line programming tool, with possible gui wrappers for these
/g/ special option: as above, but you find (or write) a compiler for a language of your choice, like go or rust or fortran or whatever those hippies use

>> No.2738219

>>2738215
>wizard
This should be normal, not wizard tier.
>/g/
>(or write) a compiler
The actual /g/ option is to use a phone and buy some chinese bluetooth gadget that does what the thing they want to do.

>> No.2738247 [DELETED] 

>>2738215
Where does text editor+assembly language -> avrdude fit into that spectrum.

>> No.2738414
File: 24 KB, 682x630, 1700968467303271.jpg [View same] [iqdb] [saucenao] [google]
2738414

ive misplaced my esp32c6 devkit somewhere and i cant find it

>> No.2738417

>>2738215
boomer option: forth interpreter

>> No.2738425

>>2738414
Have you tried the flex gpio glitch filter?

>> No.2738499

>>2738425
no, the esp is still in its unbroken esd bag
what is the opinion on tasmota for iot/home automation stuff?

>> No.2738525

>>2738219
>This should be normal, not wizard tier
I kinda agree, but having to use the command line for anything makes you a wizard these days.
>chinese bluetooth gadget
There's two sides to /g/, the programming threads and the chinkshit threads. The unifying thread is programming socks.

>> No.2738716

>>2735240
Aside from the usual gripes which are usually the IDE, and I dont remember who made it, but I watched a good video where someone shit all over the board design (i think it was bogatin, or hartley). It "works" for what most users are doing with them, but they did a real shit job with the layout...not enough/poorly layed out grounds that would cause signal integrity issues. A lot of the weird comm issues I had working with Arduino projects started to make sense.

>> No.2738718

>>2736609
modellers definitely feel different to play through even if the tone is identical...and with high gain stuff there is definitely a difference

>> No.2739885

Are there any good USB Host controllers?
If there's any microcontroller with USB Host support you've used, aside from the RP2040, I'd also love to hear about it.

>> No.2739888

>>2739885
I should expand this question by mentioning what I need this for: I'm trying to interface with a USB serial device. I have no particular speed requirements or other power delivery/electrical requirements. It shouldn't be too complex.
I think it might be possible to bitbang it too? I wonder how that would go.

>> No.2740244

>>2739885
>>2739888
theres literally 100s of mcus with usb 2.0 otg support. pick one and go

>> No.2740328

>>2740244
I'm not entirely sure how OTG works nor what the limitations are of it. Are there any standalone chips that do this, or do I need a mcu specifically for it?

>> No.2740343

Anyone ever use NXP microcontrollers? How's their development tool situation? Can I just avoid the SDK and poke registers direcly like with STM32?

>> No.2740346

>>2740328
By standalone chip do you mean something like an FT232? You'd need a chip that's either a full configurable USB stack, or a more specialised chip designed to accept a USB audio codec or USB HID device. For the former, such a product would be less flexible and more expensive than a microcontroller with USB otg. For the latter, why the fuck would anyone want that anyhow?

>> No.2741363

>>2736757
Tell us more about your microcontroled jackhammer anon. I tried super glue which seemed effective against vibration but didn't help against the effects of environmental temperature changes on cheap chinese pins mounted in solderless breadboards.. I've ordered a nano and a real breadboard so going to try soldering this weekend and probably mount the unit somewhere not attached to the motor. As far as the GPIO pins i guess I'm trying to figure out a statement that can check if an output pin is outputing and put a time limit on how long it should do that. Chatgpt showed me some counters and siad you could digitalRead a pin that's pinmode that was set as an output in setup, but that code never worked.

>> No.2741369

>>2741363
Kill yourself.

>> No.2741399

>>2741369
no. (you).

>> No.2741440

>>2740343
> nxp?
Which ones? The hcs8/12?
Good, but $700 for the programming dongle is bonkers. They’re clearly only in business for a captive market—auto manufacturers.
Sadly, they’re at a point where it’s worth spending money to get away from them rather than continuing their use.
It’s sad, because they’re the carriers of the motorola IP.

>> No.2741441

>>2738417
real boomer option: pay an indian or chinaman $1000 to do it for you

>> No.2741656
File: 26 KB, 457x441, 41jhuYsPchL._AC_.jpg [View same] [iqdb] [saucenao] [google]
2741656

Simple project I just completed today:
ESP32 connected to a microswitch that will send a push notification to the phones of everyone in my house when our upright freezer in an out building is left open, with consecutive push notifications at different intervals that stop once the door is closed.

Just a few months ago, we had to throw a ton of food away because someone left the fucking thing open. We just bought a half of grass fed beef to fill it up, and that shit is not cheap. I honestly might connect an external alarm to it as a contingency plan.

Used GPT to generate the code. EZPZ

>> No.2741660

>>2741656
Holy fuckin zoomergasm….
You’re supposed to raise the front levelling feet so the door closes automatically.

>> No.2741662

>>2741660
That doesn't work, dawg. The door requires a decent amount of deliberate force to actually close, due to the air displacement or something. And I thank God every day that I'm not a zoomer.

>> No.2741663

>>2741441
Dude, in my day there like one black guy in our high school, no internet, and no indians or chinamen. That would never occur to us.
Japanese-made stuff was considered trash.
Even now, I only buy 100% american-made and owned power tools like Milwaukee even though they cost more.

>> No.2741665

>>2741663
>Japanese-made stuff was considered trash.
In reality, Japanese made stuff is some of the best you can buy.

>> No.2741738

>>2741656
>ESP32
>GPT
I fucking hate zoomers. Just add a spring to the door so it closes automatically.

>> No.2741740

>>2741738
> add a spring.
Exactly… I clipped a bungee cord on the handle around to the back and that kept mine closed.

Then I got smart and got rid of that fucking thing and got a chest freezer, and a freezer alarm that works on temperature in case a breaker flips since I got like a thousand worth of meat in there.

Just like if you’re having marital problems, usually you don’t reach for an esp32 and start writing code to solve them. Maybe the problem is the fact that you reached for an esp32 in the first place.

I won’t make that mistake twice.

>> No.2741884

>>2741738
>zoomer
no, a zoomer would literally buy some expensive brand name pre-made bullshit. Zoomers aren't buying a half of beef either
>a spring
If there's a spring on the door heavy enough to close it, the spring will stretch over time, someone will remove it, it breaks, etc. If I just add a sensor to let me know the door hasn't been closed, then I have cheap and easy insurance on my expensive ass premium beef
>>2741740
>Then I got smart and got rid of that fucking thing and got a chest freezer
I've got both. One for ease of access, one for deep storage. This is an out building, and I'm not going to hear an alarm unless I'm specifically going into that building to get meat. Freezer stops pumping any cold air as soon as the door opens.
>Marital problems
Really sounds like you've got a lot going on right now

>> No.2741928

>>2741884
> alot going on
No worry, most marital problems can be solved with a bungee cord too.

>> No.2742338
File: 4 KB, 192x192, 1594022710721.jpg [View same] [iqdb] [saucenao] [google]
2742338

I'm trying to work with a rotary encoder, but I'm having trouble finding what I need to do. I am trying to use an Arduino Pro Micro with the encoder. I want to the signal on one pin to be high continuously while I'm turning the knob, and if I turn it the other way, it will stay high as long as I'm turning it. I'm pretty much trying to use the encoder directions as continuous pushbuttons. Any ideas or what exactly I should google?

>> No.2742351

>>2742338
Have you searched the arduino libraries? People usually write libraries for common stuff like encoders.

>> No.2742359

>>2742351
I have. I have a couple of libraries installed and they work, but it's the translating the continuous turn into a steady high signal that I'm struggling with. I see how they're incrementing the counter, but I don't know the best way to translate "counter go up, signal high. Counter go down, other pin signal high." I didn't know if a bunch of if-else statements would be good for that.

>> No.2742395
File: 9 KB, 400x400, tegaki.png [View same] [iqdb] [saucenao] [google]
2742395

>>2742338
Pic related. Just a D-flip-flop, a pair of schmitt-input AND gates, and some resistors and diodes and a capacitor. You can make it respond faster by using two flip-flops, which is left as an exercise to the reader. The capacitance C determines the minimum rotation speed. Should be cheaper than a legitimate ATmega32U4, but not as cheap as an ATtiny13 or ATtiny212.

If you want to do it in code, I recommend writing it from scratch without a library. Having the understanding of how the code works will help you modify and troubleshoot it. You could also try to understand and modify the existing libraries. You will need to implement a time factor.

>> No.2742399

>>2742359
>I see how they're incrementing the counter
So you have an int that increases if you turn it one way and decreases if you turn it the other way? In that case it's easy.

int encoderRotate (int encvalue) {
static int memory = 0;
if (memory > encvalue) {
memory = encvalue;
return 1;}
else if (memory < encvalue) {
memory = encvalue;
return -1;
}
else
return 0;
}

This should output 1 if the value increases, -1 if it decreases and 0 if it stays the same. Probably a bit of a hackjob but it should work.

>> No.2742404

>>2742399
That will only give a bunch of pulses, not a solid output. For a solid output you need a delay/counter function in there to smooth out the pulses.

>> No.2742589

>>2742399
>>2742404
not to mention what happens when one of the values overflows/underflows
>but muh 64-bit ints
I still remember that 2^32 seconds means Windows 3.x crashes after 45 days of uptime.

>> No.2742612

>>2742404
It's a solid output so long as you keep spinning the encoder one way or another. This is what that dude wanted, unless I misunderstood and he wanted to keep the signal even when it stops turning.

>>2742589
>man spins rotary encoder for 100 hours straight

>> No.2742666
File: 526 KB, 750x744, 1507812056227.png [View same] [iqdb] [saucenao] [google]
2742666

>>2742612
Remember where you are.

>> No.2742694

Does anyone know about javacards?? I want the cheapest, most available, standard one that can do NFC with a phone.

https://github.com/OpenJavaCard/openjavacard-ndef/blob/master/doc/compatibility.md
I cannot find the example cards for sale, and similar ones do not explicitly mention NFC. Should I be looking for some other term? Does "contactless" necessarily mean NFC?

>> No.2742827

>>2742612
>It's a solid output so long as you keep spinning the encoder one way or another
No it isn't. If you turn the encoder 5 clicks to the right, there might be thousands of cycles of that function in between. The function will return +1 only 5 times out of those thousands, for the rest of the cycles it will return 0. If you only call the function when the encoder clicks, then it's never going to return 0. You have to have a delay/timer function somewhere to differentiate between "count incremented 3 times in a second and so should be continuous" and "count incremented with 20 seconds between clicks".

>man spins rotary encoder for 100 hours straight
Common encoders are 20 turns per revolution. Assuming you're using 8-bit ints with your 8-bit MCU, that's just 13 rotations before you get a glitch. Use 16 bits and it's better, but getting a glitch once every couple of weeks or months is still sub-optimal. There are pretty easy checks for this though, and these checks are the sort of thing you should actively be learning in order to design robust embedded systems in the future.

>> No.2742947

>>2741663
>I only buy 100% american-made and owned power tools like Milwaukee
Anon, I...

https://en.wikipedia.org/wiki/Milwaukee_Electric_Tool
>Milwaukee Tool was last sold in 2005 for $626.6 million to the Hong Kong-based Techtronic Industries, also known as TTI Group. The company is now a subsidiary of TTI Group alongside brands like AEG, Ryobi, Hoover, Dirt Devil, and Vax.
>Milwaukee tools today are manufactured globally in China, Germany, Mexico, the United States, and Vietnam.

>> No.2742956

>>2742947
Oh no, that anon gave all his money to Xi personally.

>> No.2742983

I've got an ATtiny13 and I'm reading its ADC in free-running mode from two different pins. In my ISR I have the following code:

ISR(ADC_vect) {
//ADMUX = 0b00100001; //PB2, potentiometer
//ADMUX = 0b00100010; //PB4, current sense

if (ADMUX == 0b00100001) {
currentVal = ADCH;
ADMUX = 0b00100010;
} else {
potVal = ADCH;
ADMUX = 0b00100001;
}
}

But it's not doing a clean swap. I'm getting values of each voltage in both variables. I'm pretty sure it worked fine on a mega328P, but not here on the tiny13. The ISR isn't getting triggered during itself, because adding cli and such doesn't fix it. The ADC is updating live.

Even when I ditch free-running mode and only trigger a conversion after swapping the ADMUX register it still messes up. Anything else I should try? A completely different approach maybe?

>> No.2743048

>>2742983
try having your adc simply set a flag or two to read the adcs in your main loop instead

>> No.2743050

>>2743048
fuck me and my dyslexia
try having your isr* simply....

>> No.2743118

>>2742983
>14.6 Changing Channel or Reference Selection
>Once the conversion starts, the channel and reference selection is locked to ensure a sufficient sampling time for the ADC
>If Auto Triggering is used, the exact time of the triggering event can be indeterministic. Special care must be taken when updating the ADMUX Register, in order to control which conversion will be affected by the new settings.

Your code pretty much guarantees you're changing the admux while a conversion is happening, so definitely stop using autotrigger

>Even when I ditch free-running mode and only trigger a conversion after swapping the ADMUX register it still messes up

then your bug isn't in this code, it's in that other code

Also, don't expect good results right after changing ADMUX. There is a noticeable settling time on most microcontrollers when switching the adc mux

>> No.2743119

>>2743118
>>2742983
>the ADMUX Register are single buffered through a temporary register to which the CPU has random access

Ooh, that's also a potential problem. You think you're reading ADMUX, but actually you're reading the buffered value

>> No.2743146

>>2743118
>>2743119
>definitely stop using autotrigger
Yeah that's a change I decided to make after reading a stackexchange post.
>There is a noticeable settling time
>you're reading the buffered value
Ah, those could both be making a difference here. Will settling time get better if I slow down the ADC's input clock? I can always implement a counter now that the "if (ADMUX == " section is out of the ISR, in order to make several measurements. I guess for the ADMUX buffering, I should also store the new value in a normal uint8_t at the same time as I write it to the ADMUX register, then query that variable instead.

Ok I've got a roadmap for fixing this, will give it a crack tomorrow. Thanks! Guess there's always more in the datasheet to read, though a ctrl+f doesn't bring up anything about settling time that I can see.

>> No.2743470 [DELETED] 

Well shit, now I've got:

if (adcFLAG) {
adcFLAG = 0;

if ((ADMUX == 0b00100001) && (ADMUXvar == 0b00100001)) {
currentVal = ADCH;
ADMUX = 0b00100010;
ADMUXvar = 0b00100010;
OCR0B = 0xF0;
} else if ((ADMUX == 0b00100010) && (ADMUXvar == 0b00100010)){
potVal = ADCH;
ADMUX = 0b00100001;
ADMUXvar = 0b00100001;
OCR0B = 0xE0;
}
}

And those "if ((ADMUX =" statements aren't even getting triggered at all. I don't get it.

>> No.2743546
File: 1.58 MB, 3002x2493, time to spin PCBs and lose an eye.jpg [View same] [iqdb] [saucenao] [google]
2743546

>>2743146
Ok it finally fucking works. Got stuck for an extra hour because I forgot to tell the ADC to start a new conversion after changing the ADMUX register. Pic related is the project, motor driver for a spin-coater. Now I just have to design and print the enclosure for the PCB, maybe tweak the current limit and acceleration a little.

Maybe I was just making things difficult for myself, but I can see a really large gap between this and just typing in analogRead. If I were using MPLABX I guess I could use a wizard that would set up the registers correctly for the kind of timer and ADC I need, but that's bloatware.

I am not looking forward to programming FOC for a BLDC in a few months, though I did buy TMC4671s and TMC6200 chips to make it easier on myself.

>> No.2743581

>>2743546
you should try your best to find cpu-less solutions to your problems. or even partial solutions. a lot of things are easier and tend to perform better when you do as much as you can in hardware

>> No.2743622

>>2743581
In this case I wanted to drive a brushed motor as part of a spin-coater. My requirements were:
>slow ramp-up and ramp-down
>maximum speed is set by a potentiometer
>speed only increases when hold a button
>won't draw more current than the PSU can provide
That current limit especially needs a bit of multiple-sample averaging. I likely could have done the current limitation with some higher-order analogue filtration, but that plus a summing amplifier, the ramp generator, and the PWM generator, and I'd probably be looking at more than 1 quad op-amp package, dozens of passives, and it would be harder to ensure that any given failure wouldn't result in the motor being turned on constantly. I did go through the effort to fit it on the smallest MCU I had, code only took up 500B of progmem and 20B of RAM, so I'd say I had my prudishness.

The MCU board (you can see the brown underside of it there) was a quick home etch with an ATtiny13, a 5V regulator, two resistors, and a capacitor. The etch resist was lasered off by my 3D printer, which is much more reliable than transparencies. The green board is one of 5 JLC boards I ordered last year with a half-bridge driver and two power MOSFETs, and a differential amplifier for amplifying current.

>> No.2743626

>>2743622
> spin up, then spin down
Just have a potentiometer control a two transistor oscillator, with the rightmost setting be ‘stopped’ and the leftmost be ‘full blast’
It will naturally be soft start/stop due to
1. Momentum of the part
2. The use of the potentiometer.

This is a half-measure removed from the old rasberry pi, python controlled LED flasher project.

It also sounds like your motor is way too powerful.
Don’t forget the snubber diodes.

>> No.2743632

>>2743626
>Momentum of the part
That thing will accelerate so fast it draws like 20+A if I let it.
>The use of the potentiometer
I wanted it to spin down slowly if I take my finger off the button. Say, if I have to run around a corner because it's throwing shit everywhere. I did consider a spring-loaded potentiometer, but the mechanical design work was a hassle. The current limit is also intrinsically a torque limit, say if a hand gets stuck somewhere it shouldn't be. Programming safety limits is also something I want to get some practice at.

>sounds like your motor is way too powerful
It's the fastest motor sold at my local electronics shop (that I work at, staff prices are good). I want experience with high-current stuff anyhow, since my next motor project (the one with the TMC4671) is going to be in excess of 100A, by necessity.
>snubber diodes
I have an RC snubber network on the switched node for noise suppression (no clue if it actually does anything), and instead of conventional freewheel diodes I have synchronous diodes! Because I put the motor in parallel with the lower MOSFET of a half-bridge. These FETs stay stone cold, even with no heat-sinking besides the PCB. This circuit should be good for driving 30-50A.

>> No.2743654

>>2743146
>ctrl+f doesn't bring up anything about settling time that I can see
Yea, I pulled that one out of my experience. Different chips have different internal qualities of circuitry for their ADCs, sample-and-hold, and internal VRefs. It's not all published, mostly because it's not directly comparable. And you can boil it all down to accuracy anyways. If the engineers think their circuitry can support 12 bits without lying, they call it a 12bit adc.

The datasheets usually hold some clues if you read them in full. I read one that said "for best accuracy, we recommend not using any digital bus features while the ADC is converting". And some chips have a feature to start the ADC conversion when you put the whole chip into special a sleep mode. Both of those are to mitigate noise coming from inside the chip

>> No.2743667

>>2743654
ADCs built into MCUs (or other multi-purpose chips like those TMC4671s) are ultimately a compromise. But damn can they be cheaper than even the shittiest of ADCs. While the resolutions aren't brilliant and the noise can definitely be an issue, the sample rates are actually kinda decent. These ADCs are good enough for 99% of stuff that isn't audio, radio, or instrumentation.

That TMC4671 actually uses an integrated delta-sigma ADC, which are actually pretty versatile since you can actively trade off whether you have high sample rate or high effective resolution. I wonder if we'll ever see them in MCUs instead of successive approximation ADCs? They probably have much worse quiescent current though.

>> No.2743696 [DELETED] 
File: 173 KB, 1560x614, 2024-01-16_05-37.png [View same] [iqdb] [saucenao] [google]
2743696

can someone tell me what i am doing wrong?
left window is my code, middle and right two windows are reference library code.
all I'm trying to do is take an input number from USB, and have an arduino print that number back to the serial.
in my example the input is always 1 regardless of what I input.
sorry for stupid question, new to serial. Shouldn't the reference code at least work?
you don't have to spoonfeed me just call me dumb and give me a hint

>> No.2743700

>>2743696
God I hate Arduino. read() probably returns the raw byte (ASCII code) of the input data. But if your if condition is not true, the return value of getInt is missing and undefined behavior occurs. Most of your output is probably from the undefined behavior. You really should make the missing return value a compilation error.

>> No.2743703 [DELETED] 
File: 58 KB, 761x595, 2024-01-16_06-11.png [View same] [iqdb] [saucenao] [google]
2743703

>>2743700
good point about the return on read().
now it's just looping through without waiting for input. whatever, going to bed

>> No.2743706

>>2743703
You do realize that when there's no serial available, there is no return value at all?
Fucking Arduino, turning off all the basic compiler warnings, it's not just the users of arduino that get complained about.

>> No.2743708 [DELETED] 

>>2743706
Got it, so it all has to be looped on the condition that it's available.
What would you advise I ditch arduino for? I just found one in a bin at work

>> No.2743720

>>2743700
>>2743706
>arduino is le bad
Where do you think you are?
>inb4 muh ESPs
Also programmed from the arduino software

>> No.2743753

So I'm trying to disassemble firmware binary for stm32f103 using ghidra and while I do seem to get usable code, I can't make sense of the interrupt handler table. The first half of the binary is actual code, and the rest is padded with 0x42 all the way to the end, and almost every handle, most importantly reset, points to somewhere within that padded area. I don't see how this could work unless it's some sort of protection where the bootloader within the device replaces it with valid addresses during the firmware update. Or maybe it's something else? The updater program the firmware was embedded in seems to just copy it as is. The device is logitech joystick.

>> No.2743794

>>2743753
Maybe they're setting the handlers at init time. Why 0x42 though?

>> No.2743882

>>2743794
The boot process begins by jumping to reset interrupt handler so if that's bogus the program cannot start. As I see it, the only time it can be changed is before writing it to the flash. One idea I have now though is that there's actually a bootloader in the flash already at that address and it just skips writing over itself during the update, so the chip boots correctly starting from the bootloader which then hands it over to the rest of firmware.

>Why 0x42 though?
Hell if I know. It seems to be a valid instruction (RSBS r2, r0, #0 which negates r2 and stores the result in r0) so maybe there's some black magic happening where it keeps freewheeling until some exception happens and it somehow ends up at the right address? All the relevant interrupt handles point to the same area though. This is way over my head if that's the case.

>> No.2743898

>>2743882
I don't know about the stm, but chips with very simple booting normally just map the flash into memory and start execution from flash offset 0.

>> No.2743918

>>2743794
Probably the old hitch hikers guide to the galaxy answer in hex.
We tire of these, nowadays.
IBM used 0xDEADBEEF, for example.

>> No.2743922

>>2743918
>0xDEADBEEF
Problematic.
Anyway, I'd expect 0x00.

>> No.2743924

>>2743922
Some people fill data and high bytes with ‘NOP’ while others an illegal instruction so it can get into the monitor if you can trap it (e.g. 6309 can trap such things)
Both are dependent on what you want to happen if you accidentally start executing data. And different safety philosophies.

>> No.2743925

>>2743924
0x42... maps to valid instructions in this case though.
The deadbeef "complaint" was a reference to https://github.com/rust-lang/rust/pull/92469#issuecomment-1020191769

>> No.2743937

>>2743898
For stm32 first 4 bytes is stack pointer and next 4 is pointer to reset interrupt routine. Execution starts with reset interrupt.

>> No.2743941

>>2743937
Isn't that just standard with the M architecture?

>> No.2743964

>>2743720
There's a fuckton of different ways to program any given MCU. AVRs can be programmed through the official IDEs of MPLABX and Atmel Studio, for example. Most MCUs can be programmed through PlatformIO, basically all of them can be programmed using a free command-line tool, without waiting for someone to write a "core". Using the Arduino IDE is truly a brainlet trap, because it has incomplete syntax highlighting, no autocorrect, traps you in this abstraction of setup() and loop(), has debugging support only for a couple of families, and is full of poorly written bloaty abstractions. While you don't have to use these abstractions, not doing so means you end up in the weird situation where ADMUX lights up blue, but SREG somehow doesn't.

>>2743925
What was the original thing that "Wait why is this "problematic"?" was referring to?

>> No.2743976
File: 74 KB, 1280x720, maxresdefault.jpg [View same] [iqdb] [saucenao] [google]
2743976

>>2733332
What kind of micro controller do I need to build a macro 3×3 macro pad with a rotary knob.

I own;
>a 3d printer
>brown switches
>tons of keykaps
>wires
>solder
>solder iron
>Flux
>random hardware such as little screws and bolts
>a 10 dollar coupon to microcenter

>> No.2743978

>>2743976
pro micro and QMK firmware

>> No.2743981

>>2743964
>the official IDEs of MPLABX and Atmel Studio
Niche software with little to no community support.
>PlatformIO
Not even an IDE, it's a fucking VSCode extension.
>a free command-line tool
I'd take notepad++ any day over writing code in a console like a terminal stage gentoofag and I'm sure I'm not alone on this.
>no autocorrect
This is a plus, one less thing to disable when setting things up.
>traps you in this abstraction of setup() and loop()
Dude, what else do you want to do?
The other options are:
1. write a function
2. define global variables, includes etc
There really isn't much else to do. Sure, you can be a special snowflake and write your code without the setup part but that's just macho posing. There's little to no upside to it.
>has debugging support only for a couple of families
>another useless feature is incomplete or missing
Oh, no! Anyway
>is full of poorly written bloaty abstractions
This is vague to the point of having no subtance at all.
Care to elaborate?

>> No.2743983

am i an idiot if i buy ATMEL-ICE is there a cheaper alternative to it?

>> No.2743992

>>2743981
>I'd take notepad++ any day over writing code in a console like a terminal stage gentoofag and I'm sure I'm not alone on this.
I'm primarily on Linux, and I don't think much of vim or emacs either. I use some GUI code editor (not VS Code).

>> No.2743999

>>2743941
I believe it is, I'm just not familiar with anything else

>> No.2744036

>>2743981
>Niche software with little to no community support
Why would you need community support when you have the support of the manufacturer of the actual microcontrollers? For 30kB libraries to drive neopixels?
>Not even an IDE, it's a fucking VSCode extension
I wasn't arguing that these are IDEs in the first place. For people that already use VS for non-embedded work, it's an obvious and convenient way to go. VS is bloatware though.
>I'd take notepad++ any day over writing code in a console
No you do write code in a text editor. The command line tools are just the compiler (AVRgcc) and programmer (avrdude), though you can skip the latter half by calling avrdude in your makefile.
>This is a plus
All I want is it to tell me that I misspelt a variable name. Is that so much to ask?
>Dude, what else do you want to do?
Have access to the actual main(). It's mostly a nitpick, but it feels like a needless abstraction from what the compiler actually sees that serves no purpose. Just another barrier to escaping the Arduino IDE.
>debugging is useless
Actual brainlet take. The quicker we normalise easy and effective debugging, the better for everyone.
>Care to elaborate
digitalWrite(), analogWrite(), Serial.read(), delay(), etc. First of all, it's combining the reading/writing of a main register with the setup registers behind the scene, god forbid you actually want to change key parameters for how the timer or ADC or serial hardware actually functions. I've had mixed results trying to change these parameters (e.g. ADC sample rate, PWM frequency) on the fly, without the call to analogRead or analogWrite resetting something. Secondly, these abstractions are really fucking slow. I was trying to write some timing-critical code and damn it was taking like 60 clock cycles for a digitalRead, during which nothing else could happen. A direct port read or write takes like 2 clock cycles, while an ADC read using interrupts takes maybe 6.

>> No.2744044

>>2743976
The microcontroller should support native USB. There are few options for that these days, here's some common boards:
>Arduino Pro Micro
>Raspberry Pi Pico
>Teensy
>Bluepill/Blackpill
>some ESP32 boards (usually the ones with two USB ports on them)
Though for all of these I'd run wires to a solidly panel-mounted USB port of some variety. B, mini-B, or C would be my recommendations. In that order. Putting force on a shitty PCB-mounted micro-B port is a bad idea. Though it's an option to have the original connector tucked up out of the way, with its own strain relief channel too, like on the bottom of a landline telephone.

It's also an option to use an MCU that doesn't support native USB and just bit-bang it using V-USB with the right passives, but I don't recommend this. If you're up for more of a challenge at the expense of saving money, you could go for MCUs like the CH32V203 or CH556 or whatever.

>>2743983
I think the ICE has a pretty comprehensive list of chips it can program. But you may be able to get away with something cheaper, like a PicKit. Take a look at their lists of part families. Sure would be in a better place if you could do everything with a dongle as cheap as an STlink V2.

>> No.2744045

>>2743983
>>2744044
Oh and if you don't plan on using the official programming methods (Atmel Studio or MPLAB) you may be able to get away with a hacky programmer, like a USBasp or serialUPDI dongle, they're well supported by AVRdude. DebugWire support never.

>> No.2744200

>>2743753
Ok so this turned out to be a fairly simple and common case of IAP (in-application programming) that I'm only hearing about now for some reason. Basically the first addresses are taken by a bootloader and the firmware complete with its own interrupt table goes after that at an offset. The bootloader can either overwrite the firmware area on a trigger, or reinitialize the interrupt table with the values in the firmware and hand over the control. So once you account for this offset (0x1C00 in my case) everything falls in place.

>> No.2744358

>>2744045
>Oh and if you don't plan on using the official programming methods (Atmel Studio or MPLAB) you may be able to get away with a hacky programmer, like a USBasp or serialUPDI dongle, they're well supported by AVRdude. DebugWire support never.
Thank you, ill start with USBasp and get an ICE or picKit later if i find it annoying to use then

>> No.2744371

Is STMicroelectronics dominating the whole MCU market, or are other brands just more into stuff that isn't available to the common man?
>t. babies first move away from rp2040

>> No.2744404
File: 57 KB, 1280x1404, I²C_bus_logo.svg.png [View same] [iqdb] [saucenao] [google]
2744404

is it possible to use an I2C bus to read data from multiple sensors at varying rates? eg. read from one sensor once every 2 seconds, read from another sensor once every half second, and then read from a last sensor at 50 times a second.
would doing this let you get data from the high frequency sensors more often, since the bus would spend less time handling data from the low frequency ones?

>> No.2744409

>>2744404
What makes you think you couldn't?

>> No.2744413

>>2744409
i'm pretty inexperienced with microcontrollers, so i dont know exactly what I2C is capable of. i just want to make sure that this idea isnt impossible/pointless before i put it into a design

>> No.2744417

>>2744413
You can put multiple devices on a single I2C bus as long as they all have different I2C addresses and support the bus speed. The master (your CPU) can talk only to one device at a time. That's it. Your main fear should be that one of the slaves messes up and locks up the bus or that the addresses conflict, so maybe using a separate bus for each device is probably more stress free. You can use bit banging instead of a hardware I2C port.

>> No.2744492

>>2744371
STMs are definitely filling a pretty wide section of the market. They're easy enough to get into (you don't need to shell out $250 for an Atmel Dragon), aren't nearly as expensive as some other industrial/automotive microcontrollers, and have models with a wide range of capabilities. Settling on STM32s (maybe also STM8s) as the foundation for all your projects might be a tad more expensive than other options, but they're used in industry so will look good on a CV. There's also a pretty good 3rd party codebase and toolchains and all that stuff, STM seem to have a unique position as present in both the professional and hobby spheres.

Personally I'm going into the CH32V chips instead (damn are they cheap), but the toolchains and codebase aren't nearly as mature. Some people go for PICs, which I think are still used in industry, and these have a very wide variety of 8, 16, and 32-bit MCUs with various features. They are a bit old-school though, and aren't too cost effective, and a lot of the people programming them do so in ASM not C. You could also go for the really old-school method of 6502 or 68k or 8051 or z80 -based microcontrollers, though for modern versions they're also not cheap either.

>> No.2744502

>>2744492
>but they're used in industry so will look good on a CV
No employer gives a shit about your hobbies my man. You're not going to end up as a microcontroller programmer just because you can make an LED chaser on an STM or whatever other board is the current thing.

>> No.2744521

>>2744502
If you've got an EE degree, having experience with STM32s compared to having experience with guangdong semiconductor's special 12-bit micro may make a difference in your future employment. It's hardly everything, but it isn't nothing either.

>> No.2744537

>>2744521
>If you've got an EE degree
Most people that do electronics and microcontroller stuff don't have degrees or jobs in these fields. Only g*rmans have hobbies which significantly overlap with their work.
>having experience with STM32s compared to having experience with guangdong semiconductor's special 12-bit micro
The baseline here is arduinos, not some super obscure micros only available from one seller on alibaba.
>It's hardly everything, but it isn't nothing either
For the most part it's less than nothing as listing hobbies on your CV is frowned upon.

>> No.2744548

>>2744537
I guess it depends on whether you're being interviewed by an HR person or by an engineer. If it's HR they'll frown at hobbies and ask what experience you have leading a team (this is your first job). If it's an engineer, they'll mock you for using the arduino IDE and pressure you on Manjaro vs Mint. I have always been interviewed by HR people, though I also don't have an EE degree and I work retail.

>> No.2744549

>>2744548
>If it's an engineer, they'll mock you for using the arduino IDE and pressure you on Manjaro vs Mint.
Sure, buddy.

>> No.2744607

>brand new EE grad
>hired at a small company to do SDR and DSP stuff on FPGAs
>tell them all my DSP and SDR experience is with microcontrollers and mcu programming and that I'm pretty damn good at it but that I have next to no practical experience with FPGAs
>they say that's ok
>boss talks about FPGAs as if he's worked with them before, assume he'll be the one training me
>barely know my ass from a hole in the ground when it actually comes to FPGA "programming" and RTL

>turns out the company has absolutely 0 in-house knowledge or experience on FPGA design and implementation, let alone for DSP or SDRs
>no resources to train me
>fuck they don't even have a vivado license
>boss didn't even know what a soft-core processor was or that it was possible
>boss tried to convince me we don't need a vivado license - we could just have some MATLab plugin generate the HDL or something instead
>had to explain why this wouldn't work
>expect me to bootstrap an entire in-house FPGA DSP platform/testbed/institutional knowledge base for very high frequency SDRs and to have a functioning demonstration good enough to show the military in a year
>all on my own, with no experience, effectively self-taught and self-directed since there's no one else to teach me
>they're only paying me 66k a year
god help me

>> No.2744612

>>2744607
forgot to mention, all this and I don't even think they know about verification either

btw if anyone has resources on a crash course for actually being productive with FPGAs I'd love to hear it. I'm fine with DSP and SDRs and I'm familiar with digital combinational and sequential logic and how FPGAs work under the hood, I'm good on that
I need to know how to make functional products with them and the nitty-gritty details of actually doing so

anything to help me not crash and burn (even though I'm being set up for failure)

>> No.2744615

>>2744607
>very high frequency SDR
Can't you find an ASIC that's already set up for the right frequency and protocol?
>military
Never mind. Looks like you're in the typical situation where someone did a feasibility analysis, figuring out how many LUTs and MHz you theoretically need to do X, and left the rest up to the firmware boys. The non-existent firmware boys.

I thought there was one or two open-source toolchains for FPGAs, but that's probably brand specific.

>> No.2744616

>>2744404
I'm retarded, but my way of doing it would be to create an array of unsigned longs to keep track of the time that's passed since the last sensor read. If enough time passes, read the sensor data and overwrite the old time with the current time.

>> No.2744618

>>2744615
I wish I could give more information but the problem is this is such a small company with such an extreme niche that it would instantly dox me. There literally is no other company doing what they're doing, which is what got me interested in them in the first place

>figuring out how many LUTs and MHz you theoretically need to do X, and left the rest up to the firmware boys. The non-existent firmware boys.
I don't think a single person at the company would know what an LUT is with respect to an FPGA. If I had to guess, the board meeting went like, "we have an idea for a COOL NEXT GEN PRODUCT but it requires an "FPGA Solution" and "DSP" on "FPGA". Find some cheap person who can do "DSP" on "FPGA"", while having no idea what they're asking, and I happened to be the poor schmuck who said the magic words

>> No.2744692

>>2744616
Learn about interrupts and how to trigger them.

>> No.2744739

>>2744692
Not him, but how would you use interrupts for it? It's easy if you can just have a seperate timer for each sample rate, simply trigger the sensor read on the overflow interrupt. If one sample rate happens to be twice another you could trigger the faster one on a compare register and on the overflow, but you could still run out of timers quite easily. Especially if you need timers for other purposes, like PWM.

Having one timer and performing loop-wise boolean comparisons to it is one method, ideally you'd be able to do some simple binary checks by having the overflow value be the lowest common multiple of all the timer durations, otherwise it gets slow from having integer division a bunch of times each loop.

Otherwise you could do as the anon suggested, have a bunch of non-timer values that increment at the same rate and reset at different periods (or increment at different rates I guess), though getting the timing precise might not be trivial. Though if you have a master timer that ticks significantly slower than the loop duration you could time the increments off that, probably using interrupts but it wouldn't particularly matter. Not using interrupts for the timing would make it easier to use the interrupts for I2C, if needed.

>> No.2744779

>>2744492
Thanks for the write up, but i'm far from that. Merely did a little sensor array and am now looking to put it all on a single PCB. It just seemed every reasonable MCU from here on seems to be an STMx, so i wanted to make sure "it's not just me".

>> No.2744934

>>2744779
>every reasonable MCU from here
Is the RP2040 not reasonable?

>> No.2744953

>cheap
>good
>not a botnet
pick any 2

>> No.2745039

>>2744739
It all depends on way too many variables.
Yeah, the simplest way is to use a single timer and read the values at *roughly* the right intervals based on counters/carry/overflow/bit testing “50 times a second” is a bullshit requirement pulled out of an ass. Using integer divide in an interrupt handler is a fireable offence.

Another way might be to snoop the I2C if the sensors can just send data at those intervals.
Some sensors are slow if they have to converge on the value, might as well just send me the value when it’s ready, I’ll store it when the interrupt fires.
If the sensors are slow, you definitely want to do something like that (request value…. wait until settle and latch value… value available for reading)

You can construct external circuitry to detect the sensor values are ready in some cases, and pull the interrupt line. Or configure the sensor to do that.

In the olden days, we’d sometimes just have a big polling loop with uninterrupted delays that grabs all the sensor values at the right frequency depending on the design requirements (i.e. in that case, it can’t do anything else)

Just some ideas.

>> No.2745048

>>2744612
> Productive with fpga and/microcontroller
Sim/emulator first.
Then dev board.

>> No.2745049

>>2744953
due to the fake chip shortage, you can only pick one

>> No.2745072
File: 2.41 MB, 3743x2995, 20240118_184641.jpg [View same] [iqdb] [saucenao] [google]
2745072

>>2743976
>>2743978
>>2744044
I'm back from microcenter. Decided to buy a variety incase I want to do some other stuff in the future. Wasn't too expensive I think. Now I just need to find a 3d printable case I like. Maybe buy a male micro USB to female USB c/b for strain relief as one of you mentioned

>> No.2745135

>>2745039
>Using integer divide in an interrupt handler is a fireable offence
The denominator is fixed, so you could do some integers with hardware multiplication and bit-shifts in only 5-10 clock cycles or so. I wouldn't do so without being able to shift more than one bit in a single instruction.

>and pull the interrupt line
Isn't there some way for a slave to pull an I2C line low once a conversion is complete, triggering an interrupt? Polling each sensor on a loop is fine if you don't need precise timing.

>>2745049
Isn't that shortage over now?

>>2745072
>USB micro-B
At least Pi Picos are compact and have mounting holes.
>find a 3d printable case
Design one yourself?

>> No.2745140

>>2744934
I find its soldering footprint to be quite annoying.

>> No.2745142

>>2745140
Make a reflow plate

>> No.2745234

>>2733332
Should I stay in software or move to controls? There are tons of these jobs near me and I might be able to beg for one from a family friend. Seems more stable and pay is somewhat similar after a few years...

>> No.2745399

>>2745135
> shortage over
Depends. It was fake, so one could argue it never started. Maybe over when the pi zero is $5 like they promised instead of $15.
The pico is living up to it’s pricing though, but it was announced into the “shortage” — it probably should have been around $2, sans shortage.
At $0.70 for the chip, though, that’s good value, even though it’s ARM.

>> No.2745412

>>2745399
While there was never a supply shortage, there was a supply shock. The fake shortage was caused by people thinking there'd be a shortage; by speculation on the supply and demand of chips in the near future.
>$5 pico
They're $4.95 on LCSC, in stock.
The real question is where are the $5 Pi Zeros? I'd probably buy one for $10, but all I can see now are the $20 Zero 2 W boards. I guess wifi is more important on something that lacks an ethernet port.

>> No.2745420

>>2745412
> supply shock
As far as I remember the panic started when Intel fabs fell behind in getting the size down so they started ordering from other fabs that could. That was a real demand crunch that happened on ulra-small nm lines.
But it never affected a lot of microcontrollers since those were around 10 times bigger, like 40nm, and those fab lines (and companies that don’t have a 5nm process [excluding intel] like renesas, TI, etc.) were very unloaded during that time.

So i think i’d agree that the average get-rich-quick schemers didn’t know the difference and ended up causing the shock, and are now stuck with GPUs, toilet paper, and other things they ran up the price on and refuse to sell them at a loss.

> where are the single “keyboard box” computers?
I think the rp2040 should be fast enough to do a clock-accurate emulation of a c64, acorn, tandy coco 3… where are they?
I see two c64, one uses a fpga, the other an ancient 6502 reproduction, which seems insane at this point.
Raspberian is bloatware, someone could design a new acorn-like thing with an os-9 like OS that can take full advantage of all the rp2040’s guts.

>> No.2745434

>>2745420
>it never affected a lot of microcontrollers
From what I remember, the automotive users of microcontrollers had really uncertain usage, causing fab slots to get under-booked then over-booked.
>an os-9 like OS
I know there are some stripped-down linux distros for some microcontrollers, but I think they still have orders of magnitude more memory than the RP2040. So a custom job might be necessary if you can't squeeze linux down enough. With no dedicated graphics hardware and no implied monitor size, it's hard to say how much headroom you'd need. B+W signalling for composite, or low-bit colour for VGA would be doable using some R2R DACs off the GPIOs.
>Raspberian
It's not even Rasbian any more, it's Armbian, designed to run on all arm CPUs. When you install it you can configure it quite a bit, like which window manager to use. Comes with VScode stock though.

>> No.2745520

I think the importance/draw of FPGAs finally struck me
While CPUs can be programmed to do pretty much anything, you pay the price in the overhead required to manipulate manipulate data and commands into and out of the CPU and bus and the fact that every tiny operation requires a fetch/decode/execute/writeback. Likewise, your software implementation is limited by the underlying architecture of the CPU it is running on. If the CPU has no facilities to accelerate some operation, it has to painstakingly do it in software. It also has no way to parallel or pipeline (in the broad sense) the operations it's executing, other than standard instruction cycle pipelining

But, an FPGA lets you implement arbitrary digital logic in hardware. You can create, for some classes of things, a direct hardware implementation of some algorithm or process. You can create it in such a way that it's optimally pipelined and paralleled for the task at hand. In other words, they enable you to write a hardware-level accelerator for whatever it is you want to do that can work in tandem a soft (or hard) processor and, have the best of most worlds

does that sound about right

>> No.2745532

>>2745520
Sure. There are two things I love in FPGAs over CPUs:

First, you can make things absolutely realtime. When you write Verilog code you can control exactly how many cycle something takes. A cycle will always correspond to the input clock frequency. The clock frequency has a known maximum error.

Second you get parallelism. You can't do things in parallel on the CPU unless you get multiple cores. Threads on a single CPU (executing thread 1 for some time, then switching to thread 2 for some time etc.) is not real parallelism. Synchronizing threads is a huge PITA. On a FPGA everything is parallel by default. And as long as you stay in the same clock domain, it's all synchronous anyway. No synchronization is needed. It just requires thinking differently.

I agree that using a softcore is really nice to get higher level things done. Writing your own peripherals in Verilog and then using it from the CPU is an awesome feeling.

>> No.2745606

>>2745520
> cpu overhead
What we do in those situations is dynamically translate the, say, Z80 native binary code to ARM code, and run that at full speed. It’s been commonplace since the 80s at least. We’re talking about small microcontroller programs here, typically < 64 KB. Even in emulation, we never do anything remotely like a fetch/decode/dispatch/execute/… thats one level above a gate sim, and nothing is usually anywhere near that critical. We even tune the emu to catch OS idle loops and sleep the core. It’s all very fluffy.

>>2745532
> control how many cycles
Things fall apart due to propagation delay.

> parallelism
Between two NAND gates? yeah.
Guess what: CPUs can have even more parallelism at that level between single clocks.
> thread synchronization.
We’re not doing a lot of that on 6502 programs or microcontrollers, even on the cell be. rp2040 has two actual cores anyway, only retards synchronize in the innermost triply nested for() loop.

> inb4 but whatabout parallax?
There’s a whole class of thought out there that spins up a thread just to wait on every conceivable input we might receive and the sooner that blight it’s stomped out the better the world will be.

>> No.2745610
File: 1.48 MB, 1280x1111, 1686091869977596.png [View same] [iqdb] [saucenao] [google]
2745610

>>2744607
liberate tutemet ex inferis

>> No.2745611

>>2744612
get outta there retard defense contracting isn't worth it unless you're a business degree leech

>> No.2745612

>>2745532
>You can't do things in parallel on the CPU unless you get multiple cores
Holy shit anon is posting from 1988
This is really important you need to assassinate Jack Welch and some dude named Sergei Brin

>> No.2745670

>>2745606
>Things fall apart due to propagation delay.
No, just no.

>>2745612
There are tons of micro architecture tricks to get more parallelism, like with pipelining, outr of order execution, SIMD. But it's nothing compared to the parallel freedom on a FPGA. Even if you got a 32 core machine.

>> No.2745935

>>2745670
> ASICs are nothing compared to FPGA
Sure, ASICs absolutely can’t ever do any of that, nor do anything in “parallel”
> rp2040 has a single-cycle 32×32 multiply
Impossible without an FPGA, even GPUs, core i9s and AMD threadrippers aren’t faster than any arbitrary FPGA.

>> No.2745942

>>2745935
All unrelated.

>> No.2745954

Could you please recommend me a cheap budget microcontroller board to just learn about and tinker with (preferably from aliexpress). I read a little from the pinned links. Is 'Ai-Thinker Ai-WB2 series' a viable option? (I was also thinking about ESP32 modules, what's your opinion?) Please help

>> No.2746008
File: 12 KB, 313x161, luatos.jpg [View same] [iqdb] [saucenao] [google]
2746008

>>2745954
Luatos ESP32C3-CORE is one of the cheapest dev boards with wifi. There's no numbering on the front, but I don't think they should have made it bigger to fit. Esp-idf is more popular, more bloated and better documented than Ai-thinker's SDK. Compare https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-py.html to the 5 make targets in Ai thinkers SDK.

>> No.2746069

>>2745954
ESP32s are good if you want to do wifi and bluetooth stuff, the ESP32-S3 even has native USB for that sort of project, but I'd consider them only moderately priced.

There's always AVRs, an arduino nano is a dollar or two and has a lot of code and libraries and stuff for them, though they're only 8-bit parts with somewhat limited memories in case you're planning a more complex project.

You could go for the CH32V003 or CH32V203, they're particularly cheap but not that widely used yet. Toolchains exist. The 003 is similar to an 8-bit MCU in specs, while the 203 is more like what you'd expect from a 32-bit chip.

Beware fake STM32s if you go that way.

>> No.2746074

>>2745135
>Design one yourself?
I have a skill issue

>> No.2746087

>>2746074
it's called sketchup make 2017
or openscad if you're autistic

>> No.2746265

>>2745954
Basically what this guy >>2746069 said, but there's also the RP2040 (Raspberry Pi Pico), fairly powerful for $4. The ESP32 beats it for price to performance, but some people (myself included) prefer the feature set.

>> No.2746289

>>2746069
Why is there such a difference in price between original Arduino Nano and boards that can be found on Aliexpress.
>>2746265
RP2040 also seems like a reasonable choice. Thank you all for your answers.

>> No.2746294

>>2746087
It's called a pirated version of solidworks, actually.

>> No.2746453
File: 95 KB, 1024x1024, download (2)4.jpg [View same] [iqdb] [saucenao] [google]
2746453

>>2733332
How the fuck do I make a Servo move smoothly with an Arduino. The fucking Servo.h library can only move a servo when the increment is over 10 degrees, even if it's a .1 degree accuracy servo for $200.

>> No.2746481

>>2746265
> the rp2040 chip itself is like $1 and can practically be used standalone.
> yeah but soldering 56 pins
30 of them are for gpio alone, you don’t need that many. It has an internal oscillator.

>> No.2746485

>>2733332
Maybe this is better for /ohm but I'm so fucking lost
My gps module gets a fix no problem when connected to my laptop with a serial adapter.
But refuses to get a fix when connected to my teensy 4.1.
This 8ant my first GPS project, I've tried all the normal things, but in so beyond fucking lost. Gets data from the module, just never gets a fix.

>> No.2746499

>>2746453
a hobby servo normally is controlled by pwm signal
so 1) learn what pwm means
2) figure out mark/space/period you require
3) see if you can generate as required from on board peripherals (normally mcu have pwm generators)
4) if that fails you might need to 'bbit bang' a signal out using timers by either polling or interrupts to toggle the output as required. in that case you need to work out what other stuff you need to do and when you can do it or how you can break it up to fit in with the timer firing.

>> No.2746512
File: 223 KB, 1024x1024, download.jpg [View same] [iqdb] [saucenao] [google]
2746512

>>2746499
I know what PWM is, I was just hoping I don't have to go to #4. Seems like a lot of manual coding. Fugg. Wish someone could just tell me if the arduino is even capable of it.

>> No.2746524

>>2746289
Because it's cheaper to make things in China instead of in Italy.

>>2746294
That takes effort to learn. Anyone can use sketchup in like 5 minutes. It can be a little tedious but it's more than enough for simple 3D printed enclosures.

>>2746453
Just use the timer peripheral and write to its registers however you want. Read the MCU's datasheet. I'd use a 16-bit timer for extra precision.

For example, this is what I did on an ATtiny13:
> DDRB = 0b00000010; //set PB1 to be an output
> TCCR0A = 0b00100011; //output compare for B channel, fast PWM
> TCCR0B = 0b00000001; //maximum PWM speed
And then I just:
> OCR0B = 0x__
In the main loop or in an interrupt to set the duty-cycle.

>>2746481
Still need the external memory for it. If size isn't an issue I'd just be flush-soldering pi pico boards on all my projects. Be nicer if there was a smaller dev-board that still broke out all the pins, like the ESP32 boards with their 1mm pitch castellated vias.

>>2746485
Could be it isn't getting enough power, or otherwise it's getting power dips or noise, which you can scope to compare. I'd also shove a logic analyser onto the data pins just to check that the handshake is identical in either case.

>> No.2746534

>>2746524
i keep forgetting that arduino is italian

>> No.2746537
File: 22 KB, 206x137, =).png [View same] [iqdb] [saucenao] [google]
2746537

>>2746512
just use servo.writeMicroseconds();

>> No.2746539
File: 264 KB, 1024x1024, download (2)7.jpg [View same] [iqdb] [saucenao] [google]
2746539

>>2746537
It's shit. It has a resolution of 5 degrees. Servo.h can eat a dick. That's why I am here in the first place.

>> No.2746542
File: 429 KB, 514x583, lolwut.png [View same] [iqdb] [saucenao] [google]
2746542

>>2746539
>It has a resolution of 5 degrees
wut. how are you getting so low resolution?
regular servo.write should be 1 degree
.writemicroseconds allows 1us adjustment = 0.2 degrees resolution

>> No.2746543

do i need a specific microcontroller for ethernet communication (not connected to the internet just sending data from pc to mcu with tcp) like one with a MAC address and PHY or can i just use an atmega? i only need to send at most 5 bytes of data both ways every couple of minutes so would usb serial be a simpler way of doing this?

>> No.2746546
File: 132 KB, 1024x1024, 1698463118201623.jpg [View same] [iqdb] [saucenao] [google]
2746546

>>2746542

I completely understand both PWM and how .writeMicroseconds works. I have also adjusted for the ROM / expected low/high signal for the servo.

It seems to be an absolutely typical problem:

https://forum.arduino.cc/t/servo-motor-step-less-than-1-degree/684040
https://forum.arduino.cc/t/small-angles-below-10-degree-control/357154/4
https://www.reddit.com/r/arduino/comments/goh55v/controlling_a_servo_with_less_than_one_degree/?rdt=35919
https://forum.arduino.cc/t/why-is-servo-library-necessary-and-we-cant-use-pwm-directory/588644/5

>> No.2746549

>>2746546
interesting. i'd guess the source of this is within the servo itself, maybe some filtering? does it happen with all your servos? i have never had this issue with even cheap and shitty chinese MG995 servos.

>> No.2746554
File: 178 KB, 1024x1024, 1697587569312348.jpg [View same] [iqdb] [saucenao] [google]
2746554

>>2746549
I have 4 Arduinos lying around. I have a bunch of basic bitch SG90 servos, some $30 GoBilda servos, some annimos servos, and some $100-300 HiTec servos. All of them do this. My friend is testing the same with his stuff and has the same problems.

Here is how you replicate:
> print out a protractor
> put servo in the middle
> do servo.write(1), servo.write(2), servo.write(3), servo.write(4), etc

What you will find is that the servo won't move unless your write has an angle delta of ~5+ degrees. I guarantee you that you will have the same issue. You won't see it if you try to go in large increments. And that's for a servo where you properly set the min/max. myservo.attach(9, 500, 2500); And yea, I have tried writing microseconds (with the proper increments calculated), same shit.

And yea, I actually did writeMicroseconds in reality, but it doesn't matter since it just converts .write to it under the hood in Servo.h anyway.

In the middle of this post, they are saying that Arduino might be too slow and can't do proper PWM, I wish someone could confidently tell me whether or not it's doable on Arduino.

https://forum.arduino.cc/t/coding-difference-between-digital-and-analog-servo/577646/4

>> No.2746555

quit this ai generated image thot posting before i report for avatarfagging

>> No.2746558

>>2746554
what about setting up a timer interrupt and sending a pulse that way?

>> No.2746560

>>2746554
have you measured the signal output from arduino? i'll be near an oscilloscope in a few hours, i'll check if for low deltas the signal duty cycle isn't changing.

>> No.2746572

>>2746555
Well, since you got trips and are worried about it, sure.

>>2746558
I haven't, trying to avoid it if I can, will do if needed though.

>>2746560
I haven't, I would REALLY appreciate that. The HiTec D954SW I have hooked up now is supposed to be sensitive to literally 1 µs

https://hitecrcd.com/products/servos/digital/d-series/d954sw/product

>> No.2746604

What kind of diodes do I need to hand wire a macropad. I'm looking at quite a few selections on Amazon as well as breadboard kits with little diode selection but a lot of other junk I may or may not use. I've seen videos use "4148"

>> No.2746629
File: 17 KB, 512x400, sot-23-3.jpg [View same] [iqdb] [saucenao] [google]
2746629

>>2746604
For a key matrix? Yeah, nothing special, the 1N4148 is simple and small.
Surface-mount diodes could be useful to save space if you're making your own board, they come two to an SOT-23 package, but you need to make sure you get the right layout, there are three ways to put two diodes into three pins.

>> No.2746660

>>2736803
Im a DSP Engineer and musician, tube amps are pretty difficult to reproduce *accurately* ie good enough to sell to consumers. Theres a lot of little nonlinearities that define the characteristic of their sound. Linear methds + clipping just dont cut it. With that being said, you could run either some discretized diff eq or neural networks on some of the beefier STM32s.

>> No.2746676

>>2746629
6 ways if they can be oriented A-to-K like the common BAV99.

>>2746660
>Linear methds + clipping just dont cut it
I don't really understand what couldn't be represented by:
>dft or even just z-transform filters
>an input-to-output voltage lookup table for soft clipping
>maybe one or two other simple relationships that alter the coefficients of the above two methods
But I'll take your word for it.

>some of the beefier STM32s
Guess you're talking about the F4/F7/etc. that have an FPU? I can't think of any reason you can't do neural nets using fixed-point 2's compliment, but there's probably a reason they all use floats. On a modern machine I guess it's all single-instruction anyhow.

>> No.2746679

>>2746481
>>2746524
I've tried adding a cap to it
Ive tried running the battery into its 5v stepdown CIRCUT (3.6-6v)
I've tried a separate 3.3v stepdown
I'm about to throw this thing at the fucking wall and scream

My other 3 projects have zero issues, but as soon as it's connected to this fucking teensy it no worky

>> No.2746685

>>2746679
Is it a single lithium ion cell? If so, take a look at the maximum dropout of a 3.3V stepdown regulator, often they won't accept a voltage below 4V or more. Unless you have the based HT7333.

What voltage do different parts of the circuit run at? And what are the part names of your voltage converters?

>> No.2746744

>>2746679
>as soon as it's connected to this fucking teensy

could be electro-magnetic interference.
the teensy could be operating at a frequency whose harmonics clash with the GPS receiver.
you could try physical separation, or optical isolation.

>> No.2746793 [DELETED] 

Are there arduino compilers that can be written in straight C and aren't garbage like the stock arduino compiler? would it be better to switch to another platform?

>> No.2746795

>>2746793
>can be written in straight C

it's an arduino, nigger.
it has the memory and computing power of a calculator.
how you gonna use regular C without overloading it's capabilities?

>another platform?

Raspi.

>> No.2746842
File: 10 KB, 640x520, SCR06.png [View same] [iqdb] [saucenao] [google]
2746842

>>2746572
finally got to the oscilloscope. measured writemicroseconds output on a chinese uno clone. incrementing the input integer by 1 increased duty cycle length by exactly 1us. so the problem must be with the servos. i hope this helps you.

>> No.2746999

>>2746795
ATmegas are written in straight C all the time. Arduino isn't a programming language, it's just C with extra bloat. It's not like there's any inherent overhead from C if your compiler knows what it's doing.

>> No.2747007

>>2746999
Arduino libs use C++. I didn't analyze it, but I'm sure it uses extra code size just for being stupid.

>> No.2747180

>>2747007
You can just not use the arduino libs, do direct port writing instead of digitalWrite and so on. If you don't make calls to any bloatduino libs, they won't be included. The compiler will cull anything unneeded.

You can also just write code in a text editor and call avr-gcc in your makefile (AVRdude too).

>> No.2747232

>>2746842
I really, really appreciate this anon. Sorry that I am just replying now, was slavin during the day.

>> No.2747391

>>2746685
It's not
I've tried powering from the teensy, from the battery, from a 3v-5v booster
To a 5v to 3v shunt

It's not a power issue this is the 4th iterationn of this device. (MatekGPS has 5v and 3v input options)

The new SPI display I've added is causing some kind of noise to jam the GPS. Decoubled with a cap on power only I finally got it to fucking sync.

As soon as I add the serial back it loses it's lock and refuses fucking see ANY god damn satellite.

I've added pull up/down resistors to all the SPI lines, tried 22/60/100ohm, nothing.

An entire year on this project down the drain because the display is jamming my GPS, I'm about to literally commit sudoku over this

>> No.2747633

you know how spi peripherals usually have a cs input? but the mcu usually only has one cs output? if i want to talk to different spi peripherals on the same bus, should i connect the extra cs outputs to different gpios and pull the cs pins low in software?

>> No.2747697

>>2747391
> GPS not working.
If you live in Poland or surroundung area, it was probably just the russians jamming the GPS again from st. Petersburg.
> wat do?
Get a glonass module.

>> No.2747835
File: 37 KB, 720x703, 515457FC-87D3-4471-B17C-33E03B1FE4D2.jpg [View same] [iqdb] [saucenao] [google]
2747835

>>2735236

>> No.2747837

>>2746074
tinkercad is stupid easy to use

>> No.2748630

hello /mcg/, i'm ignorant, so i'm here to learn
i need to juice up a RPI 3B (5V/2.5A) and i only got an old phone charger (5V/2A) lying around
i just need to run some really lightweight programs on it, no graphical interface, no peripherals even, i just connect to it over telnet/ssh and that's it
am i damaging it in any significant way? it works but i would prefer if this thing were to last

>> No.2748639

>>2748630
Won't damage it but if there is even a brief moment where the voltage sags due to insufficient current supply, the RPI will reset.
t. happened to me with a shitty power supply

So if it's worked for you so far without issue, it'll be fine

>> No.2748833

just got four dip40 atmega32s for free from work
not complaining, they fit right in with the dip40 eproms and rams and pics and shit i have, also for no good reason

need to make me an eprom programmer

>> No.2749161
File: 165 KB, 916x1280, f7hpvvrbcqy61.jpg [View same] [iqdb] [saucenao] [google]
2749161

>>2733332
How / where would I get my hands on 3D-XPoint memory? As far as I know, Intel sold it to Texas Instruments, but I cannot find anything from Texas Instruments offering chips for sale.
Also, how do I find stuff like this in general, are there "business" backroom-chats / websites that we peasants don't have access to?

>>2738716
I know of people who have built entire escape rooms just with Arduinos. I know of them because I maintain(ed) them. Kill me.

>> No.2749259

>>2749161
TI likely took over the fab, not a warehouse full of useless 3D-XPM—that shit was ditched by Micron first, then Intel… kind of reminds me of the Itainium debacle. Oh, Intel… why are you still in business… Jack of no trades and Master of None.
> I read a back issue of popular electronics and I want to buy a few hundred kiloquads of Bubble Memory so I can build my own ‘Lal’ … so where to I send the cheque?

>> No.2749275

>>2749259
What’s a lal?

>> No.2749290

>>2749161
you can still buy optane ssds from newegg, and the small cache drives are old enough that you can get them from chinese recyclers on ebay, but i don't think the optane chips were ever sold. only way to buy them is as nvme storage devices or as those weird dimms that only work in like one generation of intel server.

micron did tease at a potential second generation of the stuff so who knows, something might come of it eventually. it was really cool tech and optane is still beating flash in certain workloads.

>> No.2749366
File: 323 KB, 1101x791, 97tehv2esvd71.png [View same] [iqdb] [saucenao] [google]
2749366

>>2749259
>>2749290
I don't really want to buy 3D-XPM, I'm just doing mind games about "if I were to build my own computer" (kinda like what Apple or Dell did in the 70's and 80's) and one component would be an on board persistent cache (not sure if socketed or soldered on yet, just doing the systems right now) and the newest generation of 3D-XPM (P5810X for example) shits all over every other kind of storage in just about every metric but price.
So I wondered, how / where would I get my hands on that, now that Intel / Micron have thrown the towel.

>> No.2749367

>>2749275
https://memory-alpha.fandom.com/wiki/Lal

>> No.2749491

>>2749366
> 3D-XPM shits on anything?
It shits on nothing… It’s not dense, efficient or fast and doesn’t last very long, contrary to perpetrated lies and hyper-religious techno zealots…which is why it went away.
And, like everything else, most dum-dums not knowing it was fronted by a huge RAM cache on the initial batches (which they then remove later once favourable tests are in, and put a “Rev B” on the part somewhere)
The real heir to the throne you’re seeking is FRAM, coincidentally made by TI in some of their microcontrollers.

>> No.2749595

>try one of those i2c cables from sparkfun
>connector sandwiches the SDA/SCL pins together and fries the board
never buying one of those again

>> No.2749637

>>2749595
Firstly, I can’t see how they’d short those two wires together without very poor construction (post pics).
Secondly, shorting SCL to SDA wouldn’t fry anything, I2C comm lines are open-collector with pull-up resistors.

>> No.2749742

>>2749595
seems like a skill issue. also
>sparkfun i2c cable
the fuck you buying meme name meme purpose. you could literally use anything to connect two data lines.

>> No.2750131

>>2749742
JST connectors are not a bad choice, but I agree that their markup and branding is too much.

>> No.2750288

>>2749742
they arent frying a board by shorting two pins, its bait anon, hell probably even an ad

>> No.2750391

What are some good sub-ghz RF mcus that arent TI?

>> No.2750900

>>2750391
Nordic are the only non-chink manufacturer of faintly affordable RF MCUs I've heard of. Don't know if they do LoRa MCUs though, what bands are you wanting to work on? It may be easier to just get a normal MCU and an RF ASIC if you can't find a part that fits your uses.

>> No.2750957

>>2750391
Try SiLabs

>> No.2751072

They are connecting some devices over rs485.
What's the best protocol to use?
modbus seems like register read/write but we might want to send custom messages and maybe perform DFU over the wire.
This is of course possible with modbus but if there's some better existing protocol with some libraries for example esp32 / stm32 I would prefer that.

>> No.2751078
File: 77 KB, 912x420, ds18b20-vdd-sweep.jpg [View same] [iqdb] [saucenao] [google]
2751078

Can I sort a string of DS18B20 by dropping VDD? The first one to stop responding must be at the end. How many can I sort that way, and could it be increased by having more resistance on the VDD wire?

>> No.2751197

>>2751078
You could put RC filters on each sensor's VDD pin, with progressively larger capacitors so they take longer to power-on.

>> No.2751205

>>2751072
> DFU update
Modbus is standard, you’re going to throw that away because… in your head… your company is going to be around long enough to get around to squeezing out a firmware update?

I’m tired of listening to techniques, methods and procedures with the goal of (or assuming that) no testing is done. Instead of bricking 100 slaves installed underground in the arctic on a regular basis, just test enough before they get installed—there is usually enough problems caused by installation. Just because it uses flash instead of masked ROM nowadays doesn’t mean you have to take full advantage of it’s limited write lifetime.

Besides, you’re going to want to chunk a firmware update anyway instead of sending a big blob and keeling over. Once confirmed it’s over there and verified, you switch over to it. The watchdog switches it back to the old one if it detects it’s not working, or a command from the master does it.

>> No.2751289

>>2751197
That's a good idea. It seems like they just have to miss the presence pulse (60-240 microseconds), and the other commands are shorter and will not be confused for one.

>> No.2751346

>>2751072
the best protocol to use is the one that best suits your application

>> No.2751394

>>2751346
how profound, now list all the protocols that exists faggot

>> No.2751909
File: 1.05 MB, 1080x1252, 521.png [View same] [iqdb] [saucenao] [google]
2751909

Is there a specific microcontroller I can buy that will let me build my own custom USB keyboard? Preferably something I can assign custom keys to, like having curly braces on separate keys instead of the standard US 104 key layout.

>> No.2751918
File: 125 KB, 721x702, 1704906401764.jpg [View same] [iqdb] [saucenao] [google]
2751918

>>2751909
arduino pro micro

>> No.2751919
File: 266 KB, 869x797, 1704906209891.jpg [View same] [iqdb] [saucenao] [google]
2751919

>>2751918

>> No.2751936

>>2751909
Windows can already do that—remap keys.
So can Mac. And Linux. And OS/2. And DOS. And CP/M. etc, etc, ad nauseam.
However, you should probably figure out how to effectively use one of the 10 billion standard qwerty keyboards out there, on the off chance you might have to use one, say for your “job” or something.

>> No.2751945

>>2751909
What you want is a microcontroller with "native USB" capability.
Some ATmegas do this: 8U2, 16U2, 32U2, 16U4, and 32U4. The 32U4 is the most often used for these projects, and you'll find it on the Arduino Leonardo, Lillypad, and Pro Micro dev-boards, also on older models of Teensy.
Other popular chips include:
>RP2040, as featured on the Raspberry Pi Pico among other 3rd party boards
>STM32F4xx, as featured on the Bluepill and Blackpill knockoff dev-boards
>ESP32-S3, ESP32-C6, probably others, as featured on a fair few chinky dev-boards (mainly just the ones with two USB ports)

It's also possible to bit-bang USB via GPIO lines, see V-USB for details but I don't recommend it.

>> No.2751968

>>2751918
>>2751945
This is probably what I'm after, any USB capable microcontroller that lets me convert arbitrary IO into computer recognizable USB signals would be fine.

>>2751936
I don'twork in the tech industry. This is my hobby, I do it for fun. I would love to have a keyboard with an expanded keyset (not just remapping the existing keys), but they're not readily available.

>> No.2752021

>>2751936
Probably best to make sure you can put your own firmware on it, so you don't have to bother doing per-USB-device key remappings.

>> No.2752046

>>2751909
i think you're in for a surprise when you realize the absolute hell that working with USB is, at least the documentation is good... if you end up with an AVR microcontroller then i would reccomend the LUFA library for USB though.

>> No.2752076
File: 1.10 MB, 1294x1009, 471904D9-67ED-41FA-A641-DC270D5D38A0.jpg [View same] [iqdb] [saucenao] [google]
2752076

>>2752046
I would argue that the keycaps, switches and case are a much harder problem.
You need an mcu that supports host and hid on its USB implementation.

>> No.2752077

>>2733332
Bruh

>> No.2752080

>>2752076
>host and hid on its USB implementation.
??what? lol. why??
a usb keyoard is not a host!?

i wrote a usb stack for pic18 going in cold in maybe three weeks. the hid stuff is just an implementation detail. hell passing a descriptor even to get windows to use winusb and avoid driver signing for custom comms is just firmware. the only 'difficult' thing about usb is wanting to kill yourself writing out a bunch of chapter 9 mandatory responses making your usb code ten times the size you need for your own purposes and secondly i have to admit every time i go back to it the protocol gets me as when exactly to re-arm endpoints in the three stage transaction thing. i have to re-read all docs before debugging.

>>2751909
if you genuinely want help to make a usb kb read usb 2.0 spec chapter 9, buy a pic18f45k50 (no ext regulator) and make a thread about it

>> No.2752094
File: 230 KB, 883x517, 4885329C-3605-4AB4-9371-925A22B4985C.jpg [View same] [iqdb] [saucenao] [google]
2752094

>>2752076
>>2752080
> usb host!?
I mean if you want to use existing keyboards and attachments or components, you might want to plug those in and reprogram their outputs through usb. For example, just plug in picrel, in addition to an of-the-shelf keyboard and the microcontroller combines the two into one logical usb device while doing the necessary key remappings.
Then you just label your keys, and press numpad-1 to change into your elf costume in your mmo.
>>2751919
That keyboard is unusable.

>> No.2752096

>>2752094
got it. interesting concept

>> No.2752120

>>2751968
See /g/'s mechanical keyboard general for more details.

>> No.2752311

>>2733332
I'm using a A4988 stepper motor driver with a arduino nano and it works but not exactly as I'd like it. I have it running a loop stat makes it turn 200 steps for one full rotation when I press a button. What I need is to use the microstepping option to go from 200 full steps to 3200 1/16 steps. Seems simple enough to connect the MS1 MS2 and MS3 pins to the power rail of the breadboard but then I need to adjust the screw on the board to change the resistance? I have a voltage meter but I can't get a read on the thing when I press the positive needle to the screw and the negative to the ground rail. Any suggestions? I've looked online and every tutorial mentions you CAN use micro steps but none of them demonstrate actually doing that

>> No.2752314

>>2752311
Screw might be isolated from the wiper
Ask /3dpg/, they use those drivers in their machines

>> No.2752457

>>2738005
What do you need/want to do?
>rf, low energy
Nordic semi nRF series have good SDK and docs
>wireless internet of shit
Stop, get help. Or espressif esp32 whatever
>idk just make stuff
Arduino has limitations but is great for quick one-off utility things where it doesn’t matter. STM32 with cube IDE is normie (read: sane) choice for all around embedded development
Good starter MCU used to be STM32F103 (bluepill one). A lot of cheap HW, turorials books and whatnot, and still OK to learn on. Nowadays it does not make much sense to design new boards with it (or other STM32F series) - you probably want G or H for new stuff

>> No.2752925
File: 171 KB, 846x667, 1706913003740.jpg [View same] [iqdb] [saucenao] [google]
2752925

>>2752311

>> No.2752926
File: 56 KB, 929x547, 1706913979069.jpg [View same] [iqdb] [saucenao] [google]
2752926

this guy clipped the multimeter lead to the screwdriver so can turn the potentiometer while reading the voltage as its turned.

>> No.2753285

>>2733332
I bought a bunch of six-pin IDC plugs and sockets, now I will never again plug a programming header into an AVR project the wrong way. I also can keep the IDC headers captive in a 3D printed case so they’re panel-mounted. That’s over half the GPIO pins on a tiny13/x5, so I can also use the programming header to plug in peripherals or sensors or buttons or whatever.

>> No.2754163

>>2735138
I know that post was ages ago but I just want to say: God, same.
>>2735240
It's impossible to find any peripheral that isn't 100x overpriced because it's "arduino-compatible". Need something that's in a different package or with different voltage specs? Too bad, here "arduino-compatible". Fuck you!

>> No.2754427

Why does each PIC model come with different pinout options?
They are SOIC, PDIP, TQFP, and QFN.

A previous schematic was written in PDIP mode, and implemented in C code.
Now the schematics they have listed are in TQFP mode ...

what are the implications of this? Do I need some new packages? I coded the previous PDIP configuration using MPLAB before the onset of Harmony

>> No.2754431

>>2754427
The pin names should still correspond to the internal wiring, no?

>> No.2754436

>>2754431
So the trick seems to be, that PDIP and TFQP refer purely to hardware configurations in which you choose to get your PIC18 chip.

>> No.2754884
File: 31 KB, 310x230, 1680201279154622.jpg [View same] [iqdb] [saucenao] [google]
2754884

>buy new hotness RISC-V esp32-c6
>not supported in ESP home so now I will actually have to learn arduino in depth
FML I hate reading

>> No.2754910

>>2741662
put latches on the fridge too. they sell some that are just stick on latches on any ecommerce site. Then you can also make sure the door is fastened shut.

Don't just trust push notifications, make additional physical changes to the equipment.

>> No.2754911

>>2754884
Uhh… isn’t each relay controlled by a gpio pin? I’m pretty sure someone has figured out how to change the state of a gpio pin after a decade of research.
> risc-v
Do it in C, works on both
> whaddabout registers
#defines

>> No.2754914

>>2754911
Turning on the relays is easy, I learned how to do that with arduino in high school . I'm not looking forward to getting ZigBee or WiFi mqtt working

>> No.2754917

>>2754914
Isn’t zigbee dead? I thought it used high freq over the power lines. I looked at my power recently on an oscilloscope and it’s already so fucking noisy i can’t get PLC devices to work on the same goddamn outlet. I blame LED bulbs and other chinese junk with insufficient filtering and switching power supplies. My alarm clock can’t even keep time, it’s fast about an hour every few days since it uses the mains as the time synch.

I’d take the time to run some cat5 or 6 wherever possible. Plus it’s not jammable by some meth head with a flipper.

>> No.2754928

>>2754917
>over the powerline
Your thinking of Powerline Ethernet . ZigBee is a 2.4ghz radio protocol , its like WiFi but super low bandwith and power .

>> No.2754929

>>2754884
>>2754914
Does Espressif not have an IDE with setup wizards that supports the C6? If they don’t they should at least have an appnote and/or example code on the wifi/zigbee topic. If that fails, read through the datasheet section thoroughly.

>>2754917
Zigbee runs on 868/900/2400MHz wirelessly. It’s sorta obsoleted by Thread now, and by that I mean it’s another protocol that Thread can be used with. Wish it used infrared too, would make automating appliances a lot easier.

>> No.2755009

>>2754884
>ESPhome
You can't be fucking serious
I thought this was /mcg/ but apparently this is /clownshow/

>> No.2755010

>>2741656
Most zoomerific post I've read in a while.
Die, zoomer scum die.

>> No.2755027

>>2755009
>sheeting about esphome
There's honestly nothing wrong with cargo culting in 2024

>> No.2755031

>>2754884
>arduino
>depth
the absolute state. i guess this is what you can expect from faggots and toddlers

>> No.2755033

>>2755027
Please die.

>> No.2755040

>>2755031
>Just werks
>Porting your program to different hardware takes literal seconds
EclipseIDF please go

>> No.2755042

>>2755040
You know what just werks and takes seconds to port shit to different devices? Libocd + gcc + gdb.

>> No.2755179

>>2755009
>ESPhome
QRD?

>> No.2755181

>>2755179
Some faggot mad you can easily program microcontrollers without learning much

>> No.2755186

>>2755179
Imagine MIT's scratch but worse and for (((home automation))) crap.

>> No.2755235

>>2755179
Plug and play home automation. Drop the firmware on an off the shelf microcontroller board, configure it, link shit together.
Haven't used it myself but it's fairly popular AFAIK. It's bad because having an easy solution is for losers, apparently.

>> No.2755427
File: 324 KB, 937x1099, 6E842FEA-CCE2-4913-A800-1E35FD42732E.jpg [View same] [iqdb] [saucenao] [google]
2755427

So I have this little aliexpress desktop display that you can connect to with Wi-Fi and have it display images or the time or the weather. Y’all think it would be possible to upload my own code, or should I just keep the display and housing and replace the brains? This is the front of the brains and I guess I’m assuming it’s a combo WiFi/microcontroller but looking up the fccid just mentions wifi

>> No.2755429
File: 214 KB, 861x1139, 9B3CAB67-A900-4F47-82AF-221DBB11487F.jpg [View same] [iqdb] [saucenao] [google]
2755429

>>2755427
Here’s the other side, the ribbon connector is for the mini display. There’s not a whole lot too it desu

>> No.2755431

>>2755427
Nvm I’m retarded I found so much documentation when I scrolled down just a bit on google :))

>> No.2755563

>>2755427
That's a bog standard esp-12f
You can probably re-flash it with whatever code you want, but it's also possible they locked it down. New ones are like $1.50 each, shipped when you order 10 of em.

>> No.2756055
File: 748 KB, 3312x1360, file.png [View same] [iqdb] [saucenao] [google]
2756055

feel like I'm in over my head with this one ngl but I'm gonna give it my best

>> No.2756110

>>2756055
did you try emailing for a schematic?

>> No.2756132
File: 2.42 MB, 3052x1259, file.png [View same] [iqdb] [saucenao] [google]
2756132

>>2756110
no it's a chinese company and it looked pretty simple so i didnt even bother lol
i redid my schematic and it looks better i think tho :)) gonna start writing my code tommorow

>> No.2756576

>>2754929
>Wish it used infrared too
Just use a ZigBee to Ir bridge. If you get one that can receive and send codes its super convenient

>> No.2756792

>>2746069
what about those stm32 boards that look like arduino nano
how do i know if my application even needs 32 bit arm

>> No.2756841

>>2756792
You should consider what you're trying to do in the first place. Those chips are very cheap so it makes more sense to first think up a few projects to try, right down the specs you think you might need, and shop around this way. Things like 8 bit or 73 bits don't mean shit, same with avr or arm or risc-v or anything. What matters is if it can do what you're trying to do.

>> No.2756941

>>2754914
Mqtt is the answer -
> Host a broker like Mosquitto. This can easily be done though a home assistant plug in or in a docker container.
> Find a libary that can control the MQTT interactions.
> Use a while loop to subscribe to your desired topic and publish to the topic when you do something.
>ezpz

>> No.2756952

>>2751909
I would pick one of the keyboard firmware projects like QMK, ZMK, or BlueMicro, then find out which microcontrollers are supported/popular for that project.

>> No.2756995

>>2737043
PINNs are a bit of a meme that sound good but aren't. I work with a phd in acoustics that is leading in his field who spent a few months implementing one for ultrasounds and the results were... basically the same as a normal AE for example. I guess that might just be a skill issue, but this was not just academia bs (he's a corporate researcher) and again, it still means that it's not a silver bullet and doesn't give you gains most of the time
>>2737205

>> No.2757023
File: 456 KB, 1600x1270, Box_1.jpg [View same] [iqdb] [saucenao] [google]
2757023

Challenge:
>$20 budget
>Aliexpress account
>Objective: MAXIMUM tinker project fun for the money

What parts would (You) get?
Of course buying whole items for parts would be fine too since that's often even cheaper than buying parts individually.

>> No.2757073

>>2756941
> mqtt, bus, pub/sub, topics, <buzzwords>, etc.
Run. Far and fast, long and hard. I can’t believe this nonsense still circulates. Bring it up in your daily four-hour scrum.
It would have helped if the people who promulgated this stuff knew anything about actual buses they stole the name from.

>> No.2757078

>>2757023
Is that what you have now?
You might want to buy a microcontroller.
Looks like you want a DIP judging by your socket collection so maybe PIC or MSP430, etc.

>> No.2757079

>>2757078
Just an example pic from the net.
Wonder if you guys have a fun idea or maybe even know some item that is cheap and has tons of interesting parts in it. For example some of those Gameboy looking 9 to 3 dollar NES consoles look interesting. Their displays are quite good and if you can get them for sub 5 dollar it's a fucking steal. I wonder how hackable those are.

>> No.2757211

>>2757073
What? MQTT is as far as you can get from modern buzzword fairy tech as you can get. It was literally developed in the '70s to control nuclear power stations and the like. Ultra simple and reliable

>> No.2757235

>MQTT requires TCP
What a bloated meme. Anything talking to embedded devices should use UDP at most, better UART.

>> No.2757266

>>2755235
how do you know if something is reliable enough for the 24/7 operation of a home automation system
i had a sonoff which is based on esp chips too crap out after few months of continuously being on

>> No.2757268

>>2757211
> nuclear power stations
Designed by the same calibre of engineers that put the fukushima daiichi backup power generators—in an eathquake/tidal-wave/flood prone area—in the basement causing a $trillion disaster?
> Yep. They’re pros man. It’s cool!
‘Pros’ are only concerned with making something as cheaply as the law allows, just enough to keep them out of prison. Or, cheaper, if they think they won’t get caught within their active career time window.
That’s why I don’t always emulate what ‘pros’ do when I do any diy projects.

>> No.2757271

>>2757266
ESP is well-known to be electronic equivalent of Fentanyl.
You probably want to get into ‘Automotive grade’ microcontrollers. Even Tesla still uses 68HC11 for christ’s sakes.

>> No.2757290

>>2757235
whats wrong with TCP? i was thinking about using it for a project for reliability since i only need to send 4 bytes of data every few mins to a microcontroller

>> No.2757295

>>2757290
It's relatively complex and needs more resources. UDP is trivial, you can whip up a UDP stack in half a day. Writing a correct TCP stack is much more complicated and you'll probably pull in a huge library like LWIP to handle TCP.

>> No.2757297

>>2757290
Don’t forget to to use IPSec for security and use IPv6 addressing expandability. I usually wrap my 7-bit byte in a UTF-32 encoded XML with extra checksums that carries a JSON payload over SOAP, the WSDL is re-transferred with every byte in case I change the protocol. I ack each byte using a custom REST protocol.

>> No.2757300

>>2757295
PS: reliability isn't really an argument either. You need complicated code to detect whether the TCP connection died and reconnect it. The statelessness of UDP should be a big plus for anything that needs reliability. "Reliability" is more a thing for higher level applications with complex byte-based protocols, like HTTP.

>> No.2757302

>>2757271
>electronic equivalent of Fentanyl
what does that mean

>> No.2757349

>>2757268
what are your main issues with MQTT then you nutjob?

>> No.2757369
File: 43 KB, 600x780, muuugshot2b-thumb-400x519.jpg [View same] [iqdb] [saucenao] [google]
2757369

>>2757300
TCP is the only option for DIY smart home devices.

>complicated code to detect whether the TCP connection died and reconnect it
?????

You're an idiot and have no idea what you're talking about. Reliability is the core requirement of a smart home device. The speed and complexity benefits of UDP are negligible compared to the fact that you cannot be sure if the receiving device has actually received that message. I want my door to actually lock when I tell it to, and I want confirmation of that.

>> No.2757379

>>2757369
>You're an idiot and have no idea what you're talking about.
I've used raw BSD sockets and LWIP plenty of times.
>Reliability is the core requirement of a smart home device.
TCP doesn't add actual reliability.
>compared to the fact that you cannot be sure if the receiving device has actually received that message.
Successfully writing data to a TCP socket is no guarantee it actually arrived at the other end, you absolute drooling monkey.

>> No.2757389

>>2757379
>TCP doesn't add actual reliability.
That is literally the M.O. of TCP you mouth breather
>Successfully writing data to a TCP socket is no guarantee it actually arrived
That is why acknowledgments are given you idiot. Using for UDP for smart home devices would be like using RAM to store your passwords, It's just nonsensical.

>> No.2757399
File: 2.26 MB, 1280x720, 1688234520731389.webm [View same] [iqdb] [saucenao] [google]
2757399

>>2757389
>That is literally the M.O. of TCP
TCP adds retransmission, order, and timeouts. Nothing else.
>That is why acknowledgments are given you idiot.
Which you don't even see on the BSD API level idiot. You can query the buffer with obscure API, but in practice nobody uses that. In practice you get a timeout on failure and then you don't know how much has been transferred. The worst is that the timeout will block communication for a while, even if it could proceed, for example if the network went down and back up and your IP or routing changed.
With UDP you'd just regularly send packets with your current state and if the server doesn't receive them anymore, then it's the same case as in TCP timeout.
Anyway, I don't care that much about this argument. Often TCP is the better choice, but at other times UDP is much better. It depends on the exact use case. We had a product where we used only UDP, because we considered TCP too unreliable and it didn't fit into our RAM anyway.
>Using for UDP for smart home devices would be like using RAM to store your passwords, It's just nonsensical.
Nonsensical is your comparison.

>> No.2757404

>>2757399
>long rambling word salad.
Right this is pointless. I'll use TCP and MQTT like every airport, railway and nuclear plant and you build your UDP devices so your light can turn on 3ms faster if and when it does?? Not that you have actually ever built anything as you find TCP complicated.

>> No.2757407

>>2757404
If a modern web browser connects to a modern server, they don't even use TCP anymore (because it's so shit) but UDP.
checkmate.
>nuclear plants
>using TCP
Maybe for the coffee machine, moron.

>> No.2757412

>>2757407
I work in the industry and that is literally what MQTT was designed for.

>> No.2757416

>>2757412
Now I fear for my safety.

>> No.2757418

Also:
>rejecting arguments as word salad
How is this for low intelligence?

>> No.2757426

>>2757295
>you can whip up a UDP stack in half a day. Writing a correct TCP stack is much more complicated
Why are you writing your own stack lmao? Are you a hipster that uses hardware/software that doesn't have any abstraction to it so you have to do everything manually? Have you tried having sex?

>> No.2757428

>>2757426
t. Kumar

>> No.2757456

>>2757266
You don't. That's why you should never use it for anything critical. While I'm sure it works most of the time, I've heard many stories of ESP32s dropping connection semi-regularly.
IDK if the Pi Pico W is any more reliable but I'd be inclined to try that if ESP32s are giving issues.

>> No.2757459

>>2757302
Cheap, potent, addictive, getting put in everything, and of unknown quality and safety.
That said, I'd be more inclined to give that title to the CH32V003. Impressive little fucker.

>> No.2757461

>>2757407
why are you comparing apples to oranges you clearly have no idea what youre talking about. Are you one of those autists that cant admit they were wrong

>> No.2757508

>>2757459
Don’t forget “getting funnelled to western countries below cost as a plot by the Chinese Communist Party”.

>> No.2757698

avrs are not industrial grade?

>> No.2757713

>>2757211
It literally didn't exist before 1999... Beside, things in shit like nuclear are the opposite of reliable. Don't mistake simplistic for simple.

>> No.2757716

>>2757369
You are bar none the most retarded poster I've seen when it comes to any tech topic at all. What in the fuck are you even smoking.

>> No.2757717

>>2757698
Like this anon pointed out: >>2757268
"industrial grade" means "minimizes cost under constraint". As a hobbyist you typically want to maximize quality under cost instead, different paradigm.
Though not sure where you'd choose an avr chip over something else, especially arm, due to better compatibility. Not that it matters much if you're not doing anything requiring a complicated arrangement of existing pieces though.

>> No.2757719

>>2757717
>"industrial grade" means "minimizes cost under constraint". As a hobbyist you typically want to maximize quality under cost instead, different paradigm.
same thing since for you the cost is fixed

>> No.2757854
File: 16 KB, 624x350, c5a4c923-a51f-4a36-a807-6313e8e8b0de.jpg [View same] [iqdb] [saucenao] [google]
2757854

>>2757379
>>2757716
Unhinged samefag. You need to admit to yourself when you are wrong, everyone else can see it

>> No.2757857

>>2757854
>tries to point out samefag
>fails
>looks like a schizo
This is why you should avoid doing it.

>> No.2757860

>>2757717
Stop shitting up this thread with your nonsensical drivel. You're trying to say hobbyist products are better than industrial? You're a retarded mouth breather fuck off back to /b/

>> No.2757862

>>2757857
Carry on saying TCP is complicated, web page technology has the same requirements as IoT, nuclear power station device communications standards arent good enough for hobbyist devices and all the other incoherent bollocks you come out with. Room temp IQ

>> No.2757864

>>2757862
I don't care about debating idiots.

>> No.2757870

>>2757864
At least you can see your points are wrong and cannot be defended. In future don't give advice if you don't know what you're talking about.

>> No.2757983

>>2757860
Unironically take your meds, dumb schizo

>> No.2758003
File: 5 KB, 211x239, 92d.jpg [View same] [iqdb] [saucenao] [google]
2758003

>>2757983
>"industrial grade" means "minimizes cost under constraint". As a hobbyist you typically want to maximize quality under cost instead

Actual industrial grade definition - "Industrial grade products can tolerate more extreme conditions than consumer products"

Stop shitting up the thread you same fagging, low IQ, smooth-brained mouth breather

>> No.2758036
File: 1.32 MB, 1775x877, EBB5B12F-06A0-499A-93BD-111EC3873A69.jpg [View same] [iqdb] [saucenao] [google]
2758036

More importantly, is your microcontrollers milspec?

>> No.2758039

>>2758036
Man, I looked at space-grade micros once, they were like 100 times more expensive than standard ones. Even automotive grade are only like 1.5 times the price. Not sure what milspec goes for.

Also are those THT quad-flatpacks? Or are they just PLCCs with their leads straight?

>> No.2758084

Can someone with I2C/BusPirate/Python experience help me?
Im trying to dump an I2C chip (24C02) using a BusPirate and Python3, I can seemingly get it to talk to the chip but any time I try to read data im not getting the expected results.
The BusPirate docs say to read a byte you send 0x04 and it should respond with the byte but it seems like thats just messing the sequence up.
It just reads back BBIO1I2C1 over and over.
I tried doing a read without the 0x04 write but all I get is the confirmation 0x01 from the previous write command sending the device address with read bit.

Im sure im making a stupid mistake somewhere, this is my first real attempt at this.

>> No.2758279
File: 7 KB, 440x70, 1689699861577632.png [View same] [iqdb] [saucenao] [google]
2758279

>turns out ESP home supports c6 unofficially and you just have to declare a newer framework for it to work
Fuck yeah!!! Got my home theater automated with no learning required .

>> No.2758315

>>2758279
Based

>> No.2759544

Anyone mess with motion sims and Arduino based SMC3? I built an adapter that connects 5V PWM to 20V analog controls for a 3DOF motion sim. Discovered to my horror that SMC3 wants feedback levels to determine motor direction commands. I need to mod the Arduino sketch to simply pass through where the sim's 3 "motors" (in this case, hydraulics) SHOULD BE from the PC, right to the Arduino's 5V PWM lines sans feedback data. Anyone mess with anything like this?

>> No.2759631

where do I get project ideas

>> No.2759699

>>2759631
>ideas

davinci would look at nature.
a cloud could suggest an object.
the imperfections in a wall could inspire an invention.

for me, it's drugs, lucid dreaming, and enforced lack of sleep.

>> No.2759759

>>2758003
Not sure if clinically retarded or merely pretending.jpg

>> No.2759902

>>2759901
>>2759901
>>2759901
NEW THREAD
hope this one doesn't require an "i hate arduino" post to get it self-bumping