[ 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: 21 KB, 625x529, PICmin.gif [View same] [iqdb] [saucenao] [google]
2463383 No.2463383 [Reply] [Original]

Previous thread:>>2440483

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, Raspberry Pi, Pi Picos, 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.

>project ideas


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

>> No.2463602

Not sure if this is the right place to ask but how do I limit current without troonywasting power like a tranny?

>> No.2463648
File: 182 KB, 363x312, abrick.png [View same] [iqdb] [saucenao] [google]
2463648

what is the cheapest way to upload code to a breadboard circuit? i want to monitor the voltage across a microphone and when it crosses a certain threshold i want to open a circuit

>> No.2463655

>>2463602
With a switching converter.

>>2463648
Why do you need code for that? Just use a diode some passives, and an LM393. Maybe an op-amp if the gain is too low.

>> No.2463745
File: 57 KB, 1024x576, glowy.jpg [View same] [iqdb] [saucenao] [google]
2463745

>>2463648
ask pic related

>> No.2463861

>>2463745
its a mouse trap
>>2463655
thanks anon. im gonna have to use an arduino or something to monitor the voltage levels, but yeah a comparator will work once i know my threshold

>> No.2464149 [DELETED] 
File: 2.53 MB, 4000x1800, 20220910_194314.jpg [View same] [iqdb] [saucenao] [google]
2464149

Anyone aware of people i could comission to make a system for me in the uk? I made a set of swivel lights for my truck with a servo tester and some servos but now theyrr fucked.. beyond wiring im lost. I want them on stepper motors this time round.

>> No.2464289
File: 414 KB, 1000x561, file.png [View same] [iqdb] [saucenao] [google]
2464289

>>2463383
I just started to get interested in electronic stuff. i bought a soldering iron, protoboard, and already have a project ill work on, is kind of a big and complex one (a functional cheap cubesat, at least the electronic stuff,), im talking about redundant systems, solar power, camera, sensors, etc. I was thinking on using a small cluster of 3 VoCore boards because of their size. And it may be a retarded question, but i want to know: Do all the SBC work correctly with any microcontroller? like arduino,Nodemcu v3? also, does the arduino modules work with other alternative microntrollers as well? I dont want to spend a lot more than i have to. What i mean is it possible to design a system with those different components?
Thanks in advance, and sorry for the possible strokepost

>> No.2464290

>>2464289
>i bought a soldering iron, protoboard, and already have a project ill work on, is kind of a big and complex one (a functional cheap cubesat,

no worries. everything these days is compatible. carry on my wayward son.

>> No.2464297
File: 3.52 MB, 1500x1500, file.png [View same] [iqdb] [saucenao] [google]
2464297

>>2464290
thanks, ill buy this thing to start too. I have a lot of stuff to learn but i think is good to have an objective to reach for.

>> No.2464303

>>2464289
What do you mean by "work with"? A common Arduino nano speaks UART through a USB-to-TTL converter, while a pro-micro speaks directly via USB. But they all also have hardware UART, hardware SPI, I2C, maybe one or two other protocols also. Most SBCs can speak at least some of those from what I understand, to the extent that you can often get away with using an SBC instead of a microcontroller if you know what you're doing. USB itself is kinda high-level for a lot of what you want to do with an SBC, though of course it also matters what operating system or direct firmware you're running on it.
The same applies to "modules", they're either analogue (need to pipe it into an ADC, on-chip or external) or digital, on one protocol or another. Cameras in particular usually use more specialised protocols due to the high throughput.

Also if you care about electronics in general, you should start with simple things like understanding how voltage and current and impedances behave, simple digital transistor use too. Things like logic levels and input/output impedances are pretty useful to understand when you get past simple 5V arduino modules and start designing your own shit.

>> No.2464346
File: 293 KB, 1800x1600, file.png [View same] [iqdb] [saucenao] [google]
2464346

>>2464303
these are the ports of the SBC im going to use. So i dont really need and arduino for that?, why in every rpi tutorial i see people conecting them to arduinos and then to camera modules then. If so, thats pretty good, less things to worry about.

>> No.2464399
File: 16 KB, 460x423, 1640068527241.jpg [View same] [iqdb] [saucenao] [google]
2464399

Anyone have any advice on efficiently figuring out timings on automating tasks? I am trying to automate a game task for a friend, and I can't seem to get the timing right. I know trial and error is an option, and I have been doing that, but I didn't know if anyone had any little tips or tricks that might help with it.

>> No.2464548

A dedicated MCU for a custom 50ish key matrix keyboard or should I plug it directly to the main MCU (RO2040)? Pros of the dedicated MCU (Arduino Nano would suffice): buffered keystrokes, less pins to check on the main MCU (I2C communication), individual testing and debugging. Cons: need to figure shit out how to wire them individually, two codebases to maintain. Pros of one MCU design: single program, easier to figure out. Cons: need to constantly check a shitload of pins, pico's memory is finite (I plan of using a large screen and so I need a framebuffer to hold the display memory), potentially missing keystrokey when the programm is busy doing other stuff.

>> No.2464552

I wonder if you could add a modchip to a macbook to spoof a chip address to make it think it has a real isl9240? or other similar cases.

>>2464346
The thing has normal GPIOs, I2C pins, three UARTs, also I2S if you feel like doing audio stuff. I2C is good for a lot of low-data-rate sensors, but for a camera you'll likely need something else. A USB-enabled microcontroller could use the USB pins to send higher-speed data to the SBC, note too that common laptop webcam boards are often just USB under the hood and pretty cheap too.
There's also the option to bit-bang other formats, but the viability of that somewhat depends on whether your OS is real-time or not.

>>2464399
No clue what kind of hardware or firmware you're talking about, but I can recommend using a logic analyser or oscilloscope to probe known-working tech before copying it for your own implementation, assuming the problem is trying to interface with a black-box of some sort. You can also write a program to iterate trial-and-error automatically.

>>2464548
Keyboard matrix memory should be really low on memory and CPU time as far as a 32-bit micro is concerned. Assuming you have enough pins (15 pins = 56 keys) left over for direct multiplexing. So long as you can to a quick scan of it every 5-50ms or so (hundreds of thousands of clock cycles) you shouldn't miss any keys or have bad latency. Doesn't need to be synchronous with anything either, unlike bit-banging some sort of comms protocol might be.

>> No.2464555

>>2464552
>enough pins
Dunno yet, need a 5-6 pins for display, some for SD card, I need to draw it manually to figure out. Would love if the Pico could do it alone. Thank you

>> No.2464583

>>2464552
I am trying to make a macro for a video game using an Arduino. Everything works except the timing is off. By the third loop, the variance is so much that it fucks up the whole loop.

>> No.2464806

>>2464583
use timers and interrupts instead of delays

>> No.2465170
File: 580 KB, 1080x2400, Screenshot_2022-09-12-14-47-05-67_40deb401b9ffe8e1df2f1cc5ba480b12.jpg [View same] [iqdb] [saucenao] [google]
2465170

So I want to make this interactive Bluetooth dildo a HID for a windows PC.

My first idea was to strip it and add an Arduino and intercept the two pressure sensors inside it.

Is there a more elegant solution to not ruin the insides of a 150€ dildo?

What Arduino code could I base this off? My first idea was a keyboard HID that just presses space, but I'd like to be able to adjust the pressure needed to activate.

>> No.2465172

>>2465170
Or maybe a joystick that pulls up depending on how hard you press, bonus if can vibrate

>> No.2465241
File: 18 KB, 816x718, 1635949162125.png [View same] [iqdb] [saucenao] [google]
2465241

I have a clock signal that can either be a pulled up input, or a push-pull output. I've checked and the output mode isn't open drain.
In either of these modes, the signal can either be 5V or 3.3V (depending on which device it is connected to). I have no access to the device's VCC pin to configure a level shifter properly.
The microcontroller I'm interfacing it with runs at 2.8V, so I need some sort of level translation. I want to be able to use both of these modes, with either voltage.

Using a MOSFET-based level shifter, like picrel, would work, by just leaving out the HV pull-up, since it's embedded in the HV1 pin when configured as an input. However, I'm afraid of situations where both pins are configured as push-pull outputs and driven high, since that's a situation that can happen (not even rarely, as I have no control of the HV side's state nor a way to check this), and would result in a short circuit.
Are there any transceivers that support a setup like this (or keywords I should look for)? I can only find the ones that require a VCC signal for the HV side, or ones that are still susceptible to shorting as they use the same setup as picrel.

>> No.2465266
File: 239 KB, 850x1020, __gawr_gura_hololive_and_3_more_drawn_by_yuyu5x__sample-24d567a7bb75298eb5c909c3fd1eae20.jpg [View same] [iqdb] [saucenao] [google]
2465266

>choose a chip for design without reading the errata

>> No.2465269
File: 246 KB, 480x542, 1641237903607.png [View same] [iqdb] [saucenao] [google]
2465269

>>2465266
haha yes

>> No.2465334

Can the Pi Pico and ESP32 S2 have as many simultaneous UARTs as needed through the GPIO pins?
>t. Still waiting for my boards to arrive

>> No.2465394
File: 41 KB, 1223x600, 1640640840131.png [View same] [iqdb] [saucenao] [google]
2465394

>>2465241
Ended up picking a device that does the equivalent of picrel. Both 74LV07A and 74AHCV07APWJ seem to fit the purpose just fine, with the latter having a schmitt trigger which is neato. I wonder if I could combine mcu_out and mcu_in into the same pin, but I'm sure that'd cause weird oscillations.
Does any of this look wrong to anyone?

>> No.2465585

>>2465394
Will dev_clock ever be asserted high at the same time mcu_out is low? If so you'll get the better part of 10mA getting sunk through R3. Otherwise it looks like it wouldn't destroy anything, though that upside-down mosfet is threatening to trigger my autism.

On that note, why do P-channel MOSFETs always import upside-down in LTspice and KiCAD? Maybe because they're more often used as high-side ideal diodes than as switches?

>> No.2465723

>>2465585
>Will dev_clock ever be asserted high at the same time mcu_out is low?
Fuck, this is the exact scenario I was trying to prevent by avoiding the setup in >>2465241. I'll add another 400Ω resistor at the drain of M1 to reduce the current (6.25mA) without making the low voltage level at dev_clock too high. At least both signals tend to rest high, so this situation should happen relatively rarely.
Is there really no way to do this without having states where it can short?

>> No.2465797

>>2465334
as a software implementation sure but you might be limited if you want to use dma

>> No.2465827

>>2464346
I thought that thumbnail was some edition of monopoly for a moment

>> No.2465831

>>2465827
Be sure not to land on the RST square or you'll be stuck there until someone pulls you up or you pay to get released.

>> No.2466001
File: 9 KB, 352x352, C214ABFE-379B-4373-81C3-6D0E44B93C50.jpg [View same] [iqdb] [saucenao] [google]
2466001

>>2465723
Would putting a diode in series with dev_clock to turn it into an open-collector + pullup signal mess with anything? Draw a truth table of input signals and desired outputs, should be able to work something out with diode-resistor logic from the Boolean point of view.

>>2465831
I’m going to build multi-storey capacitors on the AVDD power domain.

>> No.2466691

Have any new Wi-Fi modules been released over the past years that trump the ESP-01 in terms of accessibility and breadboarding? I want my design to feature an optional connector for a wifi module a user can buy and plug in without too much wiring.

>> No.2466865

>>2466691
No, but NRF modules have grown in popularity by those who don’t like being spied upon by the CCP.

>> No.2467001

>>2466865
Any recommendations? Ideally something that works with the AT protocol so I don't have to port code?

>> No.2468449

if I was asked to convert 0.238 to 8-bit binary, does the 0 count as a bit, or just after the decimal?

i.e. 0.0011110 or 0.00111100

>> No.2468463

>>2468449
I don't think it counts. Or rather, 8 bits would be in front of the decimal point and 8 bits would be behind it, in the case of a fixed-point decimal.

>> No.2468587

Microcontroller/programming newb here. How reasonable would it be to control a gate/garage door opener with your phone *in a reasonably secure way*? I know it's obviously possible with Bluetooth or WiFi, but is it doable in a *secure* way by a beginner or is it just not worth it? I've done a couple little Arduino and programming projects for classes before, but I've never done anything on my own. I'm kind of intimidated by the rabbit hole of doing it in a way that's not easily compromised by some rando.

>> No.2468632

>>2468587
>bluetooth
you can have it require bonding and have password / nfc to do the bonding.
>wifi
if it's just in your local network and not exposed to public it should be safe.

>> No.2468655

>>2468587
Considering that most of them have a simple dry-contact input between the receiver and the motor unit, it's easy enough to add in whatever you want. Security? Just don't do a simple fixed code in a one-way transmission that any nerd brat could sniff, but really, security though obscurity can work if you're obscure enough. If you can do a two-way challenge-response, that should be enough.
And don't forget about range. Bluetooth would be a bad idea because its range is only like six feet or so. Wifi depends on your distance from the other antenna. If it goes through a base station, that's how far your signal needs to go.

>> No.2468684

>>2468632
>>2468655
Thanks for the pointers, I'll look into those things. Honestly, aside from being a fuckin' nerd who wants to get better at electronics and programming, this whole thing is just so I can avoid carrying a fatass chinese remote keyfob

>> No.2469107

>>2465269
>>2465266
I w-wonder who would d-do something like that haha

>> No.2469231

I have a job interview next week and I need to pretend I know shit about embedded electronics, specifically in relation to heavy automotive equipment, any good resources?

>> No.2469277

>>2469231
university is a good one

>> No.2469282

>>2469277
Not him, but I've done this and I still don't know shit. What now

>> No.2469283

>>2469282
idk worked for me

>> No.2469323

>>2469283
Almost done with uni and I'm very worried about getting a job. I'm sure it'll get better once I get there and get in the flow of things but man I'm genuinely struggling to even figure out how to use transistors properly, I have no idea how I got this far.

>> No.2469324

>>2469231
You mean PLCs?

>> No.2469745

>>2464289
>>2464297
https://www.oresat.org/
You might find this interesting, it's a FOSS smallsat design team, and they have a flown model.

>> No.2469773

So if I want to program an STM32 without incurring the HAL bloat and obfuscation, I would use CMSIS?
Is CMSIS a library/header that #defines the registers and such, like the msp430.h headers for the MSP430?

>> No.2470175

>>2463602
You could hook a microcontroller to a MOSFET to control current to a circuit. The gate of the MOSFET doesn't draw current and it won't consume power when the MOSTET is turned off.

>> No.2470206

>>2469773
CMSIS is for the common stuff in the ARM core. It has nothing to do with anything unique from a specific chip or company.

>> No.2470232

I want to build turrets with camera. I know I need 2 motors for pitch and yaw, and be able to control the movement and see the video feed from laptop or a simple cable controller with monitor and joysticks/button pads. Later I'd like adding in some form of stabilization which probably need acceleration sensor but I don't know either they should be mounted on cradle or at the base.
I don't know how to select a microcontroller. only had projects with Motorola controller in assembly and peripherals in school two years ago.

>> No.2470246

>>2470232
For the electromechanical side I'd recommend going for brushless servos/motors with encoders, instead of stepper motors for quick acceleration.

As for a microcontroller, if it doesn't need to do video processing or recognition then you're likely fine using whatever. If you're making the MCU also do the motor control switching it may need to be reasonably fast in order to give a nicely sinusoidal driving pattern for smooth commutation, but even then I bet an 8-bit PIC or AVR or STM8 with a few kB of ram will do just fine. If you're reading from an acceleration sensor and doing math on the data stream at the same time as doing motor commutation you may need something a bit faster, but I still think it's still in the realm of a mid/upper-tier AVR.

If it's not too much hassle, figure out exactly what hardware you're using for everything but the MCU, see what kind of specs are required to communicate with it all. In terms of clock cycles and RAM, and in the actual timing of everything. With an external driver you'll just be updating the motor every 1 milliseconds or so, which with a 20MHz micro is 20,000 clock cycles, which should be plenty to read and write to the I2C registers and do calculations. On the other hand, if you do the 3-phase driving in the micro you'll need to run a timer and do manual interrupts on dynamically changing thresholds, while reading the pulses coming from the rotary encoder. I'm planning on doing all of that with an 8-bit AVR myself, but the more I think about it the more infeasible it sounds. It's probably possible but leaving all my problems to the firmware domain isn't good practice.

>> No.2470376

>>2470246
Thank you very much. I haven't think much about the frequency for the routine. 1ms/1khz sounds like a good starting point for hardware.
I have no experience with mc doing video processing, that might be a lot latter. Since camera films at 120/60Hz i reckon they are pretty out of the controller loop and should be placed higher up.
Id probably end up buying both type of motor just to know their characteristics.

>> No.2470515

>>2470206
>>2469773
Understood. I think what I'm trying to do is called "register-level programming". I was thinking that CMSIS provided the header files defining the registers and bit masks for manipulating them, but it seems those are in files such as "stm32f411xe.h"

I just want to have the bare sensible minimum running, and I'll take care of the rest (such as configuring clocks and such). I don't want to use the HAL because it reminds me of the arduino obfuscation shit I'm trying so hard to get away from

>> No.2470520

>>2470515
>I don't want to use the HAL
I know that feel, I'm still using their pre-HAL libraries that they had when I first encountered STM32 back in 2010. Some of that code was shit, though, like the I2C support. You can try looking for something like STM32F10x-StdLib, but they will be different for each major chip line, and I think they might have stopped making them by the time 32F4xx came out.

>> No.2470522

>>2470515
Try searching for
>STM32F4xx Standard Peripherals Firmware Library -stm32cube

>> No.2470558

>>2468655
>6 feet
incorrect. using bluetooth 2 i have been able to get two way encrypted communication working almost about 900m away. it all depends one what receiver antenna and output power youre using. in any case, even a chink receiver should receive blueooth more than 6 feet.

>> No.2470560

>>2470515
you realise that the hal gets compiled down and optimised to use registers anyway right? the reason you see bloat is because the hal supports more than just one mcu. the hal will support the entire range of controllers. stm32 is useless anyway since none exist so use something else.

>> No.2470584

>>2470558
Were you pushing a low SNR by using highly redundant/error corrected protocols? Or just brute-forcing with high power? I find the idea of sending small amounts of data at low power using a very narrowband RF setup and extreme error correction rather interesting.

Also what micro were you doing encryption through? I’ve seen some that hardware have that built-in.

>>2470560
Yeah, everyone knows that CH32Vs are the future.

>> No.2470608

>>2467001
it's a microcontroller with built in ble so find someone's firmware that implements at commands over uart.

>> No.2470623
File: 140 KB, 1500x1500, actuator.jpg [View same] [iqdb] [saucenao] [google]
2470623

Hey guys, I'm running into a bit of an issue with controlling some actuators and not sure where the cause is.

I have 4 of these actuators that I hooked up to 2 separate L298N controller boards (each has 2 outputs). I'm powering them with a 12v power supply and controlling them using an Arduino Nano Every (only microcontroller I had with enough analog inputs). The potentiometers on the actuators are connected to the 5v output on the L298N boards, and I've also made sure to connect the 5v output to the AREF pin on the Arduino board (and set `analogReference(EXTERNAL)` in code).

I want to keep the actuators in sync, but the problem is that I don't seem to be getting accurate readings from the potentiometers. When my code starts I measure each potentiometer and use that as a reference value to try and keep them all in line, but after I make them extend and retract back to their starting points they are giving different readings.

Any ideas on what might be causing this? Or at least some ideas on how I can determine what's causing this?

>> No.2470629

>>2470623
In addition to this, my thoughts are that I should either:

1. Get an external ADC (likely an ADS1115 since it has exactly 4 channels) and avoid whatever shitty ADC is built into the Arduino.

2. Use a separate buck converter (I have a spare LM2596) and avoid using whatever voltage adapter is on the L298N boards.

Any other ideas?

>> No.2470639

>>2470623
Why not measure the ripple you get on the different voltage rails when you switch the actuators? It would help narrow down whether the 5V regulator is the issue or not.

Also IIRC the AREF pin doesn't like being at 5V too much, consider using a 3.3V regulator (like the one on the arduino) for the pots and AREF. Either way I know you get better results if you keep the analogue inputs away from VDD.

>> No.2470778

>>2469323
Modern electronics courses seem to exclusively teach embedded programming.
Nearly all the electronics engineering graduates that have worked with me knew nothing about actual electronics, one of them designed a board with a bunch of big ass relays being driven by transistors with no flyback diodes.
I did a mechatronic degree and also learned very little electroncis.
All my electronics knowledge is stuff I learned myself.
Most new graduates have a panic attack if you show them a circuit with an op amp

>> No.2470782

>>2470778
Yep that's me. And apparently my course wasn't even that programming-focussed compared to courses from other universities. I've been doing my best to learn how to actually use opamps and such but in doing so I only realize more how much I'm missing, and it's kind of intimidating.

>> No.2470788
File: 51 KB, 598x514, RPiPico__DebugConnections_JTAG.png [View same] [iqdb] [saucenao] [google]
2470788

>>2463383
Just affirm, as long as my USB onenction work, i don't have to care about the SWD pins being available or is there a specific scenario where they should be accessible?

>> No.2470794

>>2470788
Be sure to not connect VCC if USB is to be connected, or use a protection diode to prevent flowback into the jtag adapter.
I have no idea what you're doing other than that, if you want to use SWD you care that the SWD pins are available, yes, you're connecting those in your pic related.
Please give more context in your questions if you want people to help you.

>> No.2470934

>>2470778
Jesus Christ

>>2470782
See my post here: >>2467400, it’s the best way I can think of to conceptualise op-amps.

>> No.2471198

>>2470639
I'm not sure "ripple" is what the issue is here.

What's happening is that I start with all 4 actuators at their fully-retracted positions and save their positions as zero (an average over the course of 64 readings). I then extend the actuators a bit and retract them back. Once they are all fully retracted, some of them are not close to reading zero.

My expectation is that if they are all fully retracted, then the potentiometers should be measuring the same value that they started with. This is not happening.

>> No.2471200

>>2463655
>Why do you need code for that? Just use a diode some passives, and an LM393. Maybe an op-amp if the gain is too low.

That's a lot of components, points of failure, and fumbling around to build a circuit whose functionality can be easily replicated in software on a $3 arduino nano.

>>2463861
>a comparator will work once i know my threshold

IMO you should always reach for an arduino nano (or similar) for projects like this, it's super simple and minimizes the time you'll spend doing low-value nonsense

>> No.2471204

>>2471198
>I then extend the actuators a bit and retract them back. Once they are all fully retracted, some of them are not close to reading zero.

And some of them are? Among the ones that are off, how off are they?

>> No.2471209

>>2465170
it should be fairly easy to dump the gatt service of it and read the values, either by dumping a session or reversing the app. just downloaded from apkpure and it is some crappy unity/mono bundle with encrypted assets, so im only up to help you if youre the spanish guy from the video

>> No.2471239

does my 2-layer PCB really need a ground plane? all the PCB does is route signals between existing pre-fab components like ESP32 breakout boards etc. Highest frequency signals are UART and I2C around 100-200khz. Nothing high power + high frequency. Why does my PCB need a ground plane if I can make an equivalent breadboard design without a ground plane and it works just fine?

>> No.2471241

>>2471239
>Why does my PCB need a ground plane

1 - it cant hurt
2 - you save on acid since you're removing less copper

>> No.2471353

>>2470794
Sorry, it was kinda a weird situation where i replaced a chicken feed controller with a pico. Unfortunately the board didn't quite fit into the case and while was thinking about if i realistically need swd again, my cousin saw it off and well it still worked..

>> No.2471415

>>2470788
>or is there a specific scenario where they should be accessible?
if you fuck up the bootloader and cannot flash firmware you can always upload via SWD.
Also debugging with breakpoints can only be done with SWD.

>> No.2471416

>>2470794
>e sure to not connect VCC if USB is to be connected, or use a protection diode to prevent flowback into the jtag adapter.
One of the VCC's on a debugging header is for line IO voltage detection so your debugger can debug at the proper voltage.
If you have a fixed debug probe it doesn't matter but higher end ones like JLink EDU can detect and debug at VCC levels (and don't work without it).

>> No.2471420

>>2471200
>That's a lot of components
not really
>points of failure
retard, those parts will outlive you.
>and fumbling around to build a circuit
ah so you don't have the skills, that's it then.
>can be easily replicated in software
if it was so easy you wouldn't be asking here. There's things you don't understand like ADC input capacitance and effective sampling rate that if you did you'd know trying to sample a differential microphone input wouldn't work on a 20 year old atmega328p with any reasonable amount of accuracy.
Stick to analog domain to condition your signal.

>> No.2471422

>>2471416
Fair enough, I'm used to those being called something like VDD_TARGET or TVCC though.

>> No.2471425
File: 27 KB, 615x219, contenteetimes-images-00pcb-rot26f1.jpg [View same] [iqdb] [saucenao] [google]
2471425

>>2471239
energy in signals moves in the dielectric between trace and ground. When you have a signal trace over ground the E fields are contained and you don't get any issues but if you break it ( or it doesn't exist) the energy needs to find a different path often through other signals to return to the source.
This causes ringing and higher inductance and can lead to unpredictable circuit failures. You dont need a whole plane but try to put as much ground on the board as possible and stitch top and bottom islands together with vias.
> Nothing high power + high frequency.
Your signal edge determines the frequency not the switching speed of a signal. A 1Hz signal with a 1ns rise time has a higher EMI effect than a 1mhz signal with a 500ns rise time.

>> No.2471440

>>2471239
the less copper you remove the better (cheaper and easier to manufacture, some pcb houses will fuck you up for having huge unnecessary etched areas and ask you or will add pours themselves to save them acid)
once you have these huge islands of copper you have several options, you can let them float where they will couple to other signals at worst cause weird interference), or you can connect them to a net, it doesn't matter which net but the most common is gnd because you as the designed chose what to label as gnd by considering the most logical shared reference power voltage right?
the reason you put it in the middle of a 4 layer board is it isolates signals on top and bottom and you don't have to worry about them, on a 2 layer board you should be seriously considering where signal traces are and where ground traces (or balanced return) should mirror them to minimise the loop, doing a big pour just means you can be a little more lazy about it and not have to think so much about currents/track widths (at some point your gnd net will probably carry one of if not the largest current in most boards that aren't weird power switchers and certainly many different return currents)
do you need to do it? no. and whats more people who talk about em integrity, rf shielding, that shit is all black magic, pay absolutely no attention to it.

>> No.2471447

>>2471440
Is there something like a "fill all left out areas with copper pour" in KiCad? I am better off declaring them GND than anything right?

>> No.2471454

I love the ESP32-cam but the presoldered header pins are a pain in the ass for some designs. Why don't the manufacturers make a headerless version? And on that note - is it practical to desolder the pins without destroying the pads? I'm interested in using them for a design that I'll be making 1000 units of, so I need to be able to do this at some scale.

>> No.2471459

>>2471454
If you're going to be making that many, then you need to talk with someone that gets paid to do that stuff, like an Avnet, and not ask in an obscure general thread on an Ethiopian mud cookies forum.

>> No.2471461

>>2471459
1000 units is pretty small potatoes. I'm trying to shave off $1 or $2 off assembly cost by simplifying the process. That's $1000-$2000 in savings. Not worth it to engage with a big player for that amount; will be wasting their time and mine.

>> No.2471462

>>2471461
You know you don't pay them, they're paid by the chip companies to sell chips.

>> No.2471463

>>2471461
This one looks to be without headers
https://www.alibaba.com/product-detail/In-bulk-ESP32-Wifi-BT-Development_1600348967628.html

>> No.2471464

>>2471463
exactly what I was looking for, thank you

>> No.2471512

>>2471454
>I'm interested in using them for a design that I'll be making 1000 units of, so I need to be able to do this at some scale.
Then design your own board and put the module directly on it instead of buying a breakout at 10x the price

>> No.2471687
File: 588 KB, 3096x5504, pico butchery.jpg [View same] [iqdb] [saucenao] [google]
2471687

I had never picked up an iron before and decided to solder the headers to a spare pico. The side I started on looks terrible but the opposite where I had gotten used to what I was supposed to do looks a tad better. I was using this cheapo Lenove set I got on an amazon sale. So far what I have learned is:
I do not have a steady hand.
My eyesight is bad, as is the magnifying glass stand I got from freight's.
Soldering microcontrollers is hard and not ideal for a starting lesson.
Fumes hurt my eyes and nose. Unironically wore a mask for this.
I really enjoyed every second of it and am looking at cheapo component kits from chinese websites so I can build a radio. The PACE videos online are quite nice as well.

>> No.2471689

>>2471687
>Fumes
fan

>> No.2471691

>>2471687
>soldering microcontrollers
dude you soldered a pin header

>> No.2471694

>>2471691
>I had never picked up an iron before and decided to solder the headers to a spare pico.
Sorry I wasn't specific enough when I said
>soldering (pin headers to) micro controllers is hard

>> No.2471703

>>2471447
Yeah just add a ground fill. You can change whether it will fill in unconnected islands in the fill's settings. You can add an unconnected fill, but ground is going to be better for noise reasons.

>> No.2471722

>>2471512
esp32-cams are cheap as shit, if you throw an esp32 onto a PCB @ jlcpcb you're only a couple bucks shy of an esp32-cam, plus you still need PSRAM and all the vitamins

>> No.2471779

>>2471687
>Soldering microcontrollers is hard and not ideal for a starting lesson.
There literally isn't a better starting point than soldering a few pin headers. Every single through hole component will have pads of this size and there's just no way to get anything bigger.
Use flux and reheat the pins that have spikes on them to get rid of the spikes. Adding a tiny bit of fresh solder also helps to get rid of those.

>> No.2471794

I want to build a streaming server using a USB DAC I already have, but raspberry pi prices are ridiculous. what is the best supported board out of banana Pi, Mango Pi, NanoPi?

>> No.2471798

>>2471687
Looks like a bit too much solder, and you didn't heat it for long enough. The flux should bubble for a moment or two to activate surface tension. You want the solder to wick INTO the joint, not blobbing all around it.
Also heat the joint, not the solder. that makes sure you got it hot enough. Try to push the soldering iron up against both the pin and the pad, and then push the solder onto the opposite side.

>> No.2472345

>>2471779
>>2471798
I agree there's too much solder. I can try again this is more of inline with the critism I was looking for / expecting.

>> No.2472460

>>2471794
I ordered a Mango Pi MQ Pro D1 board

>> No.2472814
File: 89 KB, 640x480, 74181-ALU.jpg [View same] [iqdb] [saucenao] [google]
2472814

have any of you degenerates ever dicked around with a 74181? working on a breakout board for one currently, just to play with it

>captcha: AYGG00

>> No.2472834

>>2472814
No. Any uses for it besides retro gen-3 computers?

>> No.2472912
File: 30 KB, 404x528, 1664114719369.jpg [View same] [iqdb] [saucenao] [google]
2472912

I need another free output pin, and my oled screen alone uses 4 output pins being one the chip select pin. How I can make the chip select always true so I can use the esp8266 output pin for something else?

>> No.2472914

>>2471687
lmao this is so fun to look at

>> No.2472918

>>2472912
pulldown resistor on CS, use an I2C display, use a GPIO expander

>> No.2472919

>>2472912
some of this displays have config resistors on the back to change from SPI to I2C

>> No.2472921

>>2472918
>>2472919
no idea why my display came with tranny spi preconfigured, im going for the pulldown thing as it is the easiest solution right now
thanks

>> No.2473217
File: 44 KB, 600x600, 1659124764053913.png [View same] [iqdb] [saucenao] [google]
2473217

>>2472834
ehhh practically speaking not really, but it's a fun way to learn about ALUs hands-on.

>> No.2473304

>>2472921
>no idea why my display came with tranny spi preconfigured
Don't blame the display for you choosing the wrong part.
They make I2C variants too. If you already are using SPI adding a display only uses one extra pin.

>> No.2473565
File: 26 KB, 500x500, GT_KPS_14_01.jpg [View same] [iqdb] [saucenao] [google]
2473565

I know nothing about electronics. I was looking for something like picrel for a pico project but the indian site that sell this doesn't ship. Do you know some widely avialable alternatives? 1x6 would be good too

>> No.2473633

>>2473565
basic electronics, ask in /ohm/

>> No.2473981

Not sure where I ask fpga questions, is it here or ohm?

>> No.2474021 [DELETED] 

>>2473981
>fpga questions

only 7 people in the world understand FPGAs and none of them visit 4chan.

>> No.2474028

>>2473981
>fpga questions

only 7 people in the world understand FPGAs and none of them visit 4chan except to read the loli threads on /b/.

>> No.2474036

>>2474028
>only 7 people in the world understand FPGAs
No? You sound like a fucking retard.

>>2473981
It depends on the question. Probably /ohm/ though. This is the software retard thread.

>> No.2474056
File: 53 KB, 679x333, 1636346169047.png [View same] [iqdb] [saucenao] [google]
2474056

https://hackaday.com/2022/09/28/arduino-ide-2-0-is-here/
Thoughts?

>> No.2474366

>>2473981
I’ve seen people discuss verilog and shit here before, they’ll probably see your posting once they finish their weekly brain-defragging.

>> No.2474368

>>2474056
>live debugging
With what hardware? My shitty CH340-based UPDI programmer?
>inb4 UART debugging via bootloader

>> No.2474398

>>2474368
Probably not supported on all models.
Newer arduinos are arm based and come with an SWD 10 pin connector.

>> No.2474400

>>2474398
Wait they’re doing ARM arduinos now? Still with microchip parts I guess? I thought they were going for the newer 8-bit AVRs like the mega4809 and such.

>> No.2474404

>>2474400
Been doing arm arduinos for years.
Most of their new boards are based around samD21 or D20 arm m0.
AVR and PIC are legacy nowadays.

>> No.2474453

I've only worked with breadboards. How do I find breakout boards to any surface mount component I will potentially use? What is the keyword for pin layout?

>> No.2474460

>>2474404
Oh the Nano 33 series is all samD, same for the Due which has been around for a while. They did make the Nano Every recently though, which uses the aforementioned mega4809, even though it doesn’t use all of its pins and could just use a 4808 instead.

>>2474453
SOICs and SSOPs are likely what you’ll find, as well as a bunch of SMT MOSFETs in SOIC-like packages and D2PAK if you’re doing high-power stuff and need modern transistors. There’s a handful of other guys like MSOPs (not all the same pitch), TSSOPs, and QFPs, there’s also QFNs which can kinda be hand-solderable if you don’t care about the thermal pad and have a well-designed breakout board, and BGAs which are basically unsolderable. Get into PCB designing and fabrication anyway, high-frequency microcontroller circuits and breadboards don’t generally go well together.

>> No.2474465

>>2474460
I guess I will buy a printer just to etch things. Why does breadboard unfit for high freq? Do the remaining connections act as antenna?

>> No.2474466

>>2474460
https://content.arduino.cc/assets/NANOEveryV3.0_sch.pdf
Hahahahaha
The Nano Every has a native USB ATSAMD11D14A, outputting UART as a simple UART bridge, and the RX and TX pins are being connected together and used for UPDI. So it’s the exact same as my shitty peg programmer with a CH340. UPDI is perfectly capable of debugging, so with any luck they’ll do debugging for it now too.

>>2474465
Just higher stray capacitances and inductances. If you get a printer, be sure to get a laser (or LED) printer. Inkjet transparencies are much more finicky than either toner transfer or toner transparencies. A decent laser cutter can also abrade at an etch resist, a router can directly attack copper, and a resin 3D printer is capable of exposing boards just like you’d do with a transparency. If you can get a resin printer with a broken Z-axis for cheap, I’d go for that method for sure. Just got a cheap broken printer myself, though in this case the backlight driver was broken so I replaced it with my own etched circuit board. Posted that on /ohm/, come on over there if you want to talk more about PCB fabrication.

Also I am contractually obliged to mention that PCB a fabrication in China is pretty fucking cheap at JLCPCB, and they offer a wide range of different services that will all be better than what you’re able to do at home.

>> No.2474515
File: 66 KB, 937x848, 61Swps914CL._AC_SL1000_.jpg [View same] [iqdb] [saucenao] [google]
2474515

What's the right way to go about handling 80 different toggle switch inputs to an Arduino? A quick search leads me to multiplexers or shift registers, but I don't really understand either or how to go about solving this problem. Even an Arduino Mega only has 54 digital input pins.

>> No.2474519

>>2474515
parallel to serial shift registers yeah. just look up how they work, it's not complicated. Latch, start clocking and read the incoming bits.

>> No.2474522

>>2474515
Look up keypad matrices. You can use only 18 pins, by using 9 rows and 9 columns, to get 81 different switches. You scan each row at a time by pulling them high as outputs, and by monitoring the 9 column pins as inputs, you can see which switches are on in that row. Then the next row, then the next row, and so on. You need diodes if you plan on having multiple switches on at once. Actually doing 8x10 is the same number of pins and probably makes it slightly easier to use a shift register or direct register reading or writing (e.g. PORTD = 0b00100000).
If 18 pins is still too steep, I/O expander ICs like an MCP23008, or latching shift registers, can be used to expand the number of pins you have for rows and columns. N-of-M decoders/demultiplexers like the 74LS137 can also be used for outputting to the rows, but the opposite of them (priority encoders) can only be used for inputting from the columns if you're only having one input on at a time.

Naturally "row" and "column" are just arbitrary convention, which one you read and which one you write from doesn't actually matter, nor does the actual geometry of the buttons.

>>2474519
Having 10 shift registers is a bit of a shitty solution compared to using an N-rollover matrix. Arguably simpler though, if you're too much of a brainlet to read 8 pins at once.

>> No.2474524

>>2474515
get 80 1k resistors in series, each switch bypasses one resistor. put that chain in series with a 20k resistor and connect that junction to an ADC. value will change by ~10 codes for each switch toggled. but obviously you can't tell which switch is toggled.

>> No.2474525

>>2474524
>but obviously you can't tell which switch is toggled.

That's not an issue. All I care about is how many times any switch is thrown. Thanks for the best solution, which I plan to use.

>> No.2474535

>>2474525
Does it matter how many switches are toggled at any one time? Or just if at least one switch is toggled?

>> No.2474542

>>2474535

Please do not ask such questions.
I've already said too much.
Dont wanna end up in Guantanamo for life.

>> No.2474843
File: 434 KB, 1024x768, file.png [View same] [iqdb] [saucenao] [google]
2474843

Complete beginner here but how do I interface a sensor with an FPGA? I know that first, it has to fit a pmod, and if I can then I just hook it up on a circuit board or something? Or do I have to program in an SPI/I2C/UART protocol along with an ADC to get the FPGA to be able to read whats coming from the sensors?

>> No.2474881

>>2474843
>Or do I have to program in an SPI/I2C/UART protocol
yes. FPGA is just a bunch of logic cells. you have to configure them to do something.
Generally though simple com protocols like that exist already in the vendor's free IP library.
You won't get an ADC with an FPGA though, look up how ADC's work for your answer as to why.

>> No.2474888
File: 136 KB, 1408x836, file.png [View same] [iqdb] [saucenao] [google]
2474888

>>2474881
What do you mean by 'vendors free IP library'? I've been trying to learn as much as I can and I keep seeing the term IP and library. The book I bought has a UART/SPI/I2C section so I'll just have to read it ahead of time.

>won't get an ADC with an FPGA
I watched some videos but I feel like I'm missing the point, could you explain why? I know that we quantize the analog signal into discrete values which will then be fed into the FPGA serially (is that a word lmao).

>> No.2474953

>>2474888
When you write software you own its copyright.
That software is your Intellectual Property.
Companies write verilog software and own the IP. They then license it free to use with their own FPGA's as a library that you can import in whatever tool they use to develop.

Not sure if FPGA's can sample an analog signal directly, never used them to either as asic chips do the job better and faster then use the FPGA to read over pcie or whatever. FPGA's are more of a digital configurable hardware thing but could be wrong.

>> No.2474955

>>2474888
Also XADC is a hardware asic that does ADC.
I mean't you can't write a (probably not a good one anyways) verilog ADC using only logic cells.

>> No.2475184

>>2474953
>>2474955
Okay I get what you're saying now. It's easier (and much more reliable) to use an ADC IC and have it feed data to the FPGA than program the fpga directly to do ADC.
So essentially: 1>2

1) Analog sensor - > ADC IC - > FPGA
2) Analog sensor - > FPGA

I'll have to look up some free vendor IPs then, I think vivado has a bunch. Much love anon.

>> No.2475185

>>2475184
1) Analog sensor - > ADC IC - > SPI/I2C/UART (on fpga) - > FPGA
2) Analog sensor - > SPI/I2C/UART (on fpga) - > FPGA

Oops forgot to include the communication protocol. That shit is black magic to me but I'll figure it out.

>> No.2475292

>>2475185
2 isn't possible. you can't sample analog signals with a communication protocol.
If a sensor has SPI/I2C pins it already has an ADC inside that does the conversion.