[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip / qa] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/diy/ - Do It Yourself

[Advertise on 4chan]

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • There are 46 posters in this thread.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


Janitor acceptance emails will be sent out over the coming weeks. Make sure to check your spam box!

Self-serve ads are available again! Check out our new advertising page here.


[Advertise on 4chan]


File: 1_11_17[1].jpg (95 KB, 1000x666)
95 KB
95 KB JPG
Previously on /mcg/: >>2079602

Here we discuss microcontrollers, SBCs and microcontroller accessories, such as Arduinos (ATmegas), attinys, ESP32, RPI, the blue pill STM32 and others
>>
File: 1615400925937.jpg (83 KB, 1280x720)
83 KB
83 KB JPG
I finally got my 2.9in waveshare e-ink display.
Hooked it up to a temp/humid sensor and an esp8266.
Idea was to make a desk clock with some 1bit color artwork.

Problem is I need a nice looking case for it now.
Any ideas on an easy way to get a nice-looking finish?
I don't have a 3D printer.
>>
>>2096254
Balsa wood
>>
>>2096254
how does the water-cut acrylic minimalist look grab you?
>I don't have a 3D printer.
borrow one
>>
>>2096254
>>2096303
yeah, where i am theres tons of hobbyists who offer services of 3d printing stuff on your behalf and sending it to you. ofcourse it might be a bit expensive, but if its a one off then £20 is a lot cheaper than £200.
>>
>>2096254
old cd case?
tape off the screen area and paint it for a bezel
>>
>>2096374
I would consider using milk jug plastic myself, it's got that nice rough translucency that diffuses LEDs behind it.
>>
>>2096103
Which MOSFETs (both N and P channel) should I get to switch stuff from a 3.3V microcontroller?
I plan to buy a bunch of them to control stuff like a DC motor.
>>
I have a 3d printer but I don't feel like waiting for a print to finish for each iteration. What's the best way to quickly prototype a general layout for stuff?

I wish there was something stronger than card but roughly the same thickness and cut-ability. I once had a thin sheet of PLA from a failed 3d print that was fucking godly for this shit, could just cut it into shape with a scissors.
>>
>>2096479
AO3400/AO3401 are good for about 3A
if you want a different answer, please define
>control
>stuff

>>2096487
there are two /3dpg/ generals running right now, pick one
>>
>>2096492
3A is fine for most of the applications I want to use. Thank you.
>>
>>2096492
>>2096479
can confirm the AO3400/01 series are quite good
>>
>>2096492
I'm not asking about 3d printing.
>>
>>2096492
It's a good surface mount transistor, but is there a good DIP variety to make prototypes with?
>>
File: 1614967556635.jpg (47 KB, 800x800)
47 KB
47 KB JPG
>>2096524
usually I just approximate everything in CAD pretty well, print with big nozzle, and eat the iteration time. fix with tape/hot glue if fasteners aren't working right yet
making another thin sheet of PLA is one obvious possibility
never underestimate the power of cropping out just the part of the enclosure you're iterating on and printing only that for testing

>>2096539
SOT-23 is workable on dotboard. if you need something for a solderless breadboard, picrel is good
>>
>>2096487
>I wish there was something stronger than card but roughly the same thickness and cut-ability.
Is milk jug plastic (HDPE) too thick? I just felt a piece that was within reach, and it was thinner than I expected, less than half as thick as a credit card. And it cuts easily with a box-cutter or scissors. A gallon jug is good for about a 6x5" flat piece, bigger if some bends are okay, or spiral cut for really long pieces. The best part is it's almost free.

>>2096594
>SOT-23
SOT-23 will fit perfectly diagonally on donut board, and you can bridge some 0805 parts to adjacent donuts. It's fiddly to do, but looks nice when done. And I know I've rigged up one a small chip of donut for breadboarding before. That board looks pretty nice to avoid all that pain if you plan ahead and order some.
I've also mounted 0805 parts on pairs of header pins, much tidier than normal 1/4 watt resistors on breadboard. And I've done a few 5-pin DIN connectors on their own bit of board too.
>>
>>2096677
>Is milk jug plastic (HDPE) too thick?
If anything, it's probably a little too thin. Thanks for the idea though, it'll probably come in handy.
>>
File: PXL_20210427_014523178.jpg (2.69 MB, 4032x3024)
2.69 MB
2.69 MB JPG
>>2096103
Do cameras talk the same language over these wire ribbons? Can I just switch out the camera and have it still work?
>>
>>2096677
>if you plan ahead and order some.
don't forget the 2000 pins of pin header you will also need

>>2096887
nope. there are a few different camera bus standards. afaik none of them auto-configure
>>
>>2096889
I've got plenty of 1x80 pin headers to break apart. I use them all the time, especially to hook up ribbon cable to breadboards. I also do custom lash-ups of ribbon cable from time to time, it's tidy as fuck.
>>
File: FlexTopAndBottom.png (3.62 MB, 2500x2500)
3.62 MB
3.62 MB PNG
I just scratched the bottom of a flex pcb with calipers like an idiot. What are the chances I broke something. Pic related. Won't be able to test for a couple weeks.
>>
>>2097054
Send pics...
Can you at least check continuities?
>>
How do I get into LoRa?
>>
>>2097187
Croudsupply has some campains for LoRa projects, Pine64 has a $4 pinecone LoRa board with a RISCV processor. You can follow there development on github, but they want to develop a LoRa network or somenting.
>>
speaking of crowdsupply, i hope pic related gets released sometime soon...
>>
File: bottom.jpg (515 KB, 1512x2016)
515 KB
515 KB JPG
>>2097057
no access to multimeter rn. This is the bottom what do you think?
>>
>>2097280
just the fiberglass, no flex scratched? that's just cosmetic, you should be ok then
>>
>>2097280
Don't worry, it seems ok
>>
>>2097288
>>2097286

alright thanks. So im just curious how I'd debug this since I'm a noob. I have the schematic for the module, but not the whole HDK. How do I test continuity since R3 and R4 would be above the threshold value for continuity and there's no trace exposed?
>>
>>2097300
it's just a mechanical stiffener of fiberglass. you couldn't have damaged it electrically with that surface gouge because there are no conductors in it or on that side
did you scratch any of the actual black film on your unit? if not, relax, you broke nothing
>>
>>2097314
Nothing on the other side no. Thanks for the help
>>
Arduinos are better without the children's software
>>
>>2097276
Ahh yea!, but i think the price will break my hart.
>>
>>2097758
yeah i saw from some russian publications say the official price is around £1,100 or £1,200 (I think thats for the low-end PC model), I guess that's the cost of being an "early adopter" lol...
I did try to see if i could buy one directly from MCST or something, I did find a link to get SSH access to their machines (you have to fill out a form saying what you want to use it for, etc.) but i can't seem to find any mention of just buying it (maybe i didn't look very well...)
>>
>>2097709
Then they're just an AVR micro. Might as well go with a cheap arm board nowadays.
>>
>>2097709
Everyone needs to start somewhere. If you want actual children's software, try using scratch.
>>
>>2097709
but then they're just expensive, pretty old 8-bit MCUs with modestly capable peripherals. not that such things aren't valuable

>>2098022
>not placing a hard limiter after your audio projects
>>
>>2098439
I'm sure he just had a hard 0x0000 to 0x8000 kind of glitch on startup, you can't fix that in software, certainly not if your software is fucked.
>>
You have some chip that has arduino IDE.
Would you ship firmware made with the arduino libraries into production?
Or would you make the drivers yourself?
I have heard that the stm sdk used to suck and that's why some people have made their own drivers but that the sdk has gotten better.
>>
File: 1614016725806.gif (3 KB, 500x229)
3 KB
3 KB GIF
>>2098507
>he just had a hard 0x0000 to 0x8000 kind of glitch on startup
that sort of glitch can be hard to mute (it's the codec chip's job anyway desu, just pick a good one). I stand by the use of a limiter while experimenting with audio electronics
but he said
>and doesn't stop
which sounds more like a botched DMA setup

>>2098546
the STM32F103 HAL library did suck (but, frankly, so does the chip) and its copyright terms are slightly problematic for open source projects. also there are clone chips. obvs if I used a GigaDevice 32F103 "clone" I am forbidden to use ST's HAL on it, and if I used another clone the peripherals wouldn't necessarily work. the HALs for the other STM32 chips are better and cleaner and ST might have refurbed their F103 HAL to follow suit
generally I would follow the vendor HAL or code to the metal depending on the project. some community projects don't exactly follow the NAP over long time and old code isn't necessarily guaranteed to remain available
one thing I absolutely wouldn't do is ship the arduino bootloader, it does nothing good for a consumer product and simply wastes time and flash. you have to be familiar with bare metal AVR development to hack my product kthx
>>
>>2098546
>Would you ship firmware made with the arduino libraries into production?
no one can tell what SDK you used when you ship binaries. literally doesn't matter except to code elitist's.
>>
>>2098244
Interesting info on the price, yep i can find some other people talking about SSH access as well. But no info in actual sales.
>>
>>2098671
I disliked the HAL library, so i picked up libopencm3, that covers mostly STM32 but also some others like NXP. There is a book iv been reading by Warren Gay, easy to find also.
>>
>>2098851
arduino is a bit bloated tho, one can often go a size smaller with a bare-metal approach or a different HAL
custom build processes are nice too. it's possible to LZMA compress .data sections then uncompress them in the crt0 file

>>2098873
based. I have stuff for an itty bitty SAMD11 board I'll put together in a few weeks. unfortunately, libopencm3 SAMD support is limited to the GPIO port and the usual Cortex stuff. oh well, as long as I can find a header file she'll be right
>>
>>2098916
>arduino is a bit bloated tho
never worked production before I see, size doesn't matter as long as it runs and meets requirements.
i've seen work projects literally take pic related, shove it in a box full of wires and sell it for thousands of dollars.
>>
I got some pro micros and I must have fucked up the arduino IDE settings because I can't upload programs to them. Since I can't remove the 32u4, can I flash the board like I would any other AVR chip?
>>
>>2098546
>Would you ship firmware made with the arduino libraries into production?
If only you knew...
>>
File: 1615827330869.jpg (7 KB, 240x109)
7 KB
7 KB JPG
Any of you guys had this shit going on with the Arduino IDE? I already tried google but I found no good solutions.
>>
>>2099084
downgrade to 1.8.5 or earlier
latest release versions are always fucked
>>
any good microcontroller manufacturers for beginners? Microchip's IDE sucks ass.
>>
File: 1598747758105.jpg (9 KB, 234x145)
9 KB
9 KB JPG
>>2099105
Well, shit, what now?
>>
>>2099132
removing Java will probably fix that
>>
>Get some pro micros in the mail
>Solder the legs on
>Stick the USB-C in
>Accidently snap the USB-C port off its pads, leaving it hanging by its connections
So how has your week been, /mcg/?
>>
>>2099146
That didn't help either.
>>
>>2099167
no, i mean removing Java from the Arduino IDE.
>>
>>2099170
Found the problem, this gay ass shit doesn't work with custom fonts. Thanks for the help, though.
>>
>>2098929
>never
sure, if you're only making one
>thousands
I can believe it, engineers are expensive no matter what the medium. still have to question what the software side is thinking when they do that

>>2099031
I would assume so, as long as you didn't disable ISP in the fuses somehow

>>2099110
if you don't like the manufacturer's IDE, download cross tools and set up a Makefile like we did in the good old days
>>
Do i understand it correcly that arduino uno RX and TX pins are connected to usb, so if i'm using arduino IDE serial monitor, i cannot use those pins to communicate with other devices?
>>
>>2099354
Yeah but that's what the softwareSerial library is for. It's not as good as the OG pins but it circumvents the problem.
>>
>>2099084
>>2099132
uninstall the IDE and install VSCode with PlatformIO.
>>
>>2099364
>softwareSerial library
Just don't
>>
>>2099873
Ask a question, get an answer faggot
>>
File: 3c423d21d3.jpg (185 KB, 1200x675)
185 KB
185 KB JPG
Anons, I have never deal with RPi or stuff like that but i wanted to make a micro PC - something like on picture. I managed to get a fine 640x480 3.5 inch screen, everything is working but when i tried to run Doom its horribly slow.
I have RPi zero, it is weal, I know, but not THAT MUCH.
I got 1 fame per 10 seconds even in menu. it can't run that slow on 512 Mb ram.
I saw on youtube people run Doom smooth on RPi 2 and 3. Yes they may have 1Gb ram, but seriously isn't 512 enough? Maybe I am doing something wrong? I followed this guide
https://www.makeuseof.com/tag/run-doom-raspberry-pi/
Please tell me that someone of you can run Doom with at least 25-30 fps on RPi Zero.
>>
>>2100062
im afraid that sounds about right. Looking here [https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2835/README.md], it looks like you got an armv6 chipset at 1GHz. I've got the original model A at 700MHz here, and dragging windows is noticeably hard. infact the entire machine is very slow, much slower than it was back when i first got the model A in 2015 or 2016.
>>
>>2100069
This is very strange. Doom and it's ports run litaraly on everyth that have a screen. It requires 4+ Mb ram and 33+ MHz to run. Yet Zero can't run it and don't use emulator to blame it. There are plenty of vidoes on youtube where people play it on RPi2 and RPi3. Zero is slower but not that much. Really strange...
>>
>>2100075
i think architecturally-wise, it is a lot slower. But I agree, that doom should run fast - the trick should be to run it in some hardware-accelerated openGL mode, and bypass the window system entirely - there are OpenGL ES 2.0 drivers for this chipset, if it can run Quake 3 it should be able to run Doom.
>>
File: pi.jpg (61 KB, 988x505)
61 KB
61 KB JPG
>>2100079
I'll try to search for other variants like emulators or non-chocolate versions. But I suspect it won't work. The problem is other RPis have different usb ports layout and they won't be good for my idea. Only with Zero I can hide cables inside PC in a neat way.
>>
>>2100084
can you link the doom engine/emulator you're trying to run? I'll see how it behaves on my one.
>>
>>2100086
Chocolate doom. Here is the instruction that I have used
https://www.makeuseof.com/tag/run-doom-raspberry-pi/
>>
File: What.gif (3.17 MB, 406x300)
3.17 MB
3.17 MB GIF
arduinotards on my general
>>
File: file.png (155 KB, 371x371)
155 KB
155 KB PNG
>>2100104
I use the arduino language and libraries to make commercial products which the company i work for sells to people, does that trigger you boy?
Does it make you mad that in can design a thing 10 times faster thanks to those libraries and functions and don't have to waste time by pointless low level debug and reinventing 10 wheels a day, because nobody gives a shit about the small performance impact the arduino abstracting causes?
Good. Good. Your anguish sustains me.
>>
>>2100137
What company do you work for, so I know to avoid it.
>>
File: 1566711121393.jpg (29 KB, 450x418)
29 KB
29 KB JPG
>>2100137
>I use the arduino language
it's a SDK not a language
>reinventing 10 wheels a day
you don't have to, it's called making your own "high level" functions or using vendor HAL/open libraries
>nobody gives a shit about the small performance impact
i agree if you're making blinky tier consumer shit
>>
>>2100140
why would I make function wrappers for vendor HAL when other SDK's already did it for me.
using the SDK functions gives greater portability than re-writing your own functions to each new platform.
>if you're making blinky tier consumer shit
99% of all micro code doesn't need as much performance as you might think. if you actually profile the performance vs idle most of the time the micro is sleeping/spinning waiting for events.
the 1% you need performance then just write the code to use register level access or even in asm.
>>
>>2100137
8/8

>>2100140
>it's a SDK
it's a kit. software and development are open for debate, especially when its users think that solving a mundane implementation problem or writing boilerplate code is "invention", that the drudgery sometimes required in programming is wasted creative mastery, that vidya is real life and that mastering your tools is poorfag work
other OP probably makes blinky light projects for casinos or something

>>2100224
>99% of all micro code doesn't need as much performance as you might think
fuck off with your /g/-tier cycle counting special-olympics shit and actually get some flash that isn't paid for by your parents for once
>>
>>2100229
>/g/-tier cycle counting
dumb nigger learn to read, i'm saying it doesn't matter.
>>
>>2100235
I did read, and I agree that it doesn't matter, and I fucking laugh that you are trying to talk about that instead of BOM and board space and production time. it strongly suggests that you're larping and instead of /g/ you need to go back to /b/
>>
>>2100224
>99% of all micro code doesn't need as much performance as you might think. if you actually profile the performance vs idle most of the time the micro is sleeping/spinning waiting for events.
>the 1% you need performance then just write the code to use register level access or even in asm.
100% this
like 99% of projects aren't using 100% of the power their micro offers because they don't need it. If you are using on average 50% of the speed the micro is offering, then if you waste 5% on overhead caused by libraries and stuff doesn't matter in the slightest. Even on battery power it's basically meaningless.
>>
>>2100243
>t.unironically thinks that stringing dev boards together with dupont wires is "microcontroller engineering" and has never written a BOM in his life
>>
>>2100242
>I did read
but you don't comprehend it apparently.
>instead of BOM and board space and production time
Because that's somehow related to the original argument about SDK performance.
Quit moving the goalposts.
>>
>>2100246
>he doesn't prototype with devboards testing a new design before spending thousands spinning up a custom board with said design.
hope you don't call yourself an engineer.
>>
>>2100246
For you information i don't use duponts i use wire wrapping because i'm not a child like you, i'm a trans MAN.
And i have designed many PCBs, i'm just not a retard who ignores the prototyping phase and then has to solder 10 million tiny jumper wires to each of the pcbs to fix all the mistakes that would have been caught in the proto phase.
It seems to me like you are the one who doesn't know shit about the proper ee design workflow.
>>
>>2100086
I managed to run Doom at good speed and display works fine now too but it took me to use another OS.
I followed this instruction
https://www.youtube.com/watch?v=-wHKZTbK_9E
and installed RetroPi. At first i thought its an emulator for Raspbian OS but then i found out it's a separate os. Well, that's something.
Here is my video/
https://streamable.com/ijxce0
>>
>>2100248
>Because that's somehow related to the original argument about SDK performance.
my argument has always been twofold: that speed is a fallback hob/g/oblin of the Oedipally preoccupied chinlet and that space efficiency often translates into reduced BOM cost

>>2100251
>>2100258
*breakout boards
and that's only half the engineering
>>
File: your argument.jpg (95 KB, 945x526)
95 KB
95 KB JPG
>>2100295
No one here besides a few retards are arguing for writing all sw with direct register setting for muh absolute efficiency.
Physical size of a part isn't even related to that anyways. You sound upset that you're wrong and are bringing up irrelevant bom and size arguments as a failed attempt to salvage the pathetic argument you're failing to present.
>>
I'm currently making an RC car that I can control via RF. The RF uses shockburst protocol which can handle payload packets of up to 32 bits. I want my commands to be robust but I also want to be able to add more commands in the future as I plan to add more functionality to the car. Can anyone recommend a good design to implement? I was thinking of just a 32-bit binary sequence where each bit is a different on/off control (e.g. 10 - left, 01-right, 11- forward etc.).
>>
>>2100323
sounds like you're using an NRF SoC.
the ESB protocol they implement can be larger than 32 bytes. you only can use 32 bytes max if you want to use payload address whitelisting with EVENTS_DEVMATCH.
for a packet structure just have a header + payload.
the header has fields that determine the message type and how long the payload is up to 32 bytes or whatever you want the final size to be.
really as long as you can decode it at the other end anything is fine.
>>
>>2100307
>space
nah, I'm just shitty with word choice today. I meant flash space, for which there is a conspicuous, generally monotonic quantity:price relation on a given core/peripheral ensemble. if you can save enough money to buy yourself lunch on a 100-1000 piece project, why wouldn't you?
>inb4 food isn't a relevant design goal
>>>/leftypol/
>>
Best BLE module for STM32? (Trying to build a bluetooth keyboard)
>>
File: 1598923754699.png (204 KB, 1062x1375)
204 KB
204 KB PNG
>>2100493
you could use this in QFN48 or on a module and skip the STM32 entirely
>>
>>2100508
>NRF51 series
you'd want nrf52 at a minimum. 53 if you want advanced BT stuff
>>
File: 20210430_195015.jpg (1.25 MB, 2897x2952)
1.25 MB
1.25 MB JPG
>>2096103
>tfw spaghetti
>>
>>2100574
what does it do ?
>>
>>2100508
Yeah I wanted to use the QMK firmware, and that's not compatible with nRF, only stm32 and some AVR.
>>
File: file.png (403 KB, 653x469)
403 KB
403 KB PNG
fucking chinks

i used black pill foot print for my pcb design because it was identical to the f401 dev board i'm using, with all the pins being the same, but then.. way too late... i realized... it's not the same, fucking chinks took ONE fucking reset pin and moved it on the f401 dev board, causing all the other pins to be moved over by one in that row, so of course my shit is not working now, fucking hell
FUCKING CHINKS
>>
>>2100684
From what I can see, there's a lora module w/ antenna, a module with a transformer (some sort of AC voltage stepup?), a 555 timer and a buzzer. If I had to take a guess, it's designed so that it will buzz / buzz & activate some off-board thing when signaled.

>>2100716
Either get a black pill that conforms with your design or lrn2read. Being an idiot is the one problem that can't be blamed on the chinks.
>>
>>2100721
that's not a transformer but rather a coil. And the module is either a buck or boost converter. Probably a boost converter since its feeding the buzzer
>>
>>2100721
>that can't be blamed on the chinks.
yellow hands wrote this post

keeping the entire 40 pin pinout but changing ONE pin is exactly the chinkshit that normal people would never think of doing
>>
>>2100739
Don't blame the gooks for your illiteracy. Come back when you've been sold capacitors filled with sand / dodgy memory storage and then we can all be mad together.
>>
>>2096103
Is there anything that's more powerful than an STM32F411 (black pill) but not as overkill as a full ARM application processor? I need something that has a lot of floating point performance and the STM32F411 is just not enough. I still want it to be bare metal though. Maybe DSPs are still used? I haven't seen one in anything in 10 years. My budget is around 15$.
>>
>>2100721
This surprises me, because chinks are usually so good at copying the same thing over and over again. How does "lrn2read" apply when one of them fucks up making a clone of their own shit?
>>2100739
It's not changing one pin, it's changing half of the pins because one got inserted in the wrong order. I mean, they tend to be lazy about copying shit, but that takes the cake.
>>2100777
Again, what "read"? They probably sold it on Alibaba using the same diagrams and photos that everyone else uses, because they're such lazy fucks. All they cared was that they got their money back selling off all the thousands of boards that they fucked up because they didn't even double-check the pinout before sending it off to get boards made.
>>
>>2100787
They don't clone their own shit because that implies that they have the capacity to create. They just get the tenders in from better countries to make their shit because their lack of concern for human life translates into better profit margins. Of course, by giving them the specs to make your device you also give them the means to hammer out dozens of identical parts that they can sell themselves at a higher profit. It's why you can basically make iphones with enough trips around the shenzhen market stalls.

>What "read"
The post said they realised too late. That implies that there was something to tell them that it was different. I'm not a fucking psychic. Still, they're a retard for buying chinkshit for a finished PCB. All chinkshit should be prototyped first, especially if you change suppliers.
>>
>>2100785
>I need something that has a lot of floating point performance and the STM32F411 is just not enough
you're probably looking at an M7 MCU then.
what are you doing that needs so much DSP?
>>
>>2098929
I've had too many weird things happen with long-running arduinos to trust them as industrial controllers.
>>
>>2096103
Is a basic 8051 enough for PID control of a RC jet plane ?
>>
>>2100826
Doing some simulated guitar effects on a microcontroller which needs a lot of addition and multiplication, AFAIK that's the realm of DSPs but a f411 also did the job, but now I need something more.
>>
>>2100875
Special-purpose DSPs aren't a thing now precisely because instructions like MAC (multiply and accumulate) have become part of non-DSP instruction sets.
>>
>>2100739
>normal people would never think of doing
>normal people use dev boards in production
>muh rules-based liberal international order
US glow merchants like you should kys
>>
So this might be a retarded question but what is the difference between the 32-bit bluepills etc. and something like an arduino / SBC? I get that:
>Standard Arduino uses an 8-bit mcu
>32 bit is more than 8 bit
>32 bit can carry out more complex processes than 8 bit
But I have a hard time conceptualising what exactly you could do with that extra oomph. I tried looking it up only gave the dry spec answer instead of any experiental answers. For reference, I have a few arduinos and a raspberry pi but nothing inbetween.
>>
hey I'm back with another question regarding this pcb >>2097054

where can I research standard practices for using calipers to measure component dimensions relative to the PCB? I want to try modeling the board in KiCAD with only the USB-C and JST connectors. I'm building an enclosure. I guess I just want to make the component measurements as exact as possible. Tried contacting company for dimensions but no luck.
>>
File: 1597370930243.png (12 KB, 575x481)
12 KB
12 KB PNG
>>2100946
application processors on SBCs tend to have relatively few peripherals, specialized for their use cases. 32-bit MCUs tend to have more/faster/more versatile/more autonomous peripherals than 8-bit MCUs, on average, but a few lines of 8-bit MCUs are starting to catch up
faster timers = faster/more bits PWM
DMA hardware = faster data streaming in/out of the chip without processor intervention (esp interesting for audio and faster signal processing)
factory ROM bootloaders = quality of life
>what exactly you could do with that extra oomph
use more accurate algorithms instead of approximations
respond more quickly to external signals
coordinate more inputs/outputs at once
usually, enjoy more RAM and code flash for more complex algos

>>2100965
>you paid actual money for it and they don't even give you a STEP model
oy vey
>standard practice
fucked if I know. plenty of "how to use digital calipers" tutorials out there
build approximate bounding boxes that enclose the device and those surface irregularities we call components
don't count on KiCAD's models being exactly those of the components on the board, connector heights won't necessarily be the same. get the component datasheet and make a low-feature bounding box of it
don't worry about exactness, just leave standard amounts of clearance plus a bit. your fabrication technology probably won't be exact anyway
expect to revise the enclosure two or three times in any case
>>
>>2100982
>get the component datasheet and make a low-feature bounding box of it
thanks anon. I'm expecting to revise it many times. I'll give it a shot
>>
>>2100716
>i used black pill foot print for my pcb design because it was identical to the f401 dev board i'm using
apparently not.
so you're saying that you made a design with a board from unknown manufacturer A, then used a board from unknown manufacturer B and didn't check if they were compatible.
sounds like a you problem, you bought from shady dealers without verifying the product.
next time buy using part numbers from verified distributers, costs more but you know what you're getting.
or be a proper engineer and don't integrate dev boards in a final design.
>>
>>2100739
and what requirement or international standard do they have to adhere to that says they need to match a pinout exactly to call the board a "blackpill"
learned your lesson the hard way, that's the type of shit why I never deal with chinkshit. if you can't trust the supply chain how can you trust that your board will work correctly.
bet they're not even genuine STM32's.
>>
>>2100946
the bit size is how big the memory bus width is and how big the register space is.
a 32 bit micro has registers 32 bits wide.
The reason 32 bit is more powerful is that work was put into developing the architecture, ARM for example, to add those features but they're not unique to the size of the memory bus.
>But I have a hard time conceptualising what exactly you could do with that extra oomph.
if you have to ask that question then chances are you don't need the extra power. Just depends on what you want to do with it.
>>
>>2100965
get the step files from the manufacturer and put those in kicad.
make your enclosure slightly larger to account for tolerances.
>>
I need a portable non-contact-operated digital interrupt for a 32u4 feather, powered by 3.7v lithium-polymer. Ideally, I'd like some rectangular-shaped field that activates the interrupt when the device passes through it. How might I go about this?
>>
>>2101040
I've tried messaging the manufacturer asking for this multiple times over a month and they don't reply. I also got a message translated in Chinese and messaged on wechat.
>>
>>2101125
JST has 3d data on their website.
>>
>>2101113
I don't really understand what exactly you need, but for non contact off the top of my head I can think of ultrasonic proximity detectors and reflective optical sensors.
>>
>>2101113
why don't you draw it out since you suck at explaining what you want.
>>
File: Crude Sketch.png (5 KB, 590x336)
5 KB
5 KB PNG
>>2101185
So basically, I'm wanting a way to make a data logger start recording when payload A passes through the region B on its way into region C, then stop recording as it passes through the second region B. Interesting stuff only happens in region C, and I'd rather not generate trash data outside of it.

Problem is, I'd like to make it cheap, making me think I'd rather use a strip of retro tape and a PE on the payload, but I'm not sure 5V photoeyes are a thing.
>>
File: 1607276073867.png (158 KB, 800x800)
158 KB
158 KB PNG
>>2101113
>5V photoeyes
how close can you get?
>>
i'm using arduino with my esp32 dev boards and i am a bit confused, does esp32 run rtos in the background to handle wifi and bluetooth and such? or how does it handle managing all those things while my sketch is running at the same time?
>>
File: 1552603910527.webm (2.86 MB, 360x360)
2.86 MB
2.86 MB WEBM
>>2096103
Where do I find a competent engineer to design my product?
Or more importantly, how do I go from a software engineer to a hardware PCB designer in my spare time? I want to take classes but I'm not paying the college jew a second time.
>>
>>2101580
If you don't want to get jewed then learn it yourself. Sellers market faggot.
>>
>>2096103
Does anyone actually use PIC microcontrollers anymore? The stm32s and similar arms are all out of stock and pics the only thing I can find in stock.
>>
>>2101613
boomers still use them and sometimes they are ok to cut the price without going full china
>>
>>2101605
Not that guy but 90% of shit you learn yourself is fucking useless.
The job market is saturated, an employer won't waste time on you to prove you really know X skill when there are 10 others at the door with the piece of paper that proves they know X.
If you learn something yourself you learn it for yourself.
>>
>>2101823
>If you learn something yourself you learn it for yourself
You mean like learning how to design your own product? Faggot
>>
>>2101854
>I'm a designer bro trust me
Good luck selling your shit.
>>
>>2101498
basically yes.
your main is just a task that runs along with other tasks.
>>
>>2101613
yeah, mostly hams, and chinks in dumb consumer sequencing applications using one of the many Chinese PIC clones around the 10 cent price point
no idea what you're looking for but there are still a few ARM options on digikey

>>2101498
isn't that a dual-core chip?

>>2101823
le paper doesn't say much about accumulated street smarts. theory can be backfilled
>>
>>2083094
>the F103's peripherals are buggy and less well-developed than their later chips
Seriously? Don't they make revisions to later batches to fix silicon bugs? I'm about to use F103 for a project that needs USB and CAN, seems perfectly fine for it
>>
File: 1619444746013.png (27 KB, 1032x116)
27 KB
27 KB PNG
>>2101902
>I'm about to use F103 for a project that needs USB and CAN, seems perfectly fine for it
are you sure?
>>
>>2101902
>Don't they make revisions to later batches to fix silicon bugs?
no, they roll a new part number.
there are a million other STM32 chips and even others from different manufacturers that can do what you want.
>>
>>2101912
Drat, I actually expected CubeMX to warn me about that sort of thing
>>2101938
Sure, I just went with something popular that JLC had in stock so I wouldn't have to solder it myself
>>
>>2101957
CubeMX doesn't care that much about your project
btw the USB+CAN simultaneity limitation is one of the uniquely annoying things about the F103 that later chips have revisited, thank god
the STM32F072 is a usual choice for CAN-USB adapters, if the intended application resembles such a thing
>>
File: maxresdefault-5 (1).jpg (228 KB, 1280x720)
228 KB
228 KB JPG
>>2096103
What chips can I run directly off of 4 AA batteries in series? No voltage regulator. I'm looking for minimum power consumption.
Alternative idea is to charge another battery from those AAs and run the chip off of it.
I'm kind of retarded fyi
>>
>>2102408
So 4.5 - 6V? Most AVRs and PICs work with up to 5.5V so you could just put a diode or two in series.
>>
>>2100785
Look into TIs c2000 series chips
>>
>>2096103
Anyone know what the cheapest aluminum PCB manufacturer is? I’m looking to make PCB faceplates and jlcpcb doesnt have an option for aluminum.
>>
File: 1591489654448.png (42 KB, 643x653)
42 KB
42 KB PNG
>>2102425
>you could just put a diode or two in series.
diode drops are current-dependent. unless you know you will be pulling enough current to ensure an appropriate voltage drop, don't

>>2102408
>chip
are retards really using chips, or are you looking for a module on a pcb with connectors and chips and other stuff?
>low power consumption
>usable by retards
unreasonable request. power management is the opposite of retardation
microcontroller VCC ranges are trending down, not up. do pic instead. run the load from 4 cells. tap the string 3/4 of the way up and run the MCU from 3 of the 4 cells by e.g. modifying the battery holder
>>
I might need to do device that would gather and store around 20mb of data send it later to some pc with I think bluetooth or wifi.
Raspberry pi zero would be overkill but microcontrollers with inbuilt bluetooth do not have big flash memory and maybe the internal flash should not be used for writing lot of data?
I'm thinking that I would just use microcontroller with sd card or is the some better way?
>>
>>2102586
don't use an MCU's internal flash memory for frequent rewriting, its endurance is generally low
SD cards can work well and the system has some nice properties (like easy hotplugging), but filesystems can be hard to manage and tedious to code up. instead, since media swapping doesn't seem to be a major requirement of your use case, consider good old SPI flash memory, the kind a PC BIOS is stored in. 25Q256 is the generic type number for quad-capable SPI 32MByte serial flash. the chip costs about $3 from LCSC
>>
>>2102408
msp430
>>
>>2100875
Is there a cheap chinese board for the TMS320C674x? It's what Zoom pedals use.
>>
>>2102442
We're getting ridiculous lead times as well
>>
>>2102442
did you google custom metal faceplates? you don't need any of the conductive crap on a faceplate anyway
>>
>>2100875
Yeah, get the Teensy 4.0 (600 MHz M7) and and audio shield
>>
>>2096103
How the fuck can I put the program into the MCU ? I've been on and off studying assembly for school for 2 years now and I still can't develop my own projects. Everything is in English so I can't find how to do it since it's hidden between 70k lines of useless or already known informations so it's hard to find
>>
>>2103329
what MCU? it is very different for each MCU family and sometimes within them. specific tools and software are usually required
try searching for an MCU part number + "telecharger" or whatever your local word for download is
>>
Any dsp gurus? I'm not sure how to implement pitch shifting into my signal. I have a working delay effect that reads one sample from a delay line, then writes a sample to the delay line. I want to pitch shift in-between the read and write operations, but most phase vocoder implementations I see take a reference to an array and then pitch shift a window.

Am I supposed to pass a reference to the delay line to the pitch shifter and let it shift chunks of it, instead of passing it sample-by-sample like I did for the delay?
>>
>>2103361
I should add that I got time-domain based shifting working by passing the current sample to Overlap Add, but it didn't sound as good as I would like and want to try frequency-domain based shifting.
>>
>>2103364
>Overlap Add
wtf shitty DSP library are you even using
>>
>>2103369
no library atm, though i think i'll have to use one for efficient fft. overlap add sucks, i just wanted to see how bad it was
>>
>>2103378
in the frequency domain, just skip bins when creating the output frequency data. e.g. whatever was in the 1 frequency bin should go into the 2 frequency bin, what was in 2 should go into 4, what was in 3 should go into 6, etc. if you wanted, you could try to find the formants in the input frequencies and treat them specially
I'm not sure what to do for non-integer multiples but you could try dividing the input between two output bins
>>
>>2103218
I’m looking for a cost effective solution and heard pcbs were the best way to go, I thought about doing it myself but with the tools I have it’ll probably end up looking like shit
>>
the small sensors that have i2c or spi interface, do they also have some 8-bit microcontroller or is the interface done in asic?
>>
>>2103390
>pcbs were the best way to go
that's pretty old conventional wisdom, actually. usually they use plain FR-4 fiberglass, etched and masked and silkscreened, for the front panel, not MCPCB
there are a few places that do aluminium front panels from various materials: Front Panel Express, Beta-Layout (great if you are yuropan), eMachineShop should cover US/UK/EU. you might download some of their design software and see what kind of pricing they offer. pricing may be more sensitive to the particulars of the design due to machining time
>>
>>2103405
>8-bit micro
more like 4-bit if that, but usually it's just hard-wired logic designed in a hundred or so lines of HDL, placed and routed onto a corner of the chip beside all the amplifiers etc. there are a rare few applications where some IC implements a standard that is contingent or in flux, like POTS modems during the speed wars or MP3/WMA decoders, and might need broad reprogrammability to be a viable product
>>
>>2103337
I've worked on a C8051F99x mainly but I basically don't know what I'm doing, I want to learn but the resources at my school are so shit, we don't learn anything usefull. It's the first time I had to "get dirty" (by that I mean actually managing the memory instead of saying 'In the real job they'd want us to watch the memory usage', for example) and I haven't even seen a MCU with my own eyes in my life.
Shit's frustrating, you learn things but actually know nothing.
>>
File: 1599676277256.png (218 KB, 421x303)
218 KB
218 KB PNG
>>2103426
>C8051F99x
the 8-bit range-specific programming dongle is $35 from the manufacturer or $6 for an ali clone, search "c8051f debug adapter"
https://www.silabs.com/documents/public/application-notes/AN127.pdf details some aspects of the the C2 protocol and may be enough to get started if you are in a hurry to start with real chips. similarly to ARM and PIC, you connect a half-duplex synchronous serial bus to the chip, and send commands and data back and forth to program and verify flash
>In the real job they'd want us to watch the memory usage
you're ahead of the class by tasking yourself with actually doing it, this is good exercise. otoh, computing pioneer Donald Knuth once observed that premature optimization is the root of all evil. now that you know how to do it, you can spend the next few years refining your sense of when to do it
>I haven't even seen a MCU with my own eyes in my life.
you've been learning exclusively in a simulator? oh no
C8051F "minimum system" boards are available on ali in a few different sizes, but I have trouble finding one for less than $10. AVR or STM32 boards and tooling turn out cheaper, and there are many guides to get you started for common dev boards
>you learn things but actually know nothing.
I know that feel
>>
>>2103407
I'll look into it, I appreciate the info
>>
>>2103685
>computing pioneer Donald Knuth once observed that premature optimization is the root of all evil.
Totally offtopic rant. I've seen too many idiot developers on the internet misinterpret Knuth's grain of wisdom to mean that generally doing any optimization is a bad idea and then after that, if the solution isn't fast enough, then throw more hardware at the problem. These kinds of developers think web apis are "fast" and that making a user wait several seconds to move between pages is acceptable.
>>
>>2096479
Depending on frequency / application just use an appropriate transistor and pulling resistor. For P channel use a PNP transistor and pull the gate high.
For N channel pair two transistors so an NPN turns on the PNP which will supply the N channel gate pulled low.
Transistors cost nothing and give you more MOSFETs to choose from (or less you have to look for thanks to using a higher gate voltage via transistors).
>>
File: L_Motorola-MC68000L8.jpg (126 KB, 573x505)
126 KB
126 KB JPG
42554D50
>>
>>2105548
Beauty. 68010 is even sexier.
>>
>>2101866
>hams
Whats this mean?
>>
>>2106135
>Whats this mean?
amateur radio operators
>>
the fft is confusing.
>>
>>2096103
what makes stm32 bluepill?
>>
>>2096254
Structural Hot Glue.
>>
All the basic bitch stm32s are out of stock on mouser, does this mean it will take almost a year to get them?
>>
>>2107306
try octopart, shows stock from a bunch of places. besides that you might have to wait or pick a different part.
>>
>>2106689
As God intended
>>
File: avr.png (17 KB, 453x477)
17 KB
17 KB PNG
I have a problem with reading the output from a rotary encoder (rotation only, no built-in switch) on my ATmega32. I can only increase the value (clockwise rotation), not decrease (counter-clockwise rotation). I have output pin A connected to INT0 (PD2) and output pin B connected to INT1 (PD3). The interrupts are setup so that they only trigger on rising edges.

The problem I have is that whenever I rotate counter-clockwise and INT1 (pin B rising edge) is triggered and I try to read pin A, it's always a zero, hence the interrupt never enter the B2 block. Why? Normally, I perform a NOP to wait for input pin to settle, but the usart_send() takes care of that delay by far in the current debug code.

PS
I only added the usart debug output after I noticed it wasn't working, that code isn't supposed to be there.
>>
>>2107704
>it's always a zero
it's always a one*
>>
>>2107704
have you verified that pin A changes at all when turning CCW?
>using interrupts to read a mechanical encoder
shiggy
>>
>>2107386
it's all fucked
>>
>>2107704
Start by tossing out all the encoder stuff, and make a test program that simply copies the encoder input states to LED outputs as you slowly rotate the encoder. Then do a version that adds interrupts and two more LEDs. Then do your encoder without interrupts. Then finally you can make an interrupt version.
Also make sure you are acknowledging the interrupt. Is just reading the GPIO input register enough, or do you have to write a 1 bit to some other register instead?
>>2107821
Interrupts are a good way to do it... IF you already have all the rest of your shit working. That keeps foreground-heavy stuff from getting in the way of encoder performance. The original 1984 Macintosh used interrupts for mouse encoding. It was smooth as glass except during floppy disk access, because interrupts were disabled while reading/writing the disk.
But your interrupt code needs to be very simple, or you have to be very careful. You basically can't debug that shit because your debugging could obscure the bug. Doing UART shit inside an interrupt? Yeah ngmi, especially if your runtime library uses an interrupt-driven UART.
I did a relay control board that tried to do a state machine in an interrupt handler, partly because the guy who did the prototype wrote it that way. After a year or two it became obvious that it was dropping state changes. Instead of trying to figure out why it didn't work, I just scrapped all that interrupt crap and rewrote it. A day later, not only did it actually work, but it also was 500 bytes smaller. (out of a nearly full 4K)
>>
>>2108042
>that keeps foreground-heavy stuff from interrupting the mechanical encoder switch while it bounces
10/10
I agree it works fine when you have phototransistors with Schmitt triggers or other bounce-free inputs, as time has told
>>
I'm using an ATMEGA328 for a bitbang-based audio project and I read that it has a 20mhz max clockspeed. I could certainly do with that 25% increase but would I experience any reliability problems (e.g. skipping commands etc.) if I bump it up?
>>
>>2108561
>would I experience any reliability problems (e.g. skipping commands etc.) if I bump it up?
these are precision engineered silicon devices sold with a guarantee, not chinkshit consumer products in a barrel in a bodega. you'll be fine
>>
>>2108561
>I'm using an ATMEGA328 for a bitbang-based audio project
literally why. bitbanging anything is absolutely un-necessary.
just use a proper micro with whatever hw peripheral you need.
>>2108674
>these are precision engineered silicon devices sold with a guarantee
its called absolute maximum ratings, you should never exceed them.
>you'll be fine
Devices are not generally rated to work at the absolute maximum, that's why they give you a recommended operating conditions table.
deviating leads to undefined behavior and then performance is dictated by silicon binning.
>>
>>2109089
I figured he was looking at the upgrade from a 16MHz megaAVR
also clock speed isn't specified as a limiting value, only as a recommended condition. exceeding it rarely destroys the device, as power equations are continuous even when some pipeline stages are suddenly too long
>>
Is there a way to download STM32CubeF1 without giving the faggots your email? Back in the day there was a direct download link hidden in page source, but now it just loops you back to the download page
>>
>>2109429
use a throwaway email
>>
>>2109457
I was specifically trying to avoid creating any accounts because fuck that.
But anyways, turns out wget downloads it just fine, it's the browser where they play their faggot loopy loop games.
>>
>>2109429
Sacré bleu! But they need your email so they can send you e-mails about all their presentations going on in cities nowhere near you! Even if I was currently working I wouldn't care, because I hate long-distance travel. I'm in Texas, and anywhere outside of it is too far.
I didn't mind the occasional e-mail about new ST products, but I actually firewall filtered the SMTP server that was sending the presentations shit since I couldn't find any way to turn off just those mails.
>>2109473
based
>>
why does it feel like everything is using arduino IDE?
It sucks.
Why can't they just give you a makefile?
>>
>>2109730
You can just use arduino-cli and whatever IDE/editor you want.
>>
>>2109730
as powerful and generic as Makefiles are, they are boilerplate and they can be annoying to adapt to one's own machine, especially if one has library dependencies like HALs that aren't included in-tree for technical or legal reasons
platformio looks like it should handle a lot of dependency problems for more generic microcontroller development, much as arduino-cli does for its part
>>
I'm looking for a way to control a LED matrix from an AVR?

While scanning, would setting the active column to putput high and the active row to output low work? According to the datasheet, output high sources current, while output low sinks it. It should work in theory, but are there any disadvantages that I'm not aware of?
>>
I'm using a pro micro to drive some motors via a L239D. I've noticed that the 32u4 itself heats up when I try to use it to set the enable pin high on the l239d but it says on the datasheet that the input current is typically 0.2uA witha max of 10uA. Any idea what the problem could be?


>>2109829
The MAX7219 is a shift register used for driving LED matrices. it should do the job.
>>
>>2109829
it's a well-solved problem and there are 9001 ways to do it. that will work as a first approximation as long as you remember your ballast resistors on the columns. one easy improvement is, to avoid LED stress or ghosting caused by reverse LED current, try initializing the port output value instead of the pin direction to a constant, and varying the pin direction instead of the port output value to make light and dark

>>2109842
too many assumptions. post schematic of your setup
>MAX7219
it's a bit more than a "shift register", it's about two higher levels of complexity (matrix controller, SPI peripheral) than that anon is probably looking for
>>
>>2109855
>it's about two levels of complexity higher
It's a plug-and-play method that reduces the number of I/O pins required. Unless you're looking for a low-power solution there's no reason trying to over-under-engineer a problem.
>>
>>2109842
>The MAX7219 is a shift register used for driving LED matrices. it should do the job.
Seems a bit overkill for my project. I'd rather keep the number of components down for the sake of money. I'll release it as open source eventually, though, so if anyone feels like adding an additional IC, they're free to do so.

>>2109855
>that will work as a first approximation as long as you remember your ballast resistors on the columns
Yup, it did.
>one easy improvement is, to avoid LED stress or ghosting caused by reverse LED current, try initializing the port output value instead of the pin direction to a constant, and varying the pin direction instead of the port output value to make light and dark
Thanks for the advice!





Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.