[ 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: 698 KB, 722x702, Realtek.png [View same] [iqdb] [saucenao] [google]
2632544 No.2632544 [Reply] [Original]

Previous thread:>>2605407

Here we discuss microcontrollers, SBCs and microcontroller 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 or mouser'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

>> No.2632644

Yay, this time someone else started the new thread! I was at like 4 in a row.

>> No.2632864
File: 67 KB, 694x500, Attach8401_20230615_163741.jpg [View same] [iqdb] [saucenao] [google]
2632864

Is this a viable way to handle multiple buttons with limited external interrupt pins? Is there a more graceful solution that doesn't involve an external chip and some communication protocol?

>> No.2632875

>>2632864
This is not viable.
Forget about the interrupt lines and just poll them which is effectively what you have to do to debounce them anyway.

>> No.2632878

Are there any devices which continually send an IP packet on ethernet (e.g. can be DHCP, ARP, whatever) as long as they are powered on?
Or is there a way to get a microcontroller for less than $50 that I can program to do that? It can be extremely minimal, as the only necessary functionality is to send that IP packet every second through its only Ethernet port

I need to power up a computer using Wake-on-LAN.

>> No.2632880

>>2632875
What if, and hear me out, I don't want to use polling?

>> No.2632881
File: 520 KB, 1585x697, Untitled.png [View same] [iqdb] [saucenao] [google]
2632881

>>2632878
Alright I think I answered my own question, might purchase picrel which apparently supports C programming

>> No.2632884

>>2632880
> polling = don’t want
Well, now you’re going to place debouncing circuitry in front of the buttons.
In theory you could debounce with interrupts, but you may get multiple false trigger interrupts and it’s a bit of a mess, code-wise.
You’re always going to be polling to determine which button was pressed to some degree. Some microcontrollers didn’t have interrupts so they just checked for presses in a loop. Your bread maker buttons, for example.
Oh, and you don’t need the transistors either. If you want to keep them, you can use them in your debouncing circuitry with a capacitor and resistor, a simple “sample and hold” type of circuit to amplify the effect of the capacitor.

>> No.2632885

>>2632878
I doubt it will wake up on any broadcast packet, it should be addressed to the MAC specifically.

That seems really expensive when you can get a reprogrammable router at goodwill for $5 using DD-WRT or Tomato.

>> No.2632893

>>2632885
I configured Wake-on-LAN with ethtool to use the 'phy' option, so any physical activity (i.e. any packet) will wake it up.
> using DD-WRT or Tomato
DD-WRT looks really interesting, they have an Automatic Wake-on-LAN daemon which seems perfect: https://wiki.dd-wrt.com/wiki/index.php/WOL

I don't think I'll be able to find reprogrammable routers at goodwill though lol

>> No.2632898

>>2632884
Unless I'm misunderstand what you're implying, the transistors or some equivalent are necessary to isolate the buttons from each other if the interrupt pins are to be used. I'm fine with hardware debouncing.

>> No.2632910

>>2632864
It's a good idea to put a 1K-2K resistor on the base of transistors that you're using like that for digital control. When I looked up the details on that I seem to recall that the problem was transistors will sink a lot more current than necessary through the B-E junction if you let them.
And in that particular setup (ignoring the naive use of interrupts) you could just use diodes instead. Oh yeah, and don't forget a pull-up/down resistor on the CPU input (either external or internal). The input has to swing both ways to work properly.

>> No.2632924

>>2632898
For hardware debouncing, I think you're best off using schmitt inverters/buffers, like the 74HC14. Unless whatever multiplexing IC or MCU you're using already has schmitt inputs.

>> No.2633018

>>2632864
most retarded thing ive ever seen for button multiplexing...and button input in general

>> No.2633033

What are the most common jobs that will allow me to look at and touch PCBs regularly?

>> No.2633043

>>2632864
In addition to connecting each button to its (non interrupt) pin, connect all buttons together via diodes and connect that to interrupt pin (so OR them). When interrupt happens, check all buttons individually

>> No.2633044

>>2633033
Foxconn employee

>> No.2633049

>>2633033
A pajeer boy salvaging thrash for electronics

>> No.2633063

>>2633044
>>2633049
i mean in the US and pays at least $50k/yr

>> No.2633067

>>2633033
any business that does their own electronics design

>> No.2633110

>>2633033
audiophile equipment technician

>> No.2633124

Don't know where to put this, but i have two wall mounted speakers with a 12V supply in hand, is there a board i can get with bluetooth to make these speakers smart? Obvisously it needs to have enough power to drive them.

>> No.2633125

>>2633124
More of a /ohm/ question, but I'd separate that into two different boards. One decent quality class-D amplifier board, and one bluetooth receiver board. That way you can better choose a quality bluetooth receiver, using BT5.1 or whatever, and choose a good amplifier too. Even go for a TWS setup like DIY Perks did in a recent video, for stereo without connecting wires.

>> No.2633131

>>2633125
Is aliexpress decent to get those? I was eyeing some there, but don't know if it's a good ideia to get audio stuff there.

>> No.2633370

>>2633131
If you know what you're buying, probably. In particular, pay attention to what chips they're using. Both bluetooth and class-D amplifiers usually just use a single main chip, so you can look up the specs of that one chip, and also look up its price to see if it's likely to be a fake of a $5 chip in your $3 board. Filterless class-D is ok, but personally I'd want to go for class-D that uses LC output filters. Those should be easy to spot by the inductors.

>> No.2633379

>>2632878
you can use a raspi or similar and just script it to run ether-wake
https://www.linux.org/docs/man8/ether-wake.html

>> No.2633389

>>2633370
How do they make a filterless Class D amplifier?
The only think I can think of is that they have/need/use special speakers where the inductor coil is also the voice coil… or something along those lines

>> No.2633958

>>2633389
If you PWM an inductor using a half-bridge or H-bridge, there will be barely any current ripple if you pick a high enough frequency. The voltage ripple will be massive, but inductors obey the law V= L*dI/dt. For a square wave voltage waveform you'll get a triangle wave current waveform, and if your frequency is really high, the ∆t will be really low. You get ∆I = V/L*∆t = V/(L*2f), which you want to be below the 0dB current for your given speaker driver. Because the force of the speaker driver is directly proportional to magnetic field strength, which is proportional to current.

So yeah, the inductor kinda is the voice coil. But there's no capacitor, so ultimately you're missing out on like 20dB/decade of ripple rejection, if not more.

>> No.2634577

Can I code an MCU in python to stimulate my prostate?

>> No.2634686

>>2634577
Only if you use somewhat a modern microcontroller. If putting python code onto older microcontrollers, you may have a hard time getting it to fit.

>> No.2634766

>>2634577
>code an MCU in python
>stimulate my prostate?
Which of those is more degenerate?

>> No.2634811

>>2634766
coding it in Rust would be more degenerate

>> No.2635056
File: 604 KB, 450x2197, 1377685994381.jpg [View same] [iqdb] [saucenao] [google]
2635056

What's the best way to pull a chip from a PCB? I'm trying to recycle some microcontrollers from hacker badges I've gained from over the years.

>> No.2635087

>>2635056
>pull a chip from a PCB?

watch some Louis Rossman repair videos
- add flux
- optionally add new solder
- heat with paint strip gun
- shove chip off when it comes loose
if no heat gun, and the PCB is expendable, you can use a toaster oven, or even an old frying pan

>> No.2635093

>>2635056
- desoldering tool (soldering iron with hollow tip and air pump), the hakko one is commonly used
- adding flux
- adding leaded solder to dilute lead-free solder
- double-sided boards are much easier than multi-layer
- heat gun, and even tools clipping to the part you want so it can fall through when melted
there's lots of ways, but the main one is lots of practice, especially when there's a chip you want

>> No.2635198

>>2635056
If it's SMD, then hot air is probably the way to go. That said, SMD desoldering shims might exist.

>> No.2635411
File: 228 KB, 393x387, 14pin-ribbon.png [View same] [iqdb] [saucenao] [google]
2635411

How do you identify this ribbon connector? It's 14 pin, it goes to a keypad. i want to drag-and-drop it in KiCad. i guess pin pitch and stuff but is there a name for this brow 'style' of a flush connector? Because even if you get the pin number and pitch right, each manufacturer probably throws in their own differences so it would be nice to know exactly what part number this is. It's a machine from 2004

>> No.2635484

>>2635411
ask /ohm/

>> No.2635508

>>2635087
>- heat with paint strip gun
*BZZZZZZZT RETARD ALERT*
The hot air station Louis uses uses VERY small streams of heat to soften solder. An off the shelf hot air gun use for paint stripping will wipe half the board off in minutes. Literally blow every component off it.

>> No.2635565

>>2635508
>Literally blow every component off it.

dude just wants the chips, the rest is junk.
if the dude already owned a rework station, he wouldnt be asking such noob questions.
if the dude had money for a rework station, he wouldnt be scrounging chips.
but everybody has family/friends, one of which owns a heat gun.

>> No.2635625

>>2635508
Hot air station is for repairs. Heat gun works fine for just getting chips. It's even better because it can heat a larger area since you don't give a fuck about collateral damage. Whoops there go some tiny little resistors, big fucking deal.

>> No.2635724
File: 143 KB, 1500x1500, 2496.jpg [View same] [iqdb] [saucenao] [google]
2635724

I'm new to electronic work like this and it will probably show.
I have one of these little fans from Canakit for RPis. They suggest the 5V pin to power it on, but it can use the 3.3v pin if desired. So I was wondering if I would be able to connect the fan to a breadboard and plug the red wire in via a transistor to one of the GPIO pins, I got one of those extension shields, and be able to turn the fan on and off via python programming. Sort of like a basic LED. I would think it should work, but sometimes I'm surprised since I know so little right now. I thought I heard the GPIO ports use 3.3v but maybe I read wrong.

>> No.2635733

>>2635724
Yeah should be fine. Look up "transistor fan circuit" if you get stuck. Raspi GPIO does use 3.3V, but you can easily use a 3.3V signal to control 5V power going to your fan.

You could even use the temperature sensor inside the raspi (I assume there is one) to feed a PID loop in software (nice python project) to PWM the fan. Not sure if you need a freewheel diode with one of those brushless fans, I'd include one for safety's sake.

>> No.2635761

I got a kit from a company from Freenove off Amazon, and been using it to play around with an RPi.
I have the RGB led hooked up based on their tutorial. For some reason when it comes to controlling an RGBLED with the GPIO library, not gpiozero, the duty cycles seem backwards. For example I have to set pwmGreen and pwmBlue to 100 and pwmRed to 0 to make only red light up. I thought I'd set pwmRed to 100, and the other two to 0 to make it where only red is active.
When using gpiozero it works as intended though.

Any idea what's going on? Or is it suppose to work like this?

>> No.2635769

>>2635761
Might be the software thinking it's using common-collector RGB LEDs when you're actually using common-emitter RGB LEDs? See if there's a setting for that, or otherwise inverting the output.

>> No.2635823
File: 299 KB, 1000x1000, arduino-ad9833-signal-generator.jpg [View same] [iqdb] [saucenao] [google]
2635823

>ad9833 complete module on aliexpress: $3
>ad9833 bare IC on lcsc: $5

are these literally fake chips?

>> No.2635827

>>2635823
could be "midnight runs", could be surplus, could be rejects, and the trouble of ensuring that your source is legit is also a cost

>> No.2635838

Give me a communication protocol that has
>minimal number of pins
>lowest complexity
>bi-directional master/slave setup
>flow control in both directions, any side can pause transfer
>can be bit-banged on master and slave

>> No.2635898

>>2635838
UART

>> No.2635912

>>2635898
No flow control, unless you use awful legacy extra pins which nobody supports out of the box. No bit-banging, although you almost always have hardware UART peripherals.

>> No.2635919

>>2635838
10mbit ethernet

>> No.2635925

>>2635919
Not bad, but still too complex.

>> No.2635929
File: 277 KB, 800x310, boardmagjack.png [View same] [iqdb] [saucenao] [google]
2635929

>>2635925
If you don't like i2c, uart, or ethernet you're really on the way to making your own shit

>> No.2635930

>>2635838
Zmodem
> pause transfer
So I can zap warez

>> No.2635934

>>2635929
>i2c
This needs only 2 pins, you can even connect multiple slaves, but it's too complex and you can't bit-bang the slave.

>>2635930
That's basically a protocol on top of UART. I'm sick of using UART for things that aren't logging.

>> No.2635937

>>2635934
ground is a pin too, I2C needs three pins

>> No.2635940

>>2635937
Sure, with vcc and gnd it's 4 pins. I'm interested in use on-PCB, so vcc and gnd are for free. Pins for actual signals not so much. At least I2C master is easy to bit-bang on a CPU with GPIOs, but you can't do that on the slave.

>> No.2635943

>>2635934
Why don’t you tell us what you’re trying to do?
How much data are you sending across?
What’s the error-rate tolerance?
What distance does it have to travel over?
Does the source/destination share a common ground plane? Clock?

If you can use D/A and A/D converters with a shared ground you can basically send 8-bit bytes by setting the D/A value on one and picking it up on the other side using one wire if they share a common ground.

>> No.2635949

>>2635940
You don't need to share vcc between I2C devices, just keep the same reference from ground. Electronics 101.

>> No.2635966

>>2635943
>Why don’t you tell us what you’re trying to do?
Something unspecific like having to communicate between two MCUs located on the same PCB.
>How much data are you sending across?
Maybe in the order of dozens of KBs per second, like a fast UART.
>What’s the error-rate tolerance?
Low, preferably low enough that it doesn't need any error correction or retry handling in software on top of it.
>What distance does it have to travel over?
Same PCB, so not much, but it shouldn't need any high speed communication lines the PCB guy would complain about.
>Does the source/destination share a common ground plane? Clock?
Yes, no.

I've used UART and I2C for this purpose before. Didn't like it.

>> No.2636060

>>2632880
I believe it is a bad idea to attach anything bouncy to EXTI lines. EXTI is usually for digital signals with proper edges and no bouncing. For example, decoding PWM.
For buttons, stick to polling and software debouncing. It is simple and it works well. Why reinvent the wheel.

>> No.2636066

>>2635838
>>2635966
>bit-banged
>between two MCUs located on the same PCB
Why does it have to be able to be bit-banged? If you use I2C, even a cheap shitty MCU (e.g. ATtiny25) can act as either a master or a slave via its internal dedicated hardware. You can clock-stretch on the slave to pause the data transfer. How is I2C not perfect for this?

Also standards that use pull-up resistors like one-wire can also probably be modified to pause transfer when the receiver tries to let the line float high but detects it's still pulled low. Assuming it doesn't already do that.

>> No.2636181

>>2635966
>be retard
>ask for help
>get given numerous possible solutions for x problem
>nah i dont want to use it because i dont like it
no one gives a fuck what you like. since you specified pin count as a problem, your choices are: uart, or i2c. both can he bit banged, both can be paused since youre bit banging, both can go at 100kB/s or more. take it or fucking leave it. if you dont like it, the fuck off

>> No.2636218

>>2635733
Finally found something that got what I wanted to working. Thanks!

>> No.2636237

Is low-side switching of MCUs a bad idea? I have a circuit where an MCU shuts itself down by pulling a GPIO down which turns off a transistor, disconnecting the circuit from the negative battery terminal. This simplifies the circuit vs. disconnecting VCC, but are there any side effects to doing it on the low side?

>> No.2636276

>>2636237
It's fine, but only if you ensure ground-coupled inputs and outputs are also fully shut off. Well if there's enough impedance you can rely on the protection diodes, but that's probably not brilliant for your quiescent current.

>> No.2636480

>>2636066
Have you ever debugged I2C? It's awful. Peripherals for I2C tend to be quite complicated too. I've dealt with some.
>Why does it have to be able to be bit-banged?
It doesn't have to be. But first, it proves that anything can implement it, without running into timing problems. Second, it's often easier to debug than using hardware I2C.
>You can clock-stretch on the slave to pause the data transfer.
Can you clock-stretch the addressing phase?

There must be a better solution, like morse code over GPIO. Morse code is a joke, but you could invent an I2C or SPI like protocol that has both master and slave flow control, and isn't as complicated as I2C.

>>2636181
Why so aggressive? I know how to use these things. Why can't we post about possible alternatives?

>> No.2636496

>>2636480
>Have you ever debugged I2C?
I've dealt with it used as a fucking I/O bus, with up to 60-70 devices on it. With support for manually cranking the handle with clocks if it stops responding because something got stuck with a half-completed byte. And on an STM32F103.
But at least there was only one master, it was just polling everything depending on if it had been responding lately.

>> No.2636514

>>2636496
>if it stops responding because something got stuck with a half-completed byte.
See, that "shouldn't" happen.

>> No.2636521

>>2636514
If you hit reset at the right instant it can happen easily.

>> No.2636598

>>2636514
>See, that "shouldn't" happen.
You simply must abandon this attitude.
Software guys dont and that's why their shit stinks.
Embedded have to be better than that. Pull your socks up kid you are letting the team down.

>> No.2636599

>>2636598
Fine, I'll implement error tolerant bullshit to compensate for unnecessary hardware failures yet again. I sure love working around hardware bugs, or maybe I should go into web devs and raise my pay.

>> No.2636670

I'm trying to clip onto tiny 0.3MM chips for on board testing. I got the tools, but not the magnification.

Can anyone recommend a solution? Usb microscope?

>> No.2636689

is using a heat gun the best way to massive remove smd components ?

>> No.2636717

>>2636689
Yeah, i successfully reflowed my PS3 chipset with a hardware store heat gun. No issues.

For bulk removal, when it melts you can just bang the pcb on the bench and they fall off.

For precision work, i cut a small rectangle in foil.

>> No.2636718
File: 420 KB, 1246x725, 74D8173B-7855-4EDB-AE06-2215C697E573.jpg [View same] [iqdb] [saucenao] [google]
2636718

>>2636670
Use what pros have been using for decades. No lag.

>> No.2636719

>>2636480
> debug i2c
Chips with different functional units are connected with a custom bus that would be comparable to using a bunch of gpio, like 8/16.
If you have them, use them.

>> No.2636763

>>2636599
>EMI enters the room to fuck your comms up and slave gets stuck
>this """"""shouldnt"""""" happen
but shit happens. so deal with it. if you cant accept that, youre gonna have to make your own protocol. then show it to us so we can shit all over it because itll inevitably be a pile of trash

>> No.2636781
File: 138 KB, 1485x1500, 71DZAS2ROiL._AC_SL1500_.jpg [View same] [iqdb] [saucenao] [google]
2636781

>>2636718
These chips are super tiny and I have to attach even smaller IC probes to them. Maybe something like this?

>> No.2636787

>>2636781
Full optical stereoscopic is the gold standard, but it is expensive. Especially if you go for a setup with multiple objective lenses. Digital systems can be ok, even a $50 setup has a pretty decent level of zoom, but there's inherent latency that you don't get with a fully optical setup.

Regardless of what you choose, get something that looks real rigid. Even a tiny bump can send your image into a blur when you're zoomed into a 3mm circle, if it's mounted onto a shitty gooseneck or a poorly machined chinky guide rod.

>> No.2636797

>>2636787
Work pays for whatever and I have a big budget (not huge, but big enough).

>> No.2636833

>>2636797
Get yourself a nice biology-tier binocular optical microscope then, the ones with the 3-5 objective lenses.

>> No.2636835

>>2636781
It’s hard to make suggestions when we can’t see what you’re dealing with exactly.

You’ll quickly learn the limitations in height and flexibility with that microscope set-up. And speed. Also very useful with that microscope will be a height adjustable table. Your neck and back will thank you.

I’m in my 50’s but I can still hit .5mm traces and pads without reading glasses but I’m nearsighted so i just take my glasses off.

>> No.2637004

>>2636496
>STM32F103
The F103 is one of the first ST arm chips. It has an errata sheet bigger than the Bible and is a pretty buggy chip.

People don't recommend it anymore

>> No.2637007

>>2636599
Implement CAN bus then and stop screaming

>> No.2637076

What's a good place to start learning about this autism?

I studied CS in school and work on microservices now, but never learned anything hardware related and I want to make nifty toys I can touch and see in my spare time instead of stupid services.

>> No.2637115
File: 132 KB, 740x952, circuit_diagram.png [View same] [iqdb] [saucenao] [google]
2637115

>>2637076
>good place to start learning

sorry but this requires innate talent.
like with poetry and music, you have to be born with the aptitude.

>> No.2637124

>>2637076
> CS
And they never taught you how computers actually work? That’s all this is. When I took CS, one of the courses was VLSI design and Verilog. I’m guessing it’s a bunch of python or Java nonsense now and everyone is doomed when the likes of me retire. It will become the Pakled race.

>> No.2637141

>>2637124
>Vlsi and verilog
They are in engineering(computer and electrical ~) now. CS at most gets 1 class on assembly on a software sim.

>> No.2637146

>>2637076
I just went to public library today and suprised that there are mechanic repair book, volumes on fixing electrical is just all that circuit schematic. Michell book.

>> No.2637237

Anybody know of a good USB-C host-controller? I've got a project that already manages USb3.2 signalling, but i can't get the CC line to allow signalling when charging the host above 5V.
I'm effectively stuck using USB type A-to-C power adapters, but I'd like to increase the power output to the host, and that requires more on the CC line than just a resistor.
I've also tried using discrete USB-C PD/QC ic's but those don't include CC compensation so the host knows to keep the data lanes open.

I can't find a lot of good resources that explain CC coms outside of just negotiating power between source and sink.

>>2635411
>each manufacturer probably throws in their own differences so it would be nice to know exactly what part number this is
As long as you get the pitch and top/bottom contact plating right, you can use any connector from any manufacturer. I built a "universal" 18-pin zif pad that i use in my PCBs so i can drop in whichever connector i have on hand. the only real difference i've seen is the tabs on the sides that can vary in width and depth, but if you make the pads big enough it can accept any configuration.

>>2635823
if you're buying from LCSC, you're paying a bit extra per part so the warehouse makes money. the board fabs, especially if they are in the same province, can buy directly from the silicon makers without a middleman, or are able to pump out so many that the margin can be tighter.

>> No.2637244

>>2637237
Wouldn't it be done by getting a USB-PD PHY and controlling it with a MCU?

>> No.2637254

>>2637244
The hub so far only includes a the USB3 chip (TUSB8020) and downstream current limiters as far as logical IC's. I was hoping to avoid implementing a programmable MCU for control, since i've had issues reliably sourcing and sticking to one model or footprint over the last two years, but i guess things have eased up enough to try again.
The dream was to drop in a plug-and-play PD controller that handles source and sink management while keeping data live, as I've seen them in off the shelf variants of what i'm trying to build. The symbols on the chip are lasered off, all i can tell is that its SOP
8-Lead
This is my first venture that touches USB-C PD/QC.

>> No.2637308

>>2637141
>computer science is more about software than software engineering
>software is more about computers than computer science
Fun

>>2637254
Have you tried a brute-force search on LCSC for (in stock) ICs that fit your requirements? Might be able to make it faster using octopart (it doesn’t have the chinky chips though) or by filtering via python or whatever.

>> No.2637485
File: 1.43 MB, 480x368, that's the joke 1664120562670950.gif [View same] [iqdb] [saucenao] [google]
2637485

>>2637004

>> No.2637559

>site x says BJT has faster switching, because no gate capacitance
>site y says MOSFET has faster switching, because no minor carriers
What gives, Anon-senpai?

>> No.2637600

>>2637559
It’s more complicated than that.
GaAs devices are used in the highest speed applications like satellites.

>> No.2638055

>>2637559
for current mode bjt can be faster
for swiching application it is fet
for ultra low power it is again fet becouse you can make it smaller

>> No.2638991

I have a robot vac I'd love to get the firmware of. On the board is a Micron eMMC NAND memory chip (datasheet can be found here https://datasheetspdf.com/pdf-file/1025549/Micron/MTFC2GMDEA-0M-WT/1).). I'm use to dumping Serial NOR chips so this is a bit new for me. If I find the data/cmd/clk pins on the board could I hook them up to an arduino/esp and read the contents of the eMMC chip or will there be protections? Any advice from someone who's done similar would be appreciated.

>> No.2639046

RISC-V or ARM and why?

>> No.2639070

>>2638991
if they were smart theyd encrypt it and use secure boot. but its just chink shit so you should be able to read it off fine

>> No.2639085

Let's say I hypothetically applied 170V to the ground loop of my raspberry pi circuit and now the boot console is looping some stall errors
Any idea what I can do to recover from this?

>> No.2639088

>>2639070
I don't even know if the processor supports secure boot. The company apparently changed the part number on the chip to obscurify it (https://e2e.ti.com/support/processors-group/processors/f/processors-forum/526033/sni2095260zce-question).). They're real dirtbags and now out of business leaving everyone who bought one of their vacs holding the bag.

>> No.2639120

>>2638991
I'm assuming the microcontroller is using that chip as external program memory, and not as supplemental memory? In which case, there's a decent chance that the micro has encryption hardware that can run live as it decodes memory.

The hardware side will be a pain, finding the traces relating to the relevant signals will be nigh impossible since they're coming out of a BGA and into another BGA. But maybe you can probe using a logic analyser and see proper CMD signals. You can also probably get a good idea of where the traces are coming from with respect to the package and its pinout. Using the implied pinout may also be useful for reverse engineering the MCU. Otherwise, get it x-rayed, or thin-sectioned, or desolder it.

An ESP should be fast enough, since the command clock speed can be 26MHz, and the sequential read speed is 30MB/s.

Worst case you design a new board with your own custom firmware. Probably with a cheap SBC or droid phone or whatever in there. That or ditch the smart bullshit and cram the firmware into an RP2040.

>> No.2639125

>>2639120
I've found most of the data lines already. Figuring out what they are should be easy after hooking them to a logic analyzer. It's more a matter of if I should even put the effort into trying to dump and reverse the firmware vs desoldering the processor and wiring the robot's inputs from the old processor's pads to an esp32.

What you say makes a lot of sense. Even if the SoC doesn't support secure boot it probably has some base loader program with an encryption key that I'll never be able to get. I was thinking the whole system would be on the eMMC.

I'd love to be able to make a custom firmware people could just download to fix their bots but I don't think it's realistic.

Thanks.

>> No.2639142

>>2639125
>has some base loader program with an encryption key that I'll never be able to get
If it's an SoC without its own progmem AND without secure boot, then I don't think there's any way the flash can be encrypted. Not easily at least. I'd do some research on similar SoCs to what you think is on there (are the other markings on it also fake?) for sure. Trying to get a JTAG or other ICSP header to read the SoC's part ID would be my short-term goal. With any luck there's a (unpopulated) header already on the board for debug purposes.

>desoldering the processor and wiring the robot's inputs from the old processor's pads to an esp32
What are the actual specs you need? With 2GB of storage I imagine it's doing some sort of high-tech room scanning perception stuff, plus all the internet connectivity. An ESP32 alone might not be enough without some extra memory (and maybe another core or two).

>I'd love to be able to make a custom firmware people could just download to fix their bots but I don't think it's realistic
See:
>https://librervac.org
>https://github.com/Hypfer/Valetudo
If you can get the right SoC for something like this to run on, or some other existing "operating system", it should be a reasonably simple bodge job. Maybe some extra shit like changing the camera (or the input format), adding some extra code for sensors, or even using an external MCU to change data formats if you can't do so in software.

>> No.2639153

>>2639085
170v would never get through the optoisolators you put in to prevent such mishaps.
Som tailored advice: you’re gonna want to socket them.

>> No.2639327

>>2639142
The picture in >>2639088 is of the same board as I have. Those are all the markings on it. There's a JTAG header but I already tried it. It's software disabled.

>What are the actual specs you need? With 2GB of storage I imagine it's doing some sort of high-tech room scanning perception stuff, plus all the internet connectivity. An ESP32 alone might not be enough without some extra memory (and maybe another core or two).
The 2GB size is a red herring. Based on earlier model's firmware update files I doubt more than a few megs are used.

It's a Neato Botvac. It has LIDAR sensor and does room mapping but none of it is persistent on the bot. All maps are uploaded to Neato's "cloud" which is failing. The maps themselves are point clouds and probably in the KB range.

There's little doubt in my mind that a single core esp8266 would wipe the floor with whatever this 10 year old SoC actually is so an esp32 shouldn't have an issue. I might need to multiplex some inputs since there's a lot of them but that's all simple stuff. If I need more RAM there's always those SPRAM.

>> No.2639760

>>2637254
>>2637308
Following up, I found the USB-C port manager that doesn't require a discrete MCU: LDR6023
Covers up to PD3.0, so I should be able to use any modern charger now

>> No.2639938

I have a routine in my startup asm in one project whose address I’d like to make available in another project so that I can jump to it (use case is bootloader/application and skipping a verification section when executing the bootloader from the application). is that even possible? Seems like something the linker could handle but with them being in separate projects I’m not really sure how to configure that. I’m using stm32 cube ide, which uses gnu build tools.
Alternately I’m thinking i could add a long nop ramp after the verification code and just jump to a hardcoded offset from the reset handler.

>> No.2639945

>>2639938
You have to export the symbol from the asm file (".global name" for gnu), then add an extern declaration on the C side.

>> No.2639950

>>2639938
What do you think _globl is for? You have to do that to expose your main in the first place. Why don't you know even basic asm?

>> No.2639951

>>2639938
>>2639945
Oh wait, separate projects? You might be able to force the linker to put it at a certain address, like after the interrupt vectors, by messing with the linker script, then you should have a fixed address to work with.
I don't know how much cube thinks it owns the linker scripts, be sure that it doesn't stomp on them when it feels like it.

But the best case is if they all get linked together (how does it know where to put the second project's code?) then you can just use the global/extern thing.

>> No.2639954

>>2639951
It’d be nice to have it all under one roof but unfortunately it’s not my call. It’s not a big deal, we already have them going to different regions in flash so I think configuring a fixed address in the linker script matches the current scheme and makes the most sense. thanks for your help anon.

>> No.2639964

>>2639954
so create a section in the first project like ".jump_vector" and put it in your linker script after the ".isr_vector" or whatever section in your linker file, then add something like this to your startup asm:

.section jump_vectors
.global super_jump_handler
super_jump:
br super_jump_handler

Then you need to know what address it will drop at, then you can declare the extern function for it in the other project with casting, or maybe a function with an asm { " br 0x20000400 \n" } Something like that.

>> No.2640013

>>2639938
Not clear to me what you want, but using a linker script is the easiest way to force fixed addresses for symbols.

>> No.2640041

>>2639760
does it need firmware itself, or just programming passives? if it needs firmware, often those chips are more of a pain to program than just shoving a cheap attiny in there would be

>> No.2640100

>>2640041
Datasheet shows there are a few versions, but there is one that has a default preset which does what I need. Alternatively, there's an option to attach an eeprom module for special configurations, which I have plenty of and clips to flash.

>> No.2640162

I think i might need a raspberry pi but im not really thrilled about it. I was thinking of just using a phone but it doesn't have the gpio pins. Is there really no alternative? I am aware of orange pi too btw I mean i guess but really.

>> No.2640168

>>2640162
>Is there really no alternative?

if you'd bother googling it like a person, you'd see there are 100s of alternatives.
here's the 17 best ones according to ''Gigi''.
https://www.seeedstudio.com/blog/2020/10/20/raspberry-pi-alternatives-17-best-single-board-computers-in-2020/

and wikipedia list hundreds.
https://en.wikipedia.org/wiki/User:OliverGalvin/Comparison_of_single-board_computers

>> No.2640199

>>2640162
>phone with GPIO pins
For doing fucking what?

>> No.2640209

>>2640162
What are you doing with it? Input or output data, or both? If it's to act as a generic computer then any SBC should do the job, even the knockoff ones. Only when it comes to running software specifically compiled to run on the Raspberry Pi do you get in trouble with knockoffs.

You might be able to get GPIOs out of a droid phone by using a USB OTG connection to something like an FT232 or CH341, or to an MCU + USB slave setup. That MCU setup could be either a native USB MCU like a Pi Pico, Bluepill, Arduino Pro Micro, or ESP32S2, or more likely just something cheap with a UART to USB decoder IC on it like an Arduino Nano, where the MCU takes the UART data and processes it into GPIO commands. You'll want to look up driver compatibility before you buy something. Worst case you need to write your own driver.

If USB isn't an option, it might be an option to use a phone's headphone jack to send and receive data. That said, you may be blocked from using it directly by high-pass capacitors, so some sort of non-DC encoding might be a requirement, which naturally would require an MCU on the other side to decode it. I recommend manchester encoding. An IR blaster is an even easier option if you just need one-way data.

>> No.2640265

>>2640162
It's impossible to recommend something if you don't specify exactly what you're trying to do.

>> No.2640278

>>2640265
oh sorry I was planning on using it to control multiple arduinos maybe I'm not sure but that's what I was thinking.

>> No.2640322

>>2640278
I think what >>2640209 suggested would work best for you. Connect one of the microcontrollers to your phone over USB (with a UART adapter if not native) and use that MCU to communicate to the other MCUs. Or you could use a USB hub and give each MCU its own connection to the phone.

>> No.2640488

How do you reprogram TWS? There is a heavily-accented English voiceover on my TWS when doing some functions. They use QCC3040 chips. Can you do this wirelessly?

>> No.2640575

>>2633033
Electronics soldering/assembly factory. It's a real position.

>> No.2640700

Looking into timer interrupts for AVR, I've found a couple examples explaining what to do but they don't go into hardly any detail as to why you do it so I'm struggling to modify them to my application. Anyone have a recommendation? Otherwise I might just beg my university library to let me borrow a book as an alumnus

>> No.2640704

>>2640700
avr timer interrupt register settings are fucking retarded. best thing to do is take an example like a 1ms timer example and adjust different settings 1 at a time to see the effects

>> No.2640776

>>2632544
I've seen a chart with projects to do with microcontrollers, with numbers for rolling here. Anyone has it?

>> No.2640905
File: 79 KB, 745x424, Screenshot_2023-06-30_11-51-12.png [View same] [iqdb] [saucenao] [google]
2640905

>>2640704
>avr timer interrupt register settings are fucking retarded.

Do you have difficulty understanding the mask bits shown here, or the flags I will post next? They are complex because they are complex.

>> No.2640908
File: 123 KB, 753x774, Screenshot_2023-06-30_11-53-11.png [View same] [iqdb] [saucenao] [google]
2640908

>>2640704
>>2640905

>> No.2641258

Want to build a cheap pen plotter. From my research so far, looks like I'll be needing an Arduino + some CNC driver but there are so many out there. What should I be looking at?
Most project I see on youtube looks like they're using the Arduino CNC v3 Shield but looks like there's also tb6600 available.
Should I just buy whatever is cheapest? Coz I don't mind spending a little more money for a better quality product. Do these things go bad over time?

I've soldered a few wires before but I'm more of a /g/ man. Any suggestions/recommendations is highly welcome

>> No.2641277

>>2641258
Marlin 1 runs fine on common 8-bit MCUs like ATmegas, and you can compile it yourself for a pinout of your choice. While version 1 may not have the more complicated vector operations that allow you to keep your feeds and speeds proportional to one another throughout corners and accelerations, for a plotter that's not necessary at all. But going for an STM32 or other 32-bit MCU that can flash Marlin 2 instead is worth considering if you're thinking of converting it to a CNC laser. There may be other firmware designed for plotters, but Marlin is pretty mature and its native laser support should be directly usable.
If you're planning on using steppers, then I'd just make your board (or even protoboard) have sockets for common 3D printer stepper drivers:
>a4988 - cheap and reliable, loud as fuck
>tmc2209 - price/features king
>TMC5160 - great but fucking expensive
You can buy these pretty cheaply from china. Take a look at a schematic for a 3D printer to see how they're wired up, the Creality V4.2.2 is what my printer has. And feel free to ask the 3d printing general on their thoughts about the kind of specs you'd want, and on how best to configure Marlin, there's a lot of overlap.
A dedicated stepper driver shield for an arduino would be even easier though less upgradeable, just be sure it has the options and specs you need. Number of axes, output current range, input voltage range, microstepping resolution, etc. You may well need an external MOSFET for pen up/down.

If you do design PCBs yourself I'd highly recommend making it a laser too, assuming it's a flat table plotter and not roller-based. With a laser you can reliably and idiot-proofly create PCBs by burning away spray-lacquer as an etch resist.

Also what do you think of making a CNC machine design general?

>> No.2641474

>>2641277
Overly specific generals are gay

>> No.2641511
File: 135 KB, 1024x683, 3371924587_7e3f4bb0c3_b-1401771782.jpg [View same] [iqdb] [saucenao] [google]
2641511

Maybe not the best thread to ask in, but does anyone here know much about 8-bit computer kits? Seems like a fun way to learn about low level computing and also do some projects with.

>> No.2641526

>>2641474
It would also feature building CNC machines and projects made by CNC machines, so long as those don't fit into the machining general or 3d printing general. I'd say it's less specific than the 3D printing thread, but so was my chemistry general and it died without reaching bump limit.

>> No.2641530

>>2641526
And where is chemistry general now? You're clearly missing the point, make a thread about it, it doesn't need a hip vibrant community for you to cultivate, redditfag

>> No.2641543

>>2641530
>And where is chemistry general now?
I stopped refreshing it because there just wasn't enough interest. Basically no new content, just a few people asking questions and not being particularly well informed. Chemistry projects, especially the practical ones you'd find on /diy/ instead of /sci/, are time consuming and expensive to figure out, and there's little room for other people to be able to help you who aren't both wealthy and autistic. On this board you can ask a question and someone with a general swath of knowledge can look into the datasheet in question and point out what you're missing, or suggest an appnote. But for chemistry, you're not going to get someone recreating your 500 hour conquest of octonitrocubane to figure out why your TLC isn't showing up. The latest NightHawkInLight video is a nice example of practical chem, and also an example of it taking fucking forever. While there's a point in making project threads, just the same as you'd normally get here, but little room for collaborative discussion. And there aren't that many trivial chemistry projects that don't warrant their own thread.

A general should aim to facilitate:
>nuanced discussion and sharing of information
>long term projects (i.e. longer than a single thread would survive for)
>trivial but topic-specific questions that don't deserve their own thread
>sharing of trivial but topic-specific projects that don't deserve their own thread
>crowdsourcing?

I think CNC fits into all of these.

>make a thread about it
A thread about a project doesn't need any amount of people to visit, but a general requires some critical mass to be self sustaining enough to keep itself bumped at the very least.

>> No.2641549
File: 226 KB, 1280x720, 8-bit computer.jpg [View same] [iqdb] [saucenao] [google]
2641549

>>2641511
>8-bit computer kits?

https://eater.net/8bit/
https://www.youtube.com/watch?v=YxW3LQ6DE-k
https://www.youtube.com/watch?v=PRcipJ-k_aY
https://www.youtube.com/watch?v=KAivGLHJzJM

would not recommend, tho.
coz without wifi, ethernet, usb, program libraries, sample projects, and a community, it's long hard expensive slog for little gain.

>> No.2641554

>>2641543
Case in point

>> No.2641741

>>2641277
Hey OP here thank you so much.
I didn't even know an IC could be loud. So if I'm understanding this correctly, the Arduino CNC shield is just a board that uses a4988.
Thanks for pointing me to 3d printing general I think I have a few questions regarding motors etc. This was very helpful.
I think I have a little more research to do before coming here for advice

>> No.2641742

>>2641741
>I didn't even know an IC could be loud.

You can get coolers that also muffle the sound of the louder ICs.

>> No.2641826

>>2632544
I'm working on a project now where I need to script GPIO functions with C++
Any tips on how to get started? I know nothing about this

>> No.2641829

>>2641826
>script GPIO functions with C++
This reads like an NCIS episode's understanding of computers
You planning on doing GPIO in the cyberverse or do you have some actual hardware you're using to communicate with the real world?

>> No.2641830
File: 72 KB, 855x570, 2017-02-01T08 54 19.680Z-P1200648.JPG.855x570_q85_pad_rcrop.jpg [View same] [iqdb] [saucenao] [google]
2641830

hi electronics newfag here (you might remember me from /ohm/ i asked how do i get an obd connector to make a CAN sniffer)
I bought an ELM327 and honestly it seems great because it already has the other OBD standards integrated into it already. except mine is a clone and doesn't even support the AT MA command which i was most interested in. seems like there are workarounds that involve flashing custom firmware onto the PIC18F2480 chip.
but i have only even programmed an esp32 and 8266 before. do you NEED what they call the PICkit 3/4/whatever? or can you jsut use any normal EEPROM programmer like picrel?

>> No.2641839

>>2641830
also if it helps i will have to flash new firmware using the 5 points at the back (VDD, GND, and 3 others i don't remember atm). It's an smd package.

>> No.2641898

>>2641741
It's not the drivers that are loud, it's the steppers. When they have non-sinusoidal current, that means they snap to angles as they move. The better stepper drivers have high degrees of microstepping that smoothes these corners out, which also gives you more precision but requires higher speed out of your controller. Microstepping can be controlled by changing some simple programming pins to be high or low.

>> No.2641981
File: 984 KB, 3472x4624, IMG_20230702_202820.jpg [View same] [iqdb] [saucenao] [google]
2641981

How do I get into the microcontroller world?
I feel so filtered, despite being a C programmer who navigates very confidently around a Linux system. I am also good at book learning, i.e. having a physical print textbook and reading it.

I bought this RP2040-ETH device.
Zero documentation on how to use the Ethernet port. The demo Waveshare gives is literally this:
>#include "CH9120_Test.h"
>
>int main()
>{
> Pico_ETH_CH9120_test();
>}
and that function just takes you to
>#include "CH9120_Test.h"
>
>int Pico_ETH_CH9120_test(void)
>{
> CH9120_init(); //Initialize Configuration CH9120
> RX_TX(); //receive and dispatch
>}
and I still have no idea how to program it to send UDP packets of a certain type to whatever is on the other end of the ethernet cable.

TLDR I want an easy project or written tutorial that will help me program microcontrollers in C without bashing my head against the wall.
I've already given up hope of actually using GPIO pins and the like as there isn't anyone to teach me that, but I can at least learn software on my own.

>> No.2641984

>>2641981
Typical cnile. 0 clue about any kind of programming, least of all the most basic concepts in C, yet claims he's a "c programmer". Probably evangelizes it any chance he gets as well.

>> No.2641987

>>2641984
I literally have a job programming in C, so yes I qualify as a c programmer

>> No.2641988

>>2641987
Kek
Classic.

>> No.2641990
File: 1.10 MB, 2550x1222, Screenshot from 2023-07-02 20-53-38.png [View same] [iqdb] [saucenao] [google]
2641990

>>2641988
thanks for the help faggot.
I just bought this and should be building cool things in no time, no help from you

>> No.2641991

>>2641981
>ch9210
Google for it, you will see that it's one of those chips that integrate an entire network stack, and offers some sort of socket IP over UART. So find out how to access the UART then read the datasheet of the chip to know which commands to send to it. Was that so hard, where's the problem?
Also stay away from Arduino garbage. It's such a mess and prevents anyone from actually learning how the software works.

>> No.2641992

>>2641990
>cultist clown doesn't know about libgen
lol

>> No.2641993

>>2641984
>>2641992
What language do you to program your MCUs. In before trash like C++ or Python.

>> No.2641998

>>2641993
C or ASM. But I don't pretend C is god's gift to programming languages like Cletus over there.

>> No.2642000

>>2641992
i know about libgen but I stare at a screen 18 hours a day I'd rather have something bound and in print every now and then

>>2641991
I guess you're right, I need some patience, touch grass, and probably have to learn the Pico system before even beginning to look at the ch9210
>https://www.waveshare.com/w/upload/d/d3/CH9120DS1_EN.pdf
this appears to be as detailed as the datasheet for the CH912 gets

>> No.2642001

>>2641992
>only books on ARM programming are in assembly or written by pajeets
You really should look stuff like this up before making a fool of yourself

>>2641998
But then you go ahead and say stuff like this and it's apparent it's terminal

>> No.2642002

>>2642001
Holy schizo batman. Take your meds or go to >>>/x/

>> No.2642006

>>2642002
Case in point

>> No.2642008
File: 5 KB, 590x85, mbed.png [View same] [iqdb] [saucenao] [google]
2642008

>>2641993
C++ for embedded is underrated
Just toss out the STL and templates (the source of all bloat), and create a global object for each hardware device. Or in other words, a struct with functions hanging off of it, Simula style.
The trick is to remember that in C++, the only difference between an object and a struct is that structs start public and objects start private.

Anyhow the way to enlightenment is to look at other people's code, good and bad, to see how they do shit. It also wouldn't help to learn some digital electronics.

>> No.2642040

>>2641981
start with something simpler. rp2040 is highly abstracted but powerful trash. guaranteed that the chips device drivers have a full networking stack implemented on some gpio pins to use the ethernet port directly. also, idk why youre giving up on using gpios, way simpler than using the ethernet port. it basically goes...
init pin for r/w
set/read pin
you need to read the chip datsheet by the sounds of it, and not get baited into downloading premade libraries

>> No.2642063

>>2641830
Chances are the pinouts won’t match. PicKit is likely a necessity, though there are a few projects for making a PIC programmer out of an arduino or whatever.

>> No.2642080

>>2642063
Ah thanks. I stumbled upon this project https://github.com/stechiez/a-p-prog but it doesn't have the exact chip I'm trying to program. There are a few from the 18F24xx family but not the exact one. Right now i have some time so i might try the arduino thing. The dat file on that project has the name, "mask" and a few other things so I guess if I find out those things for the 2480 i could somehow make it work on an Arduino nano

>> No.2642264

>>2642040
I know how to configure pins but not how to hook up devices to pins

>> No.2642273
File: 113 KB, 903x1465, The TTL Cookbook.jpg [View same] [iqdb] [saucenao] [google]
2642273

>>2642264
Don may be gone but he's not forgotten.

>> No.2642282

>>2642040
>trash
Why do you call it trash?

>> No.2642294

>>2642273
He's clueless, so it's hard to be sure, but I bet he doesn't need interface chips so much as he needs to learn simple things like when to use pullups.

>> No.2642309

>>2641981
>program it to send UDP packets of a certain type to whatever is on the other end of the ethernet cable
Did you see this?
https://www.waveshare.com/wiki/RP2040-ETH#Demo_Introduction
The CH9120_TX_4_bytes function looks to be the closest function on that page to what you are wanting to do. You would use it to set the mode to UDP client, and then use another function from the same family to actually send data. Unfortunately the documentation for this board looks pretty shit so you will need to go looking through the library code to figure out what else is defined and how it works.
If you want to use ethernet then I would go with a full-fledged RPi that has ethernet integrated into the linux OS instead. This looks like some weird halfway thing, for example it seems like the IP addresses need to be hardcoded.

>> No.2642311

>>2642264
The simplest device is something like an LED which is either on or off. After that it is just a matter of understanding the device’s communication protocol or having code that does that for you.
Start with an LED then move on to something like a temperature sensor or a strand of WS2812 LEDs.

>> No.2642318

>>2642294
Yes, and? Pull-ups are in there.

>> No.2642326

>>2642309
ESP32 has an actual ethernet MAC for up to 100 Mbps. It's probably what I'd try. Be careful, the cheaper dev boards have these network stack trash chips instead of a PHY connected to the ESP32 with MII.

>> No.2642328

>>2642326
>ESP32 has an actual ethernet MAC for up to 100 Mbps
Yes, another example, though not quite as user friendly as a full Linux stack.
Esp8266 with wifi is fine also.

>> No.2642511

>>2642264
this >>2642311
how to "hook" it up. read datasheet of part or component. find appropriately functioning pins on the controller. make a schematic. wire it up or design pcb. easy

>> No.2642542

>>2642328
Old router with OpenWRT support.
Use LEDs pins as GPIOs or bitbang its serial port.

>> No.2642550

>>2642326
there are numerous mcus that have full networking stacks with wifi and/or ethernet hardware. the mcu world isnt just esp32

>> No.2642557

Anyone ever worked with ATWINC1510 Wifi module? Maybe i'm fucking stupid but I feel like i'm not using it correctly at all
> Can only know how's it going by polling a function
Since when are things like that not connected to interrupts.
>Max 1024 bytes per packet in a TCP connection, and suddendly it fuckign died and can only send like 300 bytes at a time
?????

>> No.2642573
File: 952 KB, 3472x4624, IMG_20230703_201034.jpg [View same] [iqdb] [saucenao] [google]
2642573

>>2642311
>>2642511
yeah it's the "wire it up" part, I know I'm sounding like a noob but I've never connected devices together.
however this discussion made me realize the rp2040 does come with holes for the GPIO, if I use one of the wires in picrel and connect to it to another device I guess that would work -> but I would need something to secure them in place.
tape? or is there a more elegant solution

>>2642309
>CH9120_TX_4_bytes
yes that seems to be the way to do it, thanks

>>2642294
? pullups for me are a workout exercise

>>2642273
thanks will take a look

>> No.2642621

>>2642573
mate you need to solder in some 0.1" headers. male or female. and i recommend a breadboard for shit like this. just search it on google or whatever

>> No.2642929

Is there any open source or at least more flexible alternative to esp-insights? Or should i just make my own with opentelemetry

>> No.2643442
File: 67 KB, 591x435, ACCC9DF4-93A9-47F2-B051-19F0D6638690.jpg [View same] [iqdb] [saucenao] [google]
2643442

>>2642573
Anyone know if you can just use the bare rp2040 chip? It doesnt have that many pins, it looks like i could “dead bug” it. Or, am i missing something?

It looks like the middle is a heat sink pad, i could solder a heat sink on there or just put it into low power mode and/or under clock it (if that is possible).

>> No.2643445

>>2642573
Not very elegant either, but you can just solder the wire-pin to the hole. It will be rock solid. If you only use tape, it will have a bad contact and cause problems.

>> No.2643468

>>2643442
Technically it might be possible, but the dependence on external components (notably flash) might complicate things
Check out this https://datasheets.raspberrypi.com/rp2040/hardware-design-with-rp2040.pdf

>> No.2643478

>>2643442
>Anyone know if you can just use the bare rp2040 chip?

Oh hell, what the fuck, let me google that for you

"This minimal design example is intended to demonstrate how you can get started with your own RP2040 based PCB
designs. It consists of very nearly the minimum amount of circuitry required to make a functional design that can run
your code. Schematics and layout files are available for KiCad at https://datasheets.raspberrypi.com/rp2040/MinimalKiCAD.zip.. KiCad is a free, open source suite of tools for designing PCBs and can be found at https://kicad.org/."


https://datasheets.raspberrypi.com/rp2040/hardware-design-with-rp2040.pdf

>> No.2643492

Anons, I've been working in IT and have been recently looking for new work for a few months after completing my last contract. Its been comfy working remote, but I was offered a job in industrial automation with full training. Should I take the job or keep looking for something to stay remote? The pay is decent, but requires some travel and being back in the office every damn day.

>> No.2643493

>>2643492
Automation is hell. Dumb people, dumb infrastructure, dumb pay.

>> No.2643495

>>2643493
the pay is pretty good anon and there is no micromanagement bullshit going on just show up to office or plant and learn machine vision for a tier 1 automotive. is it really that bad?

>> No.2643496

>>2643493
the job is controls engineering btw. ive also been going after azure certs to try and stay more relevant in IT

>> No.2643498
File: 1.55 MB, 1154x1133, B7C3D586-AD93-4A7C-9B18-CDD3B4B5774E.jpg [View same] [iqdb] [saucenao] [google]
2643498

>>2643468
>>2643478
Thanks, I did read that, and took a look at picrel the pga2040.
Carrier boards are like 10x the cost of the mc which makes me wonder what their real business is.
One thing I note, is that both of them have crystal oscillators which isn’t minimal, so i was wondering if anyone had any practical experience actually doing breadboarding/direct wiring it.
I can’t believe it doesn’t have any flash on board, but if i solder the QSPI using lead wires, I wondered if it would work due to lead length and length matching; i dont want to bother making a PCB (again, 10x cost).
It would have been nice of them to use a PLC socketable package for the thing (or some other equivalent)

>> No.2643505

>>2643492
Get yourself a job in defence. It's the comfiest shit ever.

>> No.2643507

>>2643505
im sure it is but not gonna happen for me atm. its between taking this controls job with full training that i dont know shit about or keep looking for something remote to stay comfy. need to pay my bills but i can coast for a few months at least

>> No.2643637

>>2643442
I believe the center of the chip is ground

>> No.2643788

>>2643442
>>2643637
its both. a thermal pad that is connected to the gnd internally

>> No.2644377

Anyone have a recommendation for a budget magnifying device for SMD microsoldering? I bought a cheap USB microscope, and it's fine for inspecting the PCB and getting parts numbers off chips and caps, but there's a slight input delay, which makes it kind of useless for soldering. I'm only looking to spend about $50 USD, since I really only need it to fix a Nintendo Switch and a cell phone at the moment.

>> No.2644383

>>2644377
Just make your own. Buy a sapphire bead for a penny and a ccd for a few more. That's all you need.

>> No.2644388
File: 2.94 MB, 540x404, 1688599483491336.webm [View same] [iqdb] [saucenao] [google]
2644388

Hello, perhaps this is the right place to ask
I recently had an opportunity to work in automation with PLC programming
My employer is aware that I don't know much but I actually know very little besides the very basics
Are there any resources that might be helpful? Hopefully anything that follows industry standards

>> No.2644405

>>2644388
PLCs are not microcontrollers. Ladder logic is from another planet.

>> No.2644417

>>2644388
Go take a PLC course at a local university or community college. It won't make any sense without having access to a PLC or sim software in front of you
Can you code?

>> No.2644420

>>2644417
I can and I already have done one hence the job offer. However, what they teach you at uni is very very basic in comparison to what I'm going to be doing.
I can code and I know c++ mainly

>> No.2644786

>>2640700
I figured it out
The internal timer is nominally running at 1MHz, and I'm using the interrupt to increment a counter allegedly every 2ms in addition to updating the clock's display, but it's apparent it loses time quickly. About half an hour every 12 hours. Is this a result of the internal resonator not operating at the advertised rate (I know this generally is the case) or because the timer interrupt function shouldn't have any extra code?

>> No.2644790

>>2632544
Know of a cheap, easy to program, microcontroller with a good C or C++ complier? I've wanted to get into embedded devices for many years and now that I have time there's no supply of Atmels for the Arduino. Ideally the chip would be DIP.

>> No.2644796
File: 185 KB, 1080x2400, Screenshot_20230708-003604.png [View same] [iqdb] [saucenao] [google]
2644796

>>2644790
>there's no supply of atmels for the arduinos
What did he genuinely mean by this

>> No.2644799

>>2644786
That’s nuts. So, yeah, you’re lucky the osc is even that accurate. I got a 50¢ LED clock module and even it has a crystal.
Interrupt every 2ms is abusive. Cut it down with a divider/counter or zero-cross detect mains from a decoupled source.

>> No.2644805

>>2644796
I guess supply has improved *shrug*. Let's see how long it lasts.

>> No.2644808

>>2644799
The 2ms is necessary for turning on and off the nixie tubes, much more time and they start to flicker, and I really don't want to use delay functions.
I bought some 16MHz crystals but neglected to get the pF capacitors so that's gonna be another order lmao, whoops.

>> No.2644811

>>2644790
You’re not gonna want to program many things in a DIP with something as fluffy as “C”

>> No.2644818

>>2644811
The program size is small and the projects are relatively simple. I could also do AVR assembly. But if I need to go that low level I'd prefer to do RISC-V. And I'm just not touching most of those chips. The $0.10 one that I keep seeing shilled is a maybe. But one big plus of the Arduino is that you can use it as a programmer for your various projects and then remove the chip

>> No.2644821

>>2644808
So you’re using the same interrupt for the clock and pwm of the nixie? Eww.
Your interrupt needs to get in, and get out asafp. You can investigate the counter your interrupt is incrementing later in a polling loop or something.
Make the clock interrupt the priority, pwms and other shit don’t need to be accurate.
Delay functions and polling are typical activities that your microcontroller is engaged in so don’t worry about it. It’s not a epyc, it won’t burn up.
> cap
TV coax is 20pf a foot (for example). Just make one.

>> No.2644825

>>2644818
If you’re gonna do assembly, my opinion is you want the CISC-y-ist shit you can get your hands on. Like the original microcontrollers.
When I’m feeling lazy, I use the compiler to “cheat” in that I cut out snippets of disassembled code generated by the C compiler and drop them in-line.
With experience you can always do better than the compiler, even with register windows… the advice that it is “too hard” was always bullshit.
RISC-V is still in the meme phase, useful only if you need to cut licensing costs for core IP (I assume you’re not fabbing your own chips)

>> No.2644827

Hey guys, recently got some free surplus stuff from work. As well as a bunch of DB25 backshells and 38 pin locking IDC connectors (and a huge assortment of SMD electrolytic and tantalum caps), I got:
>some SMD PLCC sockets
>HK828 record/playback ICs
>SMD optocouplers
>SMD 5V and 12V voltage regulators
>SMD MAX232 serial transceiver chips
>THT MAX497 video buffer amplifiers
And for the microcontrollers:
>1x PIC18F4550
>3x PIC16C711
>4x PIC16C63A
>4x dsPIC30F2010
>9x dsPIC33FJ128GP802
I've never used a PIC before (just AVRs) but I do like the idea of making DSP circuits. But how capable are these dsPICs going to be compared to brute forcing shit with an ESP32? For example, with fourier transforms. Also I hope I don't have to use MPlabX for them, looks like I can probably do it via command line using MPlab-based tools, but I've been meaning to get into PlatformIO instead.

All those SMD parts are being phased out while our THTs are staying, because people who buy SMDs buy online, we just cater to the boomers.

>> No.2644843

>>2644383
Could you explain how that works?

>> No.2644877

>>2644825
There are real chips with RISC-V now, like a ESP32 variant.

>> No.2644898

Is there an easy way to know if your VHDL code can run on a specific FPGA ? I'm pretty new to this stuff and i'd like to run everything on a small and inexpensive chip, but i'm not sure the 1200 logic cells of a XO2-1200 is enough...

>> No.2644919

>>2644843
A microscope is a lens + an objective. Here the ccd serves as a digital objective which allows you to get the image straight on your computer by usb if you like, while the sapphire bead can achieve up to 2500x magnification, which is higher than the optical limit of resolution you can achieve anyway. You'll get distortions as you look away from the center as well as aberrations (spherical, chromatic, etc.), but it costs literally pennies to make and you won't have any delays in your image capture. You can also get a collection of beads and change them based on your magnification requirements. Also, if you play with the distance between the objective and lens, you can significantly reduce aberrations, if that ever even is a concern for you (it usually isn't).

>> No.2644963
File: 19 KB, 253x122, 1.png [View same] [iqdb] [saucenao] [google]
2644963

Why would an LCD require this on its PSU?

Why not one cap

>> No.2645017

>>2644821
I understand getting in and out quickly but it's only a couple extra operations to set some bytes, I'm only switching one tube per interrupt. Does the timer count not start incrementing again until the ISR finishes executing?

>> No.2645030

>>2644963
>Why not one cap

each type of cap has different characteristics beyond capacity.
you use 2 or more to combine various sundry beneficial characteristics.

>> No.2645074

>>2644963
https://www.youtube.com/watch?v=BcJ6UdDx1vg

>> No.2645092

>>2644963

Electrolytics (usually the "large" capacitor in a bypass network) typically have high ESR, and don't reject high-frequency noise that well because of it. The smaller ceramics typically have very good ESR values, but, being small, they can't attenuate low-frequency noise that well. Thus, you often use two ore more capacitors where clean power is a concern.

>> No.2645116

>>2645017
Doing more than the minimal stuff in an interrupt is just begging for strange bugs to happen. I was supporting a relay board that did its logic in the comms interrupt (the previous guy's decision), and after two years or so it became evident that it would rarely not change the relay, but think that it had. This is not desirable behavior when controlling room lights.
I ripped out the smart-ass interrupt code and replaced it with a standard input buffer handler and foreground logic. Not only did it stop failing, it was also ~500 bytes smaller out of a nearly full 4K flash. And it was much simpler than trying to debug that trash.
Unless you need sub-millisecond response, don't put anything complicated in an interrupt handler. just use the timer interrupt to increment a milliseconds counter, and have your foreground code do the smart stuff. Then do a wait-for-interrupt at the end of the main loop to sleep until the next timer tick.

>> No.2645209

>>2645017
I’ll never understand what drives people to do absolutely everything in the microcontroller.

We got guys here with 2GHz “microcontrollers” that do simple filters with DSP instructions and tons of ram when all they ever needed was a capacitor and an inductor to make a real filter.

Just tee off the clock with a divider and add a shift register to control the nixie tubes, you’re probably already using a driver chip like a ULN anyway.

You probably need a 100MHz mc just to bit bang something like USB 1.1

>> No.2645212

>>2645116
Huh. That's interesting to think about but I don't think it's very applicable to me.

>> No.2645218

>>2636480
Why not SPI?

It's a simpler protocol than I2C and wiring only gets complex with multiple slaves so if you're only using one there's no issue

No flow control (unless you count chipselect line) but you can easily program that in with an interrupt line especially if you're bit banging

>> No.2645258

>>2645209
It's going to be a watch, and I'd like it to be able to act as a timer and stopwatch as well

>> No.2645440

>>2645258
>a timer and stopwatch as well

why stop there?
make it an event counter, step counter, frequency counter, geiger counter, pulse meter, blood pressure meter, electronic scale, RPM counter, and kitchen counter-top.

>> No.2645460

>>2645440
Uh oh, the stinky euroid is pissed that I had a reasonable answer

>> No.2645492

>>2644898
Unless you know the details well, you can't. But you can download the tools and try to synthesize a design for a chip. It will tell you whether it works, how much of the chip is utilized, and at what frequency it can run. You don't need the actual chip for that.

>> No.2645626

>>2645258
Watch? Using nixie tubes?
I don’t even wear a watch ever since cell phones were able to tell time when I had a startac, and then a timeport.

Even the original digital watches used red led readouts. You can still buy battery operated push-to-show led clocks.
> stopwatch
I think I’ve had stopwatch functionality for decades, like on my timex marathon, and iphone. In 30 years I’ve maybe used any of them once.

If there’s a market for this stuff, maybe I should make a flip display watch. It’s only going to be .5kg and run off AC mains. But hey… it’s cool retro!

>> No.2645641

>>2645626
https://metrovideogame.fandom.com/wiki/Metro-Made_Watch?file=Artyom_watch_MLL.png
>never used a stopwatch
Let's see what that wrist looks like, fatbody

>> No.2645661

>>2645626
>.5kg
Why are Europeans so devoid of any joy
Has the decades of importing third world shitskins and being told to love it by the international banking community really taken this big of a toll on your lust for life and beauty?

>> No.2645683

>>2645460
>stinky euroid is pissed

nobody's pissed, dumb-dumb.
the point was that once you've created a basic counter or gated-counter circuit, a bunch of extra functionality can be added, often with just a switch or an extra NAND gate.

>> No.2645767

>>2632544
Quick question. I bought a A/C unit that came with wifi. I was lucky enough that its simple to disconnect the usb dongle.

Are any types usable for a arduino? Its a Smart kit kit (2x) intelligent from a Midea A/C unit.

I imagine it either locked to this unit or something; but reflashing?

>> No.2645770

>>2645767
Added the QR code doesnt open a website.

>> No.2645810

>>2645767
>I bought a A/C unit that came with wifi.

bad choice.
any frivolous feature you add to an appliance is something else that can break, and thus reduce its life expectancy.

>> No.2645814
File: 540 KB, 827x745, Screenshot_2023-07-09_17-40-51.png [View same] [iqdb] [saucenao] [google]
2645814

>>2645810
>any frivolous feature

not frivolous sir or mam

>> No.2645857

>>2645810
Lucky for me, once you open the front cover you can pull out the usb wifi receiver.

>> No.2645904
File: 135 KB, 1024x1024, 1680277569856882.jpg [View same] [iqdb] [saucenao] [google]
2645904

>>2645814
>oy vey this man said the nigger word online
>set his AC into overdrive, freeze this goyim and his family to death

>> No.2645906

>>2645904
Wasn't there such a story weeks ago? Some nig deliveryman thought a nog said the no-no n-word but actually it was the automated doorbell or something and no nigger was screamed out.

>> No.2646118

>>2632544
Got me a bunch of Attiny 85 chips, been programming C for a few years now and know my way around an arduino.
Also, I know my way around analog audio electronics, including toobs.
Any ideas on projects to learn how to use the AVR chips?

>> No.2646122

>>2646118
Put anything associated with Arduino in the trash.

>> No.2646129

testing

>> No.2646135
File: 19 KB, 991x235, handle_reboot.png [View same] [iqdb] [saucenao] [google]
2646135

>>2646129
beyond gay

Whatever. Can anybody tell me what's wrong with this function? It's supposed to cause my SAM4E MCU to perform a software reset.

>> No.2646165

>>2646135
|= does clear bits, it sets them or leaves them as is.
use &= 0 instead if you want to set to 0

>> No.2646181

>>2646165
And by that you mean doesn't clear bits

>> No.2646183

>>2646165
I actually think I need to set the key to change WPEN, so it would be

*sysc_wpmr = (0x525443 << 8) & ~1;

where 0x525443 is the value of the SYSC_WPMR key. Still not resetting though. Annoying.

>> No.2646197
File: 85 KB, 1145x814, Screenshot_2023-07-10_12-32-42.png [View same] [iqdb] [saucenao] [google]
2646197

>>2646135

I don't see the error, but why are you writing 15d = 0b1111 to rstc_mr in bits 14..11

Not that it does anything per pic related. Or am I confused.

>> No.2646206
File: 25 KB, 929x381, handlreboot.png [View same] [iqdb] [saucenao] [google]
2646206

>>2646197
that should be 8, not 11. my bad. Here's where I'm at now.

>> No.2646249

>>2637124
>>2637308
CS now = programming
EE now = programming + you use an Arduino
I'm in ECE at uni and fewer than 20% of us care about VLSI, VHDL, or analog

>> No.2646278

>>2646249
>EE now = programming + you use an Arduino
EE can't be this easy.

>> No.2646337

>>2646278
EE has always been the easiest.

>> No.2646358

>>2646181
yes i mistyped

>> No.2646949

Want to build my own mouse, I saw in a tutorial that I can put a clicker opposite side of the rotary encoder to make the scroll wheel clickable but I also want to add a tilt click, so the scroll wheel has 3 buttons. Is there a rotary controller that has this built in or do I need to try to fit 2 switches on each side?

>> No.2647047

>>2646949
Might be easier to put two switches on the one side of the scroll wheel, diagonally oriented. One for a forwards-down push and the other for a backwards-down push. For sideways pushing you may be able to get away with just two buttons total and using both being pushed at the same time as a sign that you're doing the standard middle-click, but it's kinda janky. 3 or 4 buttons would likely be required, and if you're using buttons above the shaft it will be hard to fit them in the housing without some sort of bell-crank mechanism.

Use a trackball instead of a wheel.

>> No.2647056

>>2647047
I actually might go with a joystick as my scroller. It seems like it will do everything I need and not require me to make some janky frame

>> No.2647223

Am I wrong for thinking that speech to text should be done in a raspberry pi zero(like) and not an arduino(like)? Seems like an arduino would be pushing it to its limits.

>> No.2647232

>>2647223
using anything with DSP hardware will work

>> No.2647233

>>2647232
Well my idea was kind of speech to text to speech using first aws polly and then aws transcriber. I don't think the arduino could handle it. For starters it would have to store sound file in its memory.

>> No.2647245
File: 16 KB, 171x168, speaker.png [View same] [iqdb] [saucenao] [google]
2647245

Is it possible to hook one of these little guys up to a breadboard connected to a Raspberry Pi without needing a "speaker amplifier module"? I feel like it would save me some trouble. I thought the speaker amplifier module acted as a DAC but apparently it just amplifies the speaker for a little bit better sound, but that's not my concern right now.

>> No.2647257

>>2647245
if you have a regular raspberry pi you can probably just plug the 3.5 mm stereo cable in there

>> No.2647267

>>2647257
I mean I do but I just want to see if it would work.

>> No.2647268

>>2647245
If you're talking about the "speaker amplifier module" I think you are, then it's a single-pole low pass filter with a power amp chip. Designed to be PWM'd into, which as you might imagine is really shit for sound quality.

>> No.2647269

>>2647268
I probably should have posted the module number. PAM8403
From what I can see it's used to use two of these little speakers and I really only want to use one. It also needs another power module.

>> No.2647277

>>2647269
Oh that's a "filterless" class-D amplifier. It takes an analogue input, the output is high-power PWM but since it's going into a speaker it's technically not needing any filtration. Likely open-loop. I don't think the raspi can output an analogue value from a DAC onto its GPIO pins, but I'd double check that. I think you'll either have to use an external DAC or use the 3.5mm socket (or the nodes connecting to it).

If you just want to feed one speaker instead of two, just ground one channel's input and leave that channel's outputs disconnected. I'd check the specs of the raspberry pi to see if it's capable of driving your speaker impedance, then test it for loudness and for distortion. If it's 8Ω, chances are you need an external amplifier.

>another power module
Another what?

>> No.2647285

>>2647277
Yeah I believe it's 8Ω.

>Another what?
Apparently to power up the amplifier you need a breadboard power module. It seems a little much but it sounds like the amplifier needs more power than the RPi can offer. I'm using an RPi 4+ btw.

>> No.2647300

>>2647285
>the amplifier needs more power than the RPi can offer
Oh yeah that seems possible. Technically if you keep your RPi power usage down it shouldn't be an issue, but an external power supply is never a bad idea. Doesn't have to be a "breadboard power module", it could just be a USB cable with the end chopped off and soldered onto a length of double-row pin header. That's what I did, plus a bit of epoxy for strain relief.

>> No.2647305

>>2647233
> aws
Yes, everything should go through aws to ensure the government gets a copy of the sound and the text transcription.
A raspberry should be capable of doing the STT itself. An arduino, no so much.

>> No.2647312

>>2647300
I was hoping to skip the amplifier entirely but it seems like it may not be possible.
Now I'm wondering if I can use the amp without the extra power but I have a feeling the amp draws more power even without both speakers. Though like you said if I'm not using the amount I could maybe get away with it, but I don't want to damage my RPi either.

What USB cable did you use? Just some random one you found laying around unused?

>> No.2647315
File: 257 KB, 537x456, E942B5D8-B3C5-4186-AE8F-DBED82B6973F.jpg [View same] [iqdb] [saucenao] [google]
2647315

>>2647245
I just use one of these picrel guys i pulled out of my shitty dell pc at work because the beeping it made when it rebooted itself and couldn’t start was annoying everyone.

Anyway, it’s got a little amplifier chip on it, like a surface mount lm386 or something.

This speaker is only about an inch or so long, I’m not sure what size yours is.

>> No.2647321

>>2647312
>Just some random one you found laying around unused?
Yeah, though it was just a cheap little power only cable that must have come with something, since it only had two wires inside.

>> No.2647342

>>2647321
So why do I exactly need another power supply for the amplifier? It seems to take up to 5v, yet I see everyone using a battery, usually a 9v, to help power it on. Why can't the RPi do power the thing itself?

>> No.2647354

>>2647342
Because the Raspberry Pi's maximum current draw is right up against the limit of the PSU it comes with. If the PSU is 3A, and the pi draws 2.9A, then the amplifier will only be able to draw 0.1A before the PSU shuts off. But that doesn't mean the Pi needs to always draw that much power. There should be a variety of techniques for reducing the power consumption of the Pi, like turning down the clock frequency, disabling cores, maybe using a lightweight operating system would help.
The PAM8403 is a 3Wrms amplifier, or just 1.5Wrms per channel. That's only 0.442Arms, or 0.625A peak that you have to worry about. So if you have a headroom of 0.7A that the Pi isn't using then it should be fine to use the Pi's own PSU to directly feed 5V to the amplifier.

As for voltage, the absolute maximum voltage of a PAM8403 is 6V. I've no clue what these people are doing when they give it 9V, maybe they're using different chips like the 12V PAM8610, or else they're using a buck converter or linear regulator.

>> No.2647362

>>2647354
I'm going to use some more hardware for what I'm doing so I guess I might need the battery in that case. Maybe I ought to find a beefier power supply for the RPi.

I'm guessing a 9V is just easier to hook up and it gives a lot more headroom.

>> No.2647367

>>2647362
If you're going battery, you might want to look into powering the whole thing off an 18650 or lipo. The amp will run off that no issue, though I'm not sure if the Raspberry Pi's onboard buck converter will run from that low a source. Pretty sure you can get shields that let a raspi run off a lipo, wonder if they have a built-in boost converter?

What's the project anyhow?

>> No.2647862

>>2647305
I ended up going with the radsxa zero but it was a msitake because it only has one usable usb port for the usb sound card. Halp. Should I get a raspberry pi 3 b+ instead?

>> No.2647873
File: 161 KB, 1264x800, what the fuck.png [View same] [iqdb] [saucenao] [google]
2647873

I think I'm retarded, I can't get my ATtiny214's TCA0 working for PWM at all. Both when running off the dual-slope example (for the mega4809), and when running directly off the 214's datasheet. For a while I could only get channels 2 and 3 to PWM, and even then it was kinda strange that how they acted. Now I can't get any of them to work. And manually setting used to work for all pins, now it only works for pin 1. I'm going to assume this MCU is fucked and get another, to use lower value resistors with.

>> No.2647876
File: 2.39 MB, 1046x796, 2023-06-02-104619_1046x796_scrot.png [View same] [iqdb] [saucenao] [google]
2647876

can anyone recommend some semiconductor manufacturers to work for in the north-eastern united states? looking for a place that treats their employees well and has a good outlook.

currently at Intel, which is good, but I want to move to north-east US. Open to either working in a fab or also the engineering side of things

>> No.2647983

>>2647876
Why would you want to move to the NE? Unless it's Vermont or Maine so you don't have to be around black people

>> No.2648027

>>2647983
What about NH?

>> No.2648167

>>2648027
New Hampshire? More like New Clamshire! Am I right, fellow seafood enjoyers?

>> No.2648307

>>2647983
yes i want to set up roots somewhere so that my descendants can avoid the inevitable machete massacre of whites that will happen in their lifetime

>> No.2648341
File: 22 KB, 512x100, analogwrite.png [View same] [iqdb] [saucenao] [google]
2648341

>>2647873
>this bullshit works flawlessly
>but i can't change the frequency
i hate it

>> No.2648363
File: 25 KB, 1430x192, ATtiny214 bullshit.png [View same] [iqdb] [saucenao] [google]
2648363

>setting WGMODE to 111 properly turns on PWM to PB0, PB1 and PB2
>setting it to 101 turns only PB0 and PB2 on
>setting it to 110 turns only PB1 and PB2 on
>setting it to 011 turns only PB0 and PB1 on
>setting WGMODE to 111 and setting all comparator enable bits still turns on all three PWM channels
>it's always single-slope PWM so long as WGMODE bits are 111
What the fuck, they moved one bit field and invalidated the other.
>not fixed in the most recent (2020) datasheet
>nothing in the errata
Guess I'm submitting a bug report.

>> No.2648464

>>2632864
no analog read? you could read all from one or two pins w/ interrupt
pictured circuit wont notice any extra button presses before release

>> No.2648624

>>2643442
you won't win any prizes dead-bugging modern MCUs. decoupling caps are important and need to be physically close, inductive effects need to be minimized, etc, etc.

if youre dead-set on doing everything yourself i wholeheartedly recommend grabbing an atmega328p in DIP form factor.

>> No.2648626

>>2641993
some mentally ill schizos put together a javascript runtime for MCU environments, may be "interesting" to look at

>> No.2648630

>>2641981
>How do I get into the microcontroller world?
by not jumping head-first into the deep end, grab an arduino and try doing bare metal programming on that (avr-gcc + avrdude + the official atmega328p datasheet is *all* you need)
after that you can graduate to stm32 (which has very good software support and mindshare in ee community)
rp2040 is honestly not great for beginners imo, its a complex piece of kit. multicore, off-chip flash, no IDE to speak of ("heres the SDK and a CMakeLists.txt, go figure it out lol"), etc.

>> No.2648634

>>2642080
if youre trying to program a pic chip, just get a pickit clone, they are usually quite cheap.
you dont need the latest pickit: the PIC18F2480 is listed as a compatible device for the pickit 2.

https://ww1.microchip.com/downloads/en/devicedoc/pickit%202%20readme%20v2-61-00%20(a).txt

>> No.2648636

>>2635823
Sellers on Aliexpress buy a large amount of rejected chips for a penny and sell them to you at a discount. that's why

>> No.2649022

>>2648634
Not that anon, but that's a good resource. I just got some PICs here: >>2644827. I just now realised that the PIC16Cs included have OTP memory, not flash. And the PICkit 2 supports the 16C711, while the PICkit 3 doesn't, which is strange. Neither support the 16C63A. I also have a PIC32MX110F016B and a PIC24F08KL302, which neither the 2 nor the 3 say they can program, so I'll have to hack together some sort of programmer anyway (or buy an official Microchip programmer).

>PIC16C711
>1.75kB progmem
>just 1 8-bit timer
>just 8 bits of ADC
>no I2C
It's a lot worse than an ATtiny13. Still probably going to find some use for it though.

>> No.2650321

I have a 12v autopilot controller that drives a motor using 2 wires and a 12v pwm signal in both forwards and reverse by changing the polarity. I want to fit a bigger ram but the manufacturer says that I could burn out the the controller. Since it's pwm I can't drive it using a relay. What component would the equivalent to a relay but for PWM?

>> No.2650603

>>2650321
solid state relay

>> No.2650665

>>2650603
How could I wire them so that I could get both forwards and reverse by changing the polarity? Would I need to use two diodes and would I need a resistor to stop the controller from frying itself. I've not got a huge amount of electronics knowledge and haven't built something like this from scratch before. Would the rapid switching not fuck the relay up?

>> No.2650682

>>2650665
>Would I need to use two diodes
At least two, some diode arrangement would work to get a useful signal from the controller's forward / reverse polarity output
>and would I need a resistor to stop the controller from frying itself
That doesn't seem necessary, this question sounds like beginner electronics LED thinking. If you're using the controller to drive solid state relays it's not going to burn itself out.
An H-bridge is the usual way to drive a motor with reversible polarity, look that up.
>Would the rapid switching not fuck the relay up?
Solid state relays handle rapid switching

>> No.2650698

>>2650665
maybe you should ask /ohm/ about an electronics question?

>> No.2650704

>>2650682
I am very much a beginner, I really appreciate the help. From my understanding I'd be switching S1&S3 relays with a diode going one way and S2&S4 with diodes going the other?
>>2650698
I've asked in both and got some very interesting information. This lies halfway between the two threads really

>> No.2650961

Is anybody here experienced with FPGA's? I am trying get a blinky project going on a new FPGA from Efinix and during the creation of a GPIO bus I have to enter MSB and LSB fields. What do these values refer to? The size of the bus is defined by the size you enter, but why would you need two values for that?

>> No.2650966

>>2650961
>MSB and LSB
Most/Least Significant Bit, maybe it's about the bit order?

>> No.2650976

>>2650966

New to FPGA's as a whole, so what would bit order mean in this case?

I am familiar with GPIO buses in microcontrollers, and I know what the abbreviations stand for.

To give an example, entering MSB = 4 and LSB = 2 creates a bus with the contents pin[2], pin[3] and pin[4]. Entering MSB = 2 and LSB = 4 gets the same output. Kinda feels like whatever highest value you enter becomes the MSB. Still good and all, but why would you ever want a bus that looks like pins[4:8] instead of pins[0:4]? Why doesn't a single value for the bus size suffice?

>> No.2650985

>>2650976
What is a GPIO bus at all? Is it just a pinout for some standard bus, maybe even a hardware block to support it? All I've seen are vendor specific methods to map pins to Verilog inputs and outputs, but they all used single pins.

>> No.2650988

>>2650976
No you retard. The order of the bits depends on which side is which.

>> No.2651086

>>2650985
> GPIO bus
I doubt a microcontroller could even manage a VMEbus. S-100 maybe. FPGAs would have less of a problem.

>>2650988
MSB is also “network order” and is the only legitimate arrangement. The fact that LSB exists is one of the most embarrassing repeated technical fiascos the industry has ever endured in the last few decades.

Well, that and the “harvard architecture”… Ugh.

>> No.2651372

>>2651086
>defending big endian
Die.

>> No.2651418

>>2635565
basic hotair like 858D can be had for 40$ or less if used. This really is not significant cost and you will need one for embedded dev work anyway at some point (unless you are one of those THT-FOR-LIFE oldimer luddites), might just as well buy right tool already

obviously this might be not enough for pro electronics repair, but for embedded dev I dont see myself replacement it any time soon. if it is good enough for goddamn jay carlson it will work OK for you too

>> No.2651428

i want to make a small keypad with magnetic analog input switches, but i see a lot of different hall effect sensors, what hall effect sensor would be the best for that?

>> No.2651554

>>2651428
A digital "hall switch", not an analogue "hall sensor". The former's output is either on or off, the latter's output is a continuously variable function of how strong the magnetic field is. Which would be a lot harder to make a keypad out of. That said, if you have enough analogue comparator pins and want to mess about with analogue multiplexer ICs, then it could maybe be a neat method of having variable buttons (e.g. for synth keyboard modulation, or steering/throttle in a racing game). Not recommended for noobs.

>> No.2651566
File: 113 KB, 1536x2048, 358256057_1349326152340746_8943939880784912523_n.jpg [View same] [iqdb] [saucenao] [google]
2651566

I got a Toshiba bluetooth Subwoofer for free without the sound bar or remote, it has no input jacks just a bluetooth link button that apparently only works with sound bar

Can I bypass the bluetooth module if I solder an RCA cable directly into the right channel, left channel on the PCB and connect that to an AV receiver

>> No.2651613
File: 13 KB, 372x136, dUntitled.jpg [View same] [iqdb] [saucenao] [google]
2651613

>>2632544
-Isn't there a way to turn any mobile telephone into a low level access like the arduino,beaglebone,st32, and the myriad of development boards? (years ago fiddling around with the 2nd gen arduinos and some cortex m4 with embedded c), but now the rapsberrys have come to be too expensive (for whatever use you do with it) and most of the mobiles are at least the same power processing than it, so perhaps it's easier to turn the phone into a development board more capable and extensible than picrel.

Thanks inb4!!!

>> No.2651620

>>2651566
> bluetooth
You’d be doing the next owner a favor by de-bluetoothing it.
I’ve never had a bluetooth audio device that didn’t cut out periodically. Or was supported on my phone or laptop at the time. Or, if you have an iPhone, ever.

Bluetooth was designed to replace mice and keyboards and hardly ever works very well on those let alone high bitrate audio.

Looks like a separate class d amplifier so i’m guessing these are the unamplified “line out” channels from the bluetooth module. Might work. I would poke around with a signal through a 10k resistor first. Then maybe a 1k.

The txd and rxd worry me, might have volume, tone, and balance done through proprietary bluetooth nonsense (the main purpose of bluetooth)

>> No.2651627

>>2651428
> Make
>>2651554
> Analog vs switch

The hall switch might not work very well in your keypad unless you can custom fabricate magnets. This is a harder problem than you can imagine.

Since you’re going to use off-the-shelf magnets you probably do want the analog version so it can be tuned to switch on/off at a certain field strength and to account for various manufacturing variances.

How are you making the keys, anyway? Are you going to slam the magnet into the hall effect sensor, or is there going to be another mechanical action?

My suggestion would be to use a capacitative system, which could, in theory, also last forever and be hermetically sealed. Some μCs have capacitative inputs already that might be adapted for that use.

>> No.2651635

>>2651372
He's actually right, big endian really is superior on a technical level.

>> No.2651653

>>2651613
>so perhaps it's easier to turn the phone into a development board

it's not in any way easy coz all the IO is missing, and the OS would require a complete re-write.

>> No.2651661

>>2651635
>big endian really is superior on a technical level.

more importantly, it makes sense to humans living in 2023 (not 2320)
if address 0x1000 shows up in source code as 0010, it's coz some designer has escaped his padded cell.

>> No.2651669
File: 9 KB, 400x400, magnetic switch.png [View same] [iqdb] [saucenao] [google]
2651669

>>2651566
Almost certainly, though you'll need to disconnect the bluetooth audio. There may also be some status or communication pins required to activate the downstream circuitry, but I imagine that will be pretty easy to spoof with a shitty little 8-bit micro if you can find the datasheet.

>>2651613
No real GPIO, though there may be ways around that by bit-banging through where peripherals are normally plugged in (e.g. screen, camera, sensors, etc.). They're closer to a raspberry pi replacement, and I see some people using old droid phones for things like Klipper, a 3D printer monitoring firmware(?). An andriod TV box is also a possibility, if you can get an HDMI output from the USB.

>>2651620
BT4.0+ is definitely a spec designed for audio, though it isn't without compromise. Modern TWS earbuds are about as close to plug and play as you could hope, assuming they have non-chinesium chipsets.

>>2651627
>The hall switch might not work very well in your keypad unless you can custom fabricate magnets
Simple method: adjust the vertical position of the magnet embedded in the keycap using paper shims and super glue. Better method: if you design the geometry properly, you just measure the zero-crossing point of a horizontal magnet moving past a vertical hall sensor, so there's a lot of tolerance with alignment. Pic related.

>> No.2651674

>>2651669
>>2651653
Then basically the idea would be to know the GPIO address?
Is there a way to access in assembler mode (l just read a bit, isn't supposed the adb does it)?
Let's say I have the same arm thingy in a development board than a phone, and I know the address of something common to the two devices (a microphone by example).
Isn't suppossed to be the same addresses in bot systems (assuming they have the same resources).
Isn't a way to get the phones in service mode?
Like the switches/hubs in with the rs232 ports?


Thanks btw!

>> No.2651727

>>2651674
Okay, i think i get your question. And no, there’s no general way to do it on all phones.

Phones are variously locked by software keys preventing unsigned code from getting easily loaded without exploiting specific bugs.

I have an old LG symbian phone that runs java applications, and there is no way I know of to load machine code on it and run it.

So, on iPhones and Android phones, you can just write an app. On android you can actually write the app in C or assembly and appropriately wrap it with the java prologues so it can get loaded and executed. There’s your “low level” but it’s not at ring 0 or whatever, no real need to displace the OS and/or firmware… you’re gonna want the drivers that come with the OS.

GPIO could be done with a USB breakout device or even bluetooth, or even through the audio output jack and de/muxed. Just some ideas there.

>> No.2651731

>>2651669
> spoof with a micro
Wouldn’t it be nice if you could send a +++ATSV50 thru the UART’s tx and rx?… with SV being the Set Volume command. Oh, standards.
Sorry to those old guys that just dropped off the net trying to read this message.

>> No.2651732

>>2651731
I mean I'm a zoomer and I got no clue what you just said. Sounds fun though.

>> No.2651737

>>2651635
I remember intel made a comment in a trade journal explaining their rationale for using little endian (this was in the late 70s or early 80s) which was weak even back then, having to do with some limitations of the memory bus and interleaving? of the memory lines. I can’t recall the exact quote. These limitations were gone in later processors but all had to be kept for backward compatibility. Forever. Nice eh? And here we are.

Itainium could be big or little endian (since it can depart from backward compatibility). The i960 could also so some big endian stuff so it would be useful as a network processor without manually re-arranging and swabbing everything which was, at best, a 4x performance hit.

>> No.2651739

>>2651732
In the good old days, you connected to your modem via the terminal e.g. procomm or telix and you would type ATDT <phone number> to tell your modem to dial into another computer over the telephone network. There was a veritable plethora of other commands, and they were largely standardized on the hayes smartmodem.
Watch the movie “wargames”
I still have my ally sheedy poster on my wall. Thinking about moving out and getting my own place soon.

>> No.2651753

>>2651635
No it's not. The only reason you like it is because humans write numbers in the wrong direction, because of the Arabs. The Arabs aren't to blame, their entire writing system is right to left. Little endian is superior because you can cast uint32_t* to uint16_t*, and you still get the lower part of the number when dereferencing it.

>> No.2651764

I was thinking about just buying a PICkit 2, but I saw the schematics and code was freely available and figured it might be a fun project to make one. I've got a PIC18F4550, which I think is very similar to the PIC18F2550, which is found in the PICkit schematic. I won't have a problem programming it, thanks to this guy's repo:
>https://bitbucket.org/JoseFuzzNo/arduino-as-pic18f-programmer-for-linux/src/master/

But can I take the existing code for the PICkit 2 and put it on the 18F4550? The download from microchip's website is just a .hex file, and there isn't any text describing which micros it's compatible with. Does anyone more familiar with PIC programming know if this firmware will work? If not, I'll either have to look for someone else's .hex file for the 18F4550, someone else's uncompiled pickit 2 code that I can compile for an 18F4550, or try to modify the .hex file by decompiling it, editing it, and recompiling it.

>> No.2651775

>>2651554
ohh yeah a multiplex with that i only need one analog pin for something like 16 x Y keys and make it focus on the pressed key when it detects a change, umm but then i couldnt press more than 1 key, i guess i could just save the values of each key and update them in each cycle.
i dint really wanted that many keys i think i can use individual analog pins for each one,

>>2651627
i was thinking on using normal mechanical switches open it and glue the magnet inside remove some plastic if it have to, the sensor i was thinking on just placing it under the key.

>> No.2651804

>>2651753
You are crazy amounts of new to programming. You don't even understand the most basic aspects. Please refrain from posting until you've learned at least the essentials.

>> No.2651810

>>2651804
>You are crazy amounts of new to programming.
Already ad hominem and assuming things you can't know. No arguments in sight.
>You don't even understand the most basic aspects.
Like which?

>> No.2652221

>>2651764
That's the problem with PIC, they have so many different instruction sets, but at least that usually goes along with the prefix (like PIC18). Then it still depends on having the same I/O units at the same address.
At least you have the hex code, so it's possible to disassemble it. The architecture is such a mess that the original likely wouldn't have been in C anyhow.

>> No.2652812

>>2652221
>sifting through 93kB of hex-turned-assembly
That doesn't sound fun at all. Assuming all the registers and such are the same between the two micros (I'll compare the datasheets later) I think the best method is to write some shitty ASM code, and compile it for both the 2550 and the 4550, then decompile both and look for differences. Pretty sure I can run XC8 from my command line.

>> No.2652860

>>2652812
93K? Even if you're talking about the doubled size of the .hex file (in ASCII being 4 chars per word), that's a fucking lot in a crappy PIC instruction set, holy shit. At some point, using PIC for that size of code has to be considered self-abuse.
At least in the end they went with a half-decent architecture (MIPS).

>> No.2652928

>>2651753
>its better to write numbers from right to left so that it makes sense when you read it left to right
am i reading this right

>> No.2652960
File: 134 KB, 1064x492, on off swtch to cut off power.png [View same] [iqdb] [saucenao] [google]
2652960

Smart sirs, would this work? It should work right?

>> No.2652965
File: 61 KB, 1064x492, (you) are a retard.png [View same] [iqdb] [saucenao] [google]
2652965

>>2652960
If what you want to do is test your power supply's overcurrent protection, then I guess it works.
If you want to turn the circuit on and off with a switch, then you need to wire it so that one contact is connected to the power supply and the other is connected to your device(s). Picrel.

>> No.2652975

>>2652965
Doesn't the switch need ground?

>> No.2652979

>>2652975
Read the filename

>> No.2652984

>>2652979
That's why I'm asking you.

>> No.2652990

>>2652975
No. No, they don't. You can set it up at the negative side if you want to, but it makes no difference in your application.

>> No.2653093

>>2652979
>>2652990
I did it and it works great except I should have used a breadboard.

>> No.2653094

>>2653093
Well done anon, now you know how switches work!

>> No.2653108
File: 120 KB, 660x746, hex.png [View same] [iqdb] [saucenao] [google]
2653108

>>2652860
Yeah and it's all full, bar the last 3% which is just likes like this:
>:107FE000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1
>:107FF000FFFFFFFFFFFFFFFFFFFFFFFFFFFF5555E5
Which I assume are noops. That's 45 bytes per line, I think, which is odd. Though there's one much shorter line:
>:107FF000FFFFFFFFFFFFFFFFFFFFFFFFFFFF5555E5
>:0200000400F00A
>:100000000001FA83FFFFFF01FFFFFFFFFFFFFFFF7C
That's only 17 bytes long.

The colon may not be the start of each line, I didn't even know a hex editor could display colon characters but I guess it's in ASCII. It has a 0D 0A 3A all together, which are carriage return and line feed then the colon, but it's not aligned with the rest. Maybe I shouldn't try to interpret .hex files.

>> No.2653127

>>2652960
How much did your mom drink when she was pregnant with you?
You should ask

>> No.2653130

>>2653127
Shut up faggot.

>> No.2653135

>>2653130
That... answer the question suitably I reckon.

>> No.2653137

>>2653135
*tips fedora*

>> No.2653156

>>2653130
Touchy subject, huh?

>> No.2653185

>>2653156
No.

>> No.2653339

>>2641987
you have to tell it to use the ethernet port.

>> No.2653342

>>2644388
Hey anon I have experience. what PLC brand?

>> No.2653343

NEW THREAD
>>2653338
>>2653338
>>2653338
NEW THREAD