[ 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: 6 KB, 200x199, stm32.jpg [View same] [iqdb] [saucenao] [google]
1812677 No.1812677 [Reply] [Original]

Previously /amg/ - arduino & microcontroller general.

Running low on asian electronics edition.

Microcontrollers (esp32, blue pill, arduino, ...) & single board computers (Raspberry Pi, Banana Pi, ...) welcome.

>What to post
- Questions regarding microcontrollers & single board computers
- Discussion regarding microcontrollers & single board computers
- Projects you are working on

>What should I do with my [insert hardware]?
Look here:
https://hackaday.io/
https://www.instructables.com/
https://www.reddit.com/r/raspberry_pi/ (everyone is making magic mirrors)
https://www.reddit.com/r/cyberDeck/
https://www.adafruit.com
- This is not an idea thread. Check the catalog, or make a own thread for it.

>Usefull resources:

>Software
Ki-CAD
Your chipsets default IDE

>General electronics, also check their OP
>>>/diy/ohm

>Questions regarding software/OS on single board computers, unless specifically about GPIO
>>>/g/
>>>/g/fglt

>I have junk, what do?
Get rid of it.
Old thread: >>1784995

>> No.1812678

>news

>>1787213
Anon monitors voltage at his truck's starter motor
>>1787873
Can you make a credit-card sized bluetooth controller?
>>1792806
>>1792816
>>1792851
Anon built a temperature controller for their heating mantle.
>>1793785
>>1794204
Anon put his ESP12 in a wall.
>>1792630
Interesting discussion about ventilators starting here.
>>1798860
Anon outplayed himself.
>>1804908
Anon showcases a project in the planning phase.
>>1806460
Anon showcases their first project.
>>1808818
Anon built a quite big RGB LED panel controller board.
>>1791470
Anon posts his arts&crafts project to get more answers.

>Unanswered questions from last thread:

>>1795040
>>1806379
>>1809437

>> No.1813033

>>1812677

i have a project about a health potion made with red light, forged with RGB WS2812B, a microcontroller probably, (i don't know which one i can use) and a switch. my project is connectics the led stripes (3 leds max) at microcontroller and this ones at the switch. someone have some good ideas?? probably i will need a welder..
Thanks for the help..

>> No.1813039

>>1813033
holy shit hahaha can you describe this any worse

>> No.1813042

re: anon asking about attiny88/85 - just look at the datasheet, it shows all the variants of the same family and mentions differences. checking them over they're very similar in spec but have specific differences (one that sticks out the most to me is the differences in available PWM), really depends on what your application is but for normal use they're effectively the same

>> No.1813043

>>1813033
>>1813039
sorry i was being mean

you can use whatever microcontroller you want, as long as you can fit your program on it. I don't know what the addresssable LEDs on this strip use but if it's I2C then the library for arduino is actually pretty large. you also will need a separate power supply, since you can't drive that many LEDs off of any MCU GPIO, unless by 3 LEDs max you mean 3 LED and not 3 LED strip.
it's called soldering, not welding

also, if you only need red light, then just buy red LEDs, and you can probably get away with just getting the diodes instead of a full strip (more expensive and harder to prototype)

>> No.1813047

>>1813033
draw picture

>> No.1813060

>>1813033 (You)
>>1813039
>>1813043

That RGB LED r programmable, so i can change coloro if i want, can i use a lithium cr2032 (3V) batteri for the microcontroller and the swithc??

>> No.1813061

>>1813060
no, they provide too little current, you will need normal batteries (AA, 9V, etc) or a lipo, RGB LEDs can draw quite a bit of power in addition to whatever the MCU is doing

>> No.1813062

>>1813060
i mean this also depends on application, if it's for a small pin you wear on your shirt, and only turn on briefly, then sure, but if it's a prop or toy, likely not especially if you want them bright

>> No.1813070 [DELETED] 
File: 113 KB, 903x1465, 1588249395501.jpg [View same] [iqdb] [saucenao] [google]
1813070

is ttl cookbook still worth reading? should i go buy a copy

>> No.1813081

>>1813061
>>1813062

LiPo for 3 leds??

>> No.1813100

>>1813081
200mAh is probably sufficient

>> No.1813103

shieeeeeet
attiny84 uses different pins for isp than attiny85 so i will have to make a new hat for my uno to program it
feels bad

>> No.1813110

>>1813103
Can I see your existing programming hat? I'm interested in making one of my own.

>> No.1813121
File: 953 KB, 4000x3000, IMG_20200314_170325.jpg [View same] [iqdb] [saucenao] [google]
1813121

>>1813110
i'm at work so i can't take a pic, but i have this one, you can see it in the background
it's just a lever socket on a perf board

but i want to make a pcb version where i'll add more extra pins and stuff for quick testing and easy periphetal hookup

>> No.1813159

>>1813121
>i want to make a pcb version
So do I. I wasn't actually going to bother with a ZIF socket, but maybe I should.

>> No.1813179
File: 116 KB, 1310x829, An Idiots Plan.jpg [View same] [iqdb] [saucenao] [google]
1813179

I'm hoping someone can help me out here. Is it possible to use an Arduino mini pro as a switch here, to connect the batteries in series when told to and disconnect them when told to?

My plan is to have the batteries wired up in series to cut out the need for a DC/DC converter, but I only have chargers that can charge the individual batteries, not series. So the Arduino will break the circuit during the day so a solar panel can charge the batteries, and then during the night, let's say from 7-10pm, it will connect the batteries in series to power the LED.

Basically want to make a solar LED for my dogs, if this is not something an Arduino mini pro is capable off I'll have to rethink everything.

>> No.1813181
File: 206 KB, 1347x485, Screenshot_2020-05-05_07-37-15.png [View same] [iqdb] [saucenao] [google]
1813181

>>1813179

three dpdt relays

>> No.1813184

>>1813181
I think I've seen them in desktop power supplies? How to wire them in? I'm trying to not need anything new. Will the Arduino work the way I intend?

And can I wire the RTC to an 18650 as well? The battery is slightly lower voltage than an 18650 so I have doubts...

>> No.1813185

>>1813184
>>1813181
Okay sorry, let me fix my English.

Trying not to get any new parts but if they're in desktop PC PSUs I can scavenge them. As for wiring them I should be able to figure out how to if this is going to work, only issue is, will I be able to pull it off with the Arduino, or does it not support this functionality?

>> No.1813188

>>1813100
ok i search for them..

>>1813103
i have info on attiny85, ts100 and SH72 i will search for price and memory. ATM i have arduino uno (fake ones) but it is too big.. it can't enter in the bottle..

>> No.1813194

Anyone here working with STM32F4 series? I'm trying to set up a comms driver for SPI buty compiler throws a fit over a DMA typedef not being defined.
It's in a header created by STMCube but I have successfully traced its include path to main.c and see no reason it should not be detected.
Maybe worth noting that my own source/header are included in the project, but not #include-d in other source code.
Internet was useless, only 1 topic found and solution didn't work.

>> No.1813217

>>1813194
>I'm trying to set up a comms driver for SPI buty compiler throws a fit over a DMA typedef not being defined.
Are you using that "ST Cube" shit? That stuff gives you snowflaked header files and shit from what you tell it you're using, so you have to go back and make new header files.
I really don't like the idea of using a fucking GUI tool to generate shit like that. Just give me some damn header files that I can "make clean all" with.

If not, you still need to figure out which header file that comes from. There may be some master .h file which includes everything, and it might have the DMA line commented out. Or you specified the #define for the CPU model wrong, and the #ifdef's are bypassing it.

tl;dr: you need to #include the .h file for the DMA unit

>> No.1813256

>>1813217
unrelated to the question anon above asked, what other IDEs do you suggest for working with stm32?
I've worked with stm32cube, truestudio before it was integradted into cube and Keil but mostly did my work with truestudio+cubemx.

>> No.1813341

I want to put wetness sensors around my house in case of a leak. Is there a good foss solution to email me or use some foss protocol to do this?

>> No.1813349

>>1813341
i would recommend to get a handful of ESP8266 or ESP32, a humidity sensor for each, and run the MQTT protocol on them. there are some free libraries for it, and it makes it easy to set up as a subscriber and pull eventrs from the other sensors into the central point.

>> No.1813351

>>1813341
>>1813349
here is an example
https://www.home-assistant.io/blog/2015/10/11/measure-temperature-with-esp8266-and-report-to-mqtt/

>> No.1813353

>>1813349
>>1813351
not him but is there any good way to stuff all of this hardware into a wall wart? i remember looking into that a while ago and found very few options for wall wart project boxes, and no male NEMA THT connectors at all that you could 3d print a wall wart around.

>> No.1813432

>>1813179
Arduinos aren't switches, I don't think there's any feature in an arduino that will let it function as a switch, let alone one that works on multiple arbitrarily floating voltages. You'd be better off either using MOSFETs or relays. I think two MOSFETs will work, so long as you can get that solar panel to output three lines that are distinctly seperate, and current won't flow back into the panel when the MOSFETs are connected. If not and you need to actually take the solar panel out of circuit, then you'll need to do a bunch of relay trickery like this guy >>1813181 suggests.

And I can't help but notice that you're missing current regulation to the LED and overdischarge protection for the cells.

>>1813184
You really should own some linear regulators. Even a bog-standard 50 year-old LM317 would do the trick here. Not sure if the relays in PSUs are DPDT, and it sounds like a waste of a desktop PSU to be honest. But if it's already broken and too expensive to fix then go for it.

>>1813185
An arduino is able to handle the control side of such a project, though I'd advise switching the relays with some standard transistors, making sure not to forget the freewheel diodes.

Your goal to not buy any new parts is not a very productive one. Aliexpress are shipping around the world even in this current crisis, so long as your national post office is up and running.

>> No.1813473

>>1813432
i mean all of the GPIO is basically a group of switches. you can't drive stuff off them, but for ICs with enable pins (high impedance) you can use arduino just fine for this

>> No.1813477

>>1813353
the biggest problem with these is that they need 5V to run. if you just buy some cheap wall-warts from online and 3d print or find a bigger case, that will work, but if you want it to be all in a single enclosure you need to have the transformer and whatever else to step down to 5V from the wall.

you could also do something like get some small LiPo, and charge them up and just sit them in the corner of whatever room you want. if the MCU only wakes to send a ping every hour or whatever, you can actually get pretty substantial life out of even something like 220mAh battery, and then just charge it every few months, plus it lets you move to a specific spot instead of just an outlet.

>> No.1813551

I'm trying to use the EEPROM on a Nodemcu ESP8266 chip, and I can't find the relevant data in the datasheet:

EEPROMs are limited in lifetime and I read something about 100k write cycles until it could be expected to break down, but some people also write "read/write".
So can I expect that reading from EEPROM is as damaging as writing to it or is reading no issue and only writing is?

>> No.1813557

>>1813551
reading is less much less stress on the die than writing, but i think both can contribute to failure modes. in any case, its unlikely you'll hit that using the chip normally for hobby purposes. you could also connect some other external EEPROM with a longer lifetime if you're concerned

>> No.1813560

>>1813557
Yeah it's more a question out of curiosity, I doubt I'd ever get near 100k and even if I did it's not much data and I implemented wear leveling already. Thanks for clarifying though.

>> No.1813567

>>1813560
there has been a lot of work done into this for SSDs (since obviously you want to write a lot to a storage media), you can probably find some more specifics there about how reading and writing is executed in hardware

>> No.1813730

>>1813473
They're switches that pull the output either to 5V or to 0V. You could technically use an arduino as a switch by tying one end of the circuit to the arduino's 0V rail, the other to the GPIO, and you'd switch it from logical low to high-impedance. But A: you couldn't do this to two seperate cells because it relies on a solid voltage reference, B: the current would physically go through the ATMega itself thus limiting it to a much lower value than what the anon's LEDs required, and C: there's no reverse voltage blocking. That last one might not matter, but I wouldn't want any current going through those monolithic reverse protection diodes anyway.

>>1813567
What the hell is the difference between the floating gate transistors in EEPROM and the floating gate transistors in flash memory? Is it just the arrangement of them?

>> No.1813795

>>1813341
>>1813349
>>1813351
This actually seems really easy, and relatively cheap. https://www.sparkfun.com/news/2297

>> No.1813999

Is learning TTL worth doing for a beginner or should I just try to learn CMOS

>> No.1814004

Where can I find screens that will work with an RPi4 via the hdmi rather than than the hifi connector?

>> No.1814016

>>1813999
There's almost no difference unless you're etching your own chip, and most CMOS chips these days use TTL part numbers.

>> No.1814107

>>1814004
Amazon, eBay and probably more. The one I use has GPIO headers for touchscreen, HDMI for the image but needs external power (5V). Just make sure it can use external power and has HDMI in the title and you should be fine.

>> No.1814431
File: 932 KB, 1552x873, 20200507_115051.jpg [View same] [iqdb] [saucenao] [google]
1814431

What do you think is the most obscure uC you have in your house?
Found this in an old fan.

>> No.1814444

>>1814431
Probably something in my CRT/digital hybrid oscilloscope. Though it has a couple MCUs in there, so maybe the dedicated frequency counter in my function generator is more obscure? It's specifically designed to output directly to a 7-segment display, and it's got a fast-update low-precision mode, along with a slow-update high-precision mode.

>> No.1814445

>>1814444
But is it a uC?
also checked

>> No.1814519

>>1814445
Oh, you said uC not IC. Yeah then it's probably one of the guys inside my scope.
Reading the service manual there's an HD64180R1CP10, but also a UPD78C10G. No clue which is more obscure, but you don't see many Hitachi semiconductor parts around so I'd guess the former.

>> No.1814532

>>1814431
Got a bunch of attiny10 which have a mere 6 pins.
And a couple AT89S4051 which are basicly a stripped down 8051.

>> No.1814533

>>1814431
I once found some mystery device with an TMS370 in it. I had to look that one up.
Also long ago had a sprinkler system controller that used a COP series chip. It was so old it used a calculator bubble LED display.

>> No.1814535

>>1814519
>HD64180
That's hardly obscure, it's basically a Z-180.
https://en.wikipedia.org/wiki/Hitachi_HD64180
Hitachi was responsible for both that and the 63C09. Apparently they liked to take existing architectures and extend them a little bit. I think they also extended a 6800 chip as well.

>> No.1814834

>>1814535
>the mcu has its own wikipedia page
well shit

>> No.1814852
File: 55 KB, 960x837, ni-myrio.jpg [View same] [iqdb] [saucenao] [google]
1814852

Has anyone here used one of these things? It's a FPGA. Last week my brother graduated from university with a degree in mechanical engineering and he used this in his coursework. But now he doesn't need it and asked me if I want it because he knows I'm into stuff like this. Looking on the website at https://www.ni.com/academic/students/learn-rio/ it seems to require their LabVIEW software which I don't have. Is there any other way to control it?

>> No.1814933

I bought an FPGA from aliexpress 2 months ago and it still hasn't come. What do?

>> No.1814937

>>1814933
get a refund dumbass

>> No.1814951

>>1814933
2 months means you might be fucked.

Normally under "orders" you can confirm your order or start a dispute. Next to the option to start a dispute it states when it will automatically be considered confirmed.

In the future this is what you should do when ordering via aliexpress:
When you don't get your order within the time about 3-4 days before it closes, contact the seller and ask them to prolong the dispute time. They will do this because if not they get problems with aliexpress. If it still doesnt arrive or they didnt answer to prolong the time, start your dispute. Say what happened matter of factly.
If you don't abuse this system they will side with the buyer, and you get your money back.


By the way if the product is not as described (I got red LEDs once instead of white ones) take pictures, contact the seller. Chances are they give you your money back. If not start a dispute. Aliexpress WILL give you your money back.

Don't ever wait until the option for a dispute is over. I had 3 disputes in my time and all three time got my money back. One of the packets arrived a month later and I sent the seller the money via paypal, but I didnt have to.

>> No.1815029

>>1814933
i had a DP4T switch get shipped, the shipment got canceled, and checked up on it about a month later right as it shipped again and then got it about 1.5 months after that. you get what you pay for.

>> No.1815035

>>1814852
https://www.ni.com/en-us/shop/labview/select-edition/labview-community-edition.html

Free for non-commercial use.

I don't feel like wading through more marketing nonsense on it to see if it has a JTAG interface or something else where you can skip LabVIEW all together.

>> No.1815204

Hello. I wish to get job doing assembly.

>> No.1815225

>>1814852
I'm an FPGA engineer so yea

>> No.1815242

>>1815204
Hello. Good luck.

>> No.1815285
File: 103 KB, 1136x529, stm32.png [View same] [iqdb] [saucenao] [google]
1815285

Why is STM32 pricing so retarded? I am debating whether to leave negative feedback after receiving bluepills with knockoff chips, but DESU I can see why they do it.

>> No.1815290

>>1815285
https://lcsc.com/product-detail/ST-Microelectronics_STMicroelectronics_STM32F103C8T6_STM32F103C8T6_C8734.html

>> No.1815291

>>1814852
I have one of those, you can download the DVDs that ship with it directly from NI and then use NI license activator (as in the crack someone made) to use it

>> No.1815292

>>1814852
Here u go
https://www.ni.com/pl-pl/support/downloads/software-products/download.labview-myrio-software-bundle.html

>> No.1815296

>>1814431
I found a Motorola M-core dev kit

>> No.1815315

>>1815290
So you're telling me Chang is paying half price but still felt the need to chink me? Definitely leaving negative feedback now.

>> No.1815323

>>1813217
thabks for replying. I actually fixed it the next day. Turns out I was #including the HAL SPI driver directly (as well as including a more top level header which also has it aparently) which broke a bunch of references. Removing that line made it build fine.
I am indeed using Cube, it can be a major pain in the ass but it enables the boomer PCB designers at work to figure out which pins they need for their hardware without us software folk having to decode GPIO inits for the 100th time that day.
Thanks again fren

>> No.1815364

>>1813730
>You could technically use an arduino as a switch by tying one end of the circuit to the arduino's 0V rail

No you can't. The port sinks or sources current through transistors on the specific pin. They have current limits, usually around 20mA, and exceeding that limit can physically destroy it. That is why we use larger power transistors and relays external to the microcontroller to drive larger loads.

>> No.1815370

>>1815285
Because each time you buy a microcontroller powered by ARM, part of that cost goes to ARM holdings owned by the British (who designs the controller), and the Japanese SoftBank Group that owns ARM holdings.
Gotta get those royalties for letting companies use the ARM architecture.

>> No.1815479

>>1815364
>They have current limits, usually around 20mA, and exceeding that limit can physically destroy it.
Isn't that what I said?

>> No.1815486
File: 77 KB, 623x502, file.png [View same] [iqdb] [saucenao] [google]
1815486

remember to read datasheet errata before you design your board around a uC

>> No.1815497

>>1815486
Oof.

>> No.1815594

>>1815479
You said it lowers the current that can flow, as if the arduino acted like a flood gate and only reduced the allowable current.
The board would act like a fuse and if you had too much current go through it, it would pop, not reduce how much could go through it.
At least that is how you worded it.

>> No.1815603

>>1815594
Went back and re-read the discussion. You are correct with what you said overall, but your comment stand alone sounds incorrect.
My bad.

>> No.1815766

>>1815594
>>1815603
>it lowers the current that can flow
I meant it as in "lowers the maximum current that you should put through it", but I can see where the confusion lies.

>> No.1815785

So I hate to be that guy but aren't arduinos kind of expensive for what they are?
I mean even raspberry pi's are cheaper and they offer more processing power.
Why should I choose arduino instead of raspberry pi or something else?

>> No.1815786

>>1815785
Arduino is a generic term for "compatible with the arduino ecosystem" which includes things that are like $2.

>> No.1815843

>>1815785
>Why should I choose arduino instead of raspberry pi or something else?
First of all, if you're choosing between arduino or raspi then you're an idiot. If a project can be done with a cheap microcontroller there's no need whatsoever to waste power and space with a fully-fledged SOC running a graphical desktop operating system. Secondly, the so-called "arduinos" are basically development boards for common AVR microcontrollers. The ATMega328p is a relatively well-balanced and powerful MCU that's reasonably cheap. If it suits your project well, you can finalise your design just by soldering such an ATMega onto your PCB directly, be it THT or SMT. If you need more processing power, it will almost always be better to go for a beefier MCU (e.g. the STM32 family) or perhaps something specialised like an FPGA (both of which have a variety of dev boards for solderless prototyping), as opposed to going for an SOC. I'd only consider an SOC for a higher-level project and/or one that's best done through an existing software layer (video processing, website hosting, etc.). On the smaller side of things, there are the ATtinys and PIC MCUs, some of which have dev boards. Only some of these dev boards will be supported in the arduino environment, and swapping environment could prove difficult.

I'd recommend buying a dozen MCUs (probably ATtiny85s and/or ATMega328ps for a beginner), so you can prototype with a more expensive arduino board, before soldering the ICs into your finalised project. You can program them in-circuit if you provided the correct programming header (I use a cheap USBasp clone with the firmware updated). The programming process can still be done through the arduino environment, though setting the fuses needs to be done otherwise. I just plug a single line command into AVRdude for this.

>> No.1815976

>>1815843
To expand on this, a microcontroller is a very low level, bare metal device that you can control every tiny detail with perfect timing.
You can't get that detailed on the RPi unless you program it from scratch (no raspbian OS, all custom code). Let me assure you, it's difficult.

So a 'duino / uC is less powerful, but has insane control. RPi is stronger, but harder to control exactly.

>> No.1815978

>>1815976
>Let me assure you, it's difficult.

I agree. I'm not an expert, but I've been told that modern devices of that complexity are not deterministic due to things like cache behavior, and that nobody can program them like a microcontroller even if they wanted to for some retarded reason.

>> No.1816138

Is there a 3.5 inch screen touch that doesn't use the gpio? Can usb power the touch?

>> No.1816189

>>1815978
>some retarded reason.
Cache is deterministic it's not random. Dont belittle that which you don understand.

>> No.1816230

>>1816138
>Is there a 3.5 inch screen touch that doesn't use the gpio? Can usb power the touch?

I feel like the answer to both of these is yes, but I'm not sure that there's a 3.5 inch screen with hdmi and a usb touch interface.

>> No.1816302

I like making huge ground and Vcc planes when I'm making PCBs because it makes routing so much easier (just throw a via on the pad to connect to one or the other plane, done). Is this bad? Am i making some weird capacitive coupling effect between the layers by doing this? Is there anything i need to keep in mind when doing copper pours the size of the PCB?

>> No.1816304

>>1815978
it's not a retarded reason, you could do it if you had a full engineering understanding of both the hardware of the rpi and the kernel running on top, it's just really unfeasable plus a waste of time when you can just buy a micro for like under a dollar and call it a day without any further thought

>> No.1816321

>>1816304
the whole point of having something high level like a SoC or pi or whatever is not having to worry about the little things like memory management and whatever when you're trying to make a more complicated embedded project

>> No.1816338

>>1816302
no, it's correct. You are making a giant capacitor which helps filter noise out of the power net. It's basically a giant bypass capacitor.
not only that, but it's good to have a large ground plane. Signals propagate as a wave between the trace and gound. sure, the electrons follow the traces, but the EM waves want to go between ground and the trace. If you don't have ground near them, they'll go find one. then you'll have inductive coupling.
Big power planes are great.
One caveat is you don't want them near most antennas.
There are exceptions to all this of course, but generally speaking, it holds.
Watch some of Dave's vids on PCB layout on EEVBlog.

>> No.1816389

>>1816338
thanks for clarifying. i was mostly concerned with if the size in combination with the capacitance would cause any issues. he had that one video using copper planes as capacitors but i don't really have enough understanding of the engineering to know if that can help or hurt my designs, but i guess his thing was mostly for high frequency circuits.

>> No.1816404

>>1816389
Makes sense, and you were right, it just happens that a capacitance you are generating is beneficial.
While it may not be strictly necessary to think of the copper and substrate of a PCB as a bunch of resistors, capacitors, and inductors to get a project done, it does show you are "getting it".

>> No.1816421

does anyone have a good camera recommendation for an arduino nano? I've looked into a few but I'm not sure if they're good with the nano

>> No.1816437

>>1816421
honestly didn't know they made cameras for arduino, I would imagine the resolution is super low. what's the project? rpi cameras are cheap (~$20usd) and have good resolution plus since you're on pi you can have network access, image processing, etc

>> No.1816442

>>1816437
the project is recording my trash cans to see if raccoons are breaking in. the ESP32 is a wifi cam that is supposedly programmable with Arduino but idk about that. Maybe I just go pi

>> No.1816446

>>1816442
Just use a PIR sensor instead

>> No.1816450

>>1816446
then how could he be sure it wasn't a bear or a poor person breaking in instead?

>> No.1816451

>>1816446
>>1816450
yeah the idea is to see what is getting in. i have enough memory to record a night but want a high quality camera.

>> No.1816491

>>1816442
oh actualy i have seen some really good results with the ESP32 camera. I would recommend that based off success of other projects i saw online.

>> No.1816567

>>1809437
nrf52 series is pretty good for BLE. their software SDK is pretty nice to work with too.
The processor also has some nice hardware features like any gpio can be mapped to any of the hardware peripherals like i2c or uart so you're not limited to dedicated pins for SFIO and their PPI system is pretty awesome for programmatically controlling hardware interrupts between separate peripherals.

>> No.1816568

>>1813194
check your include directories in the Makefile.
Chances are the file/folder is not there.
The alternative is to put the full path in the #include

>> No.1816569

>>1815285
>knockoff chips
what do you mean knockoffs/ how did you know it was a knockoff. I ordered that exact chip a year back and had no problems on LCSC with programming and the chip ran fine.

>> No.1816592

I'm not sure if this is the right general but can someone point me towards a good datasheet or primer for composite video signal generation? I've been following Ben Eater videos and got to the vga one and hoped for a good reference for composite to use a mini crt I picked up that I wanna use for a 6502 microcomputer build but I don't know how to search for it. Thanks

>> No.1816593

>>1816592
I think you mean specification for composite video, but maybe not. Buy hey, here, read this:
https://www.maximintegrated.com/en/design/technical-documents/tutorials/1/1184.html

>> No.1816615

>>1816451
Oh you're just recording the data, not trying to parse the data to detect raccoons. I misread that bit. In that case get a PIR-triggered game camera.

>> No.1816662
File: 305 KB, 1366x1436, chips.jpg [View same] [iqdb] [saucenao] [google]
1816662

>>1815976
What about pic related?

>> No.1816664

>>1816662
They must be super cheap because I have a stand fan that uses the same PIC for both the mainboard and the remote.
I thought they'd use some low tech asic for that.

>> No.1816665

How long can you run a STM32 off 2 alkaline AAAs?

>> No.1816666

>>1816665
between days and years depending on current consumption of stm32 and other circuitry

>> No.1816672

>>1816662
Those are both microcontrollers, just different sizes and some peripherals. Both would be pretty simple to use with bare metal programming.
It really depends on what your application is and your need for a uC.

>> No.1816674

>>1816662
ATtiny85 are a little over a dollar at Mouser.

Who the fuck buys electronic components on Amazon?

>> No.1816675

>>1816189
Cache behavior in a modern,
high performance processor is not deterministic in a meaningful way for somebody developing software for it.

>>1816662
Fuck PICs. They were compelling 20 years ago when they were basically the only reasonable microcontroller for hobbyists, but I'd say just skip over them unless you have previous experience you want to make use of. The Atmega stuff is solid, and I'd also recommend looking at MSP430s and RL78s.

Also, don't buy shit off of Alibaba or Amazon; those ATtiny85s are $1.20 on DigiKey. If you're going to ever consider spending $7 per part on a microcontroller you better have a really fucking good reason.

>> No.1816690

Do you use shit like debugwire or jtag? I usually just debug via serial on uno and then slap it on the board already finished

>> No.1816701

>>1816690
SWIM is great.

ST is the only who gets it right and lets me debug shit with 2$ hardware.

>> No.1816712

>>1816701
>SWIM is great.
...unless you're trying to write your own implementation for factory line test/programming equipment because where you're working only used the lowest-end STM-8s that don't have a serial bootloader. (ended up burying an ST-LINK in there and needing a real PC for initial code load)
Anyhow SWIM is only an STM-8 thing, how would you even be using it for anything else? STM-8 is ST's 68HC11 tier 8-bitter, and after actually using it in real development, I would never recommend it except maybe over classic (non-MIPS) PIC.

>> No.1816716

>>1816712
What else do you need it for?
STM32s are ARM-based so they already come with SWD.

>> No.1816721

>>1816716
That's what I was basically saying. SWIM is completely obsolete, it's one of those PWM protocols (1/3 vs 2/3 self-clocking) that's a pain in the ass to bit-bang. You basically need to set up a timer module that loads the PWM durations from DMA, which means you need to learn all that shit for whatever chip you want to be a SWIM master.
ST's serial bootloader may be a little complicated to use, but it works with a standard UART that almost everything has. You can easily use it to get one STM32 to program another.

>> No.1816722

>>1816690
nope
i put ISP header on my boards since i use atmels and then i can use it for flashing now code and also debugging
these inline debugging protocols and shit are only handy for like big boy complicated chips but for small pieces of code they aren't needed

>> No.1816727

>>1816722
i don't even put proper headers there, i just make 6 THT holes and then push pogo adapter into them if needed, since 90% of the time i don't even use the isp header so it would be a waste of pins

>> No.1816728

>>1816716
Clarification here, there is no SWIM in STM32 at all, it is literally only in STM8. It does not exist in any other chip, except maybe something ancient and long gone from ST (I think there was an STM7) So if someone thinks it's "great", they're definitely not using STM32.

>> No.1816739

>>1816728
Every ST-Link support SWIM and SWD. That let's you debug any ST MCU you'd want.
What other company offers debugging for 8-bitters with 2$ (10$ for official hardware) that I can also use to debug random ARM chips?

>> No.1816746

>>1816739
>Every ST-Link support SWIM and SWD
I wasn't talking about what ST-LINK supports.
There. Is. No. SWIM. In. STM32.
The only reason ST-LINK supports it is because that's all STM8 has. Have you noticed that the chink ST-LINK clones don't support it? That's because nobody with a brain gives a fuck about STM8.
>any ST MCU you'd want
I don't want STM8. I learned this 10 years ago when I had to actually use it. The only thing I hate more than than STM8 is classic PIC. MSP430 is quite nice, if you can accept having to get debug pods from TI.

>> No.1816751

>>1816746
>There. Is. No. SWIM. In. STM32.
I know. I just don't understand what's the problem with that.
There's no reason for them to support it. And on the other side it's rare for an 8-bitter to support SWD/JTAG so I don't see problem there either.

> Have you noticed that the chink ST-LINK clones don't support it?
But they do.

>I don't want STM8. I learned this 10 years ago when I had to actually use it.
Good for you. I don't mind them. They're cheap (both the chip itself and the debug/programming hardware), they work with open-source software, and there's a C compiler for it. That's really all I care about.
My only problem is the lack of DIP versions.

>> No.1816754

>>1816751
>But they do.
But they don't. They use code dumps of the onboard STLink from ST's dev boards. Which doesn't support STM8. If they claim to support it, it's just your typical chink cut-and-paste of the regular STLink ad copy.

>> No.1816761

>>1816754
Yeah, it's true that some of the Discovery boards don't have the full ST-Link but some of them do have the full V2 including SWIM.
And I have used cheap st-link clones with STM8s. They do absolutely support it.

>> No.1816779

Is there a way to store and view html files in an 8 bit chip?

>> No.1816783

>>1816675
Alibaba is fine if you want bulk shit, and AliExpress is fine if you want smaller quantities. Both at competitive prices with cheap shipping, and a good dispute system if you get chinked. Just be aware that you get what you pay for. I'd maybe suggest LCSC instead.

But that's because there are no Digikey or Mouser or Arrow or Farnell warehouses where I live, so shipping alone is usually cheaper from china. China Post Registered Air Mail is king. But your mileage may vary.

>>1816779
Not easily. What sort of parsing are you going to do to it, and what sort of display do you want to show them on? Want CSS too?

>> No.1816785

>>1816783
the display would be a 3.2 inch lcd display or something like that and it wouldn't need to include css, just the html.

>> No.1816806
File: 65 KB, 450x568, yacht.jpg [View same] [iqdb] [saucenao] [google]
1816806

>>1812677
Hi (no ohm thread sorry),
I have a small wooden yacht a family member made many years ago, he had the intention of making it remote controlled. He designed the frame perfectly with the right considerations, but he had no idea about electronics.
I have started to do up a plan for designing the electrics for the boat, and I have some idea of what I want to do.
I am a competent sailor and have a lot of programming experience through my degree, but very minimal electronics knowledge.

small "pully like rollers" attached to the deck, that control the boom. Connected to these rollers would be two stepper motors, one on each side to set the sail to a different tack. I would then have a servo to control the tiller (and hence the rudder).
For achieving this I was thinking about programming an Arduino board?
Bare in mind I have to make all of this water proof, while the hull of the boat is water tight as it is once piece, water can still get through the hatch/companion way in the top (used for housing potential electronics).

Before I even get to controlling the boat, I was going to breadboard a test with the three motors and some sort of RF transmitter to receiver, to see if I can control the motors, and test any code I write.
Does this sound possible, or does anyone have recommendations for someone relatively new to electronics? There are other ideas I have (wind sensors, gyros, speed, etc), but I feel that I must get the basics working first.

>> No.1816947

>>1816806
this isn't a direct answer to your question, but the electronics part of this project will be trivial to the electrics and mechanical aspects. figure out the mechanical fixtures, motor sizes, and power provisions for what you need. then tally up the expenses and see how much money it's going to cost you.

>> No.1816958

>>1816593
This looks to be exactly what I was looking for, thank you

>> No.1817267

Does any kind of hardware stuff belong here? like old video game console hardware?

>> No.1817286

>>1817267
That depends, /mcg/ got mainly started as a sibling of sorts of /ohm/, because they disliked microcontrollers (specifically arduinos and raspberry pis). I'd say you probably have better chances posting in a /ohm/ thread.

>> No.1817291

>>1816806
That's incredibly vague, so I won't be able to really give you concrete answers, sorry about that. That being said >>1816947 has a point, the mechanical part is more complex.

Are we talking a human sized yacht?
Your main issues will be the following: Motors with the kind of power you need for sailing cost a bit more, and you have to make everything splashproof, too. That being said, don't get intimidated by Arduino, getting started is like legos, it's really easy. If you want to optimize though you can see how deep the rabbit hole goes, there's a lot of nuances.
If you want to add sensors, maybe gps etc later, consider the following: Arduinos do not have very much processing power. So if you want to do heavy data calculations consider either using to arduino to communicate the data to a computer that does the calculations or consider using a raspberry pi. That's a lot more like a computer but for sensors and motors it has enough IO capabilities.

>> No.1817430

>arduino
Can't he just use a dedicated RC vehicle receiver of some kind? With servos for the mainsheet and the rudder. I imagine there are waterproof servos, otherwise making one out of a small BLDC is probably acceptable.

>> No.1817573

>>1817430
He can, but arduino allows for much more improvements along the way, especially when more sensors etc are required.

>> No.1817605

>>1816675
>Fuck PICs
>The Atmega stuff is solid
Literally both owned my the Microchip company, stop being a brand whore.

Also, PICs have kept advancing over the years. dsPIC at 16-bits with DSP engines and dual cores. 32-bit PIC32's running at 200+Mhz with more peripherals you can handle. Remappable peripherals to multiple pins for flexibility. Real-time debugging with code modification on the fly.

If you're going to slam a brand or company, do your research.

>> No.1817764

>>1817605
>PIC32
PIC32 isn't PIC, it's MIPS. The old PIC architecture might have been okay in the '90s, but shit which isn't designed for C is shit. Even AVR has a problem called PROGMEM, but it's nowhere near as bad as having to deal with bank switching.

>> No.1817786

>>1817605
You're a fucking moron if you seriously think Microchip owning both products means anything at all. Even if it did matter, Microchip has owned Atmel for less than 5 years.

MPLAB sucks. Writing assembly for PICs suck because of having to deal with memory banks. Having no open source options for compilers sucks. PIC32s are completely different than PICs that compete with Atmel parts. Haven't used the DSP parts myself, so I can't comment on that. Plenty of microcontrollers can remap peripherals. PIC debuggers are nothing exceptional.

They're not awful, but if you really think a beginner would be better off starting on PIC instead of ATmega, you need to check back in to reality. This is coming from somebody who doesn't even particularly like Atmel parts.

>> No.1817799

>>1817786
SDCC supports PIC

>> No.1817807

>>1817291
Approximately 1.2m long by 30cm wide and the keel is about 30cm deep, off the top of my head.
I had considered that there would be processing and memory limitations and I have found a few solutions for this. Namely expansion modules or alternative boards (I.e. raspberry pi).
I also have a theory as to how the physical components interact with the real world. Which is what my programming will be based on for the prototype. I don't think I would call it a proof, but it's a start.
I'm too tired to go over the details but it seems like it will work. I might write up my notes tomorrow if people are interested.

I don't intend this to be a quick project, but I do intend doing things properly so I can learn electronics and maybe some physics.
I have discovered so far I will need at least two bipolar stepper motors for my prototype to begin thinking about how to work one sail on two tacks. But the ardunio natively likely is already at its limit as the module required for the bipolar motors requires a few calculations from the ardunio.
But I will still use the uno for prototyping and see how it goes.

When doing the math for the servos in relation to wind and direction, I also found that I can control the sail only using one bipolar servo (as opposed to two) using pullies. But having two means that I can use two smaller bipolar servos and might be better for balance and the boat sitting flatter in the water (which is faster).
So a lot of ground work to do. I was hoping opinions on here might help speed it along.

>> No.1817808

>>1817799
The branches for it are a work in progress last I checked, and have been for years. It's not a good sign when they consider their support for some Padauk lines better than their PIC support.

>> No.1817882

I used PICAXE in school

>> No.1818075

>>1817882
congrats anon

>> No.1818097

>>1817764
>PIC32 isn't PIC, it's MIPS
You're correct, its not the normal PIC architecture. At least Microchip was trying something new and they have even kept advancing on top of that. Can't win them all.

>>1817786
>MPLAB sucks
Does that include MPLAB X? Not going to argue that, but I've used much worse.
>having to deal with memory banks
That is a constant argument I've always heard, but its not as bad as anyone says. I've used them forever and never had a problem. I only hear that from people who tried it once and failed.
>no open source
Seriously? So it has to be open source to be any good? They have free XC compilers for all their uCs.
>shit which isn't designed for C is shit
Lots of serious engineers use asm. It is much more exact than C. If you only program in C, go ahead and keep using an arduino or jump on a raspberry Pi because you aren't doing anything with exact time constraints that matter.
>Plenty of microcontrollers can remap peripherals
Now days its much more common, but most are only in very expensive chips.

PICs aren't the best in the world, but so many people shit on Microchip without even using them, or they have used them 15 years ago and think they're all the same. I'm only spreading facts about them, not trying to parade them as the best.

>> No.1818339

>>1817807
Let's say it like this:
Arduino and Raspberry are fundamentally different types of chips. An Arduino is a microcontroller while the raspberry Pi is a system on a chip (soc). RPi is more like a computer and you need external boards for analog readings, but the processing power is a lot higher.

As for your project, consider that motors can draw significantly more current if the torque needed spikes for whatever reason.
Depending on what chips you use and what what power system, also look into decoupling capacitors to not fry your stuff.
Lastly if you mechanically couple certain servos, consider that if you get cheap ones they may not behave exactly the same, so make sure they don't start working against each other.

I think those are the more common pitfalls I see.

>> No.1818362

>did intro to mcu in undergrad
>got laid off recently from mep job
> figure I should refresh myself on mcu and embedded systems
>do the edx fitness project
>finished it and talked about it on a recent interview for embedded developer
>feel good, but like I need more practice implementing an RTOS

anybody got some cool projects implementing an RTOS? I have an stm32 board layin around, thinking of maybe doing something RF related.

>> No.1818369

>>1818097
Most of your points are fair. However, I disagree with 2 points.

>Lots of serious engineers use asm. It is much more exact than C. If you only program in C, go ahead and keep using an arduino or jump on a raspberry Pi because you aren't doing anything with exact time constraints that matter.
In 99.9% of cases programming in C is nearly identical in timing as ASM, especially since processing speeds are pretty high nowadays. Before when working with 4mhz or sub mhz processors, sure it could matter, but nowadays not really. However, python or C++ are definitely different and should not be used for critical timing.
>>Plenty of microcontrollers can remap peripherals
>Now days its much more common, but most are only in very expensive chips.
This is just blatantly false. Most modern ARM chips can remap peripherals just fine and are dirt cheap. It used to be a unique selling point, but is not anymore.

I agree that the massive shitting on PICs is a bit unfair too, but in most circumstances they just are a bit archaic compared to more modern cores.
You have to realize that the people shitting on microchip and PIC are using hyperboles, but that you are doing the same except in the other extreme. Please do keep it factual.

>> No.1818394

>>1818369
I'll agree that you can keep timings tight with C on modern uCs because they are incredibly fast, and stand alone peripherals can handle timing on their own. I still run into situations more often than not that requires assembly to make a system work correctly. But those are few and far between.

As far as remapping peripherals, I was unaware ARM could do it across their chips. I tried to look it up before, I suppose I missed them.

I see what you are saying, I'm not trying to come off as a Microchip fanboy, it just bugs me when MC gets shit on all the time and they produce good chips. Facts are life.

>> No.1818402

>>1818369
>In 99.9% of cases programming in C is nearly identical in timing as ASM
Sure, when the architecture and instruction set is designed for a C-like language. When most of memory is a bank-switched register set, not so much, at least not unless you force the programmer to stick to a very small subset of C.
I've seen what C-generated Z-80 code can look like, and it's not pretty. I basically grew up on the Z-80 and the code was from another planet.

>> No.1818570

I have an ESP which just starts pushing out data over UDP whenever powered on, however, sometimes I'd like to apply some configuration changes to it over the air. How should I go on with this? I was thinking I'll set it to listen for TCP connection for 10 seconds from power-on, while simultaneously pushing UDP in case no configuration will be done. Programmatically, can this be done with just an if clause that gets fulfilled after 10 seconds of power on? Disclaimer, I have no idea how networking works

>> No.1818808

>>1818402
Different anon here.
How the fuck do i learn Assembly? Its nothing like programming in C or Python.

>> No.1818971

>>1818097
>MPLAB X
NetBeans as a whole is just past its due date. There's worse, but most of the Eclipse-based environments out there are better on the whole.
>memory banks not as bad as anyone says
They're a nuisance. No, it's not the end of the world, but there's a reason most designs have converged on a single memory space.
>has to be open source to be any good
Not necessarily, but not once have I said to myself "fuck me, I really wish I was using the proprietary compiler right now." I've said the opposite plenty. In just about every instance they're a licensing headache with little upside.
>not designed for C
That wasn't me, and I will agree that it's a pretty bad take.

I've used them, and I've seen better and worse. Personally, I would never recommend them to a beginner, but to each their own.

>>1818808
Just do it. Implement the basics of an RTOS or work with some processor features that can only be handled through assembly and you'll get a pretty good handle on it. Checking the disassembly when you're having issues with C code is also a good way to get an idea of what's going on. At this point in time, assembly is much more something you do to make targeted performance increases and the like more than it is something you do general programming in.

>> No.1819436

>>1813181
>Uxcell
do NOT buy from these fags, or from Sodial. they are an actual scam.

>> No.1819760

What have been your favorite resources for learning Arduino and other microcontrollers? All of the Arduino projects I have done have just been adaptations of other people's work. I really want to learn more in-depth stuff. I see shit about bitbanging and baud rates and I have no idea if that is something way too advanced for a beginner. My favorite projects have been things that involve reverse engineering shit like the Gameboy link cable protocol or using an Arduino to automate shiny hunting in Pokemon.

>tl;dr
What are some not-shit Arduino resources to become well-versed in programming it?

>> No.1819795

>>1818808
i found it really helpful to follow along with the Ben Eater 8 bit computer videos, they really give you a guided intro. Then you can try and look at the opcodes and instruction set for your computer and build some small program. I always thought approaching from hardware made more sense since you get a tangible idea of how the memory is read and wirtten and stored over the bus and it helped me understand the basics pretty well.

>> No.1819797

>>1819760
when I was first starting arduino I found it really helpful to just read the documentation. It gives you a pretty thorough overview of all of the basic functions and usually a few examples of how to use the code, and you might have an "a-ha!" moment where you think about how to connect things in an interesting way. just keep doing projects until you identify something you want to do that has a poor implementatino, and try and improve on it.

>> No.1819857

>>1819760
google > stackexchange
Assuming you're familiar with basic digital electronics, a quarter of the work is knowing how the platform (arduino) works, a quarter is knowing the relevant communications protocols, and the rest is being able to express your intentions as code. In the case of a link cable, then you'd need to look up how that protocol works and ensure that it's compatible with your existing general digital knowledge. In the case of shiny hunting, you need to apply that digital electronics knowledge to figure out how to interface with the hardware in the first place.

Included in that digital knowledge is understanding different logic families and logic levels, what an open-collector is, how pullup and pulldown resistors work, where to put capacitors, current sink and source tolerances for various components, and how to implement higher-current interfaces using transistors and resistors. Some analog knowledge would be good too, because using RC filters, voltage dividers, op-amps, etc. is handy in general. Actually understanding logic gate circuits, karnaugh maps, demorgan, etc. isn't actually very important these days, so long as you understand how to construct boolean statements in your code. Very rarely will you have to use discrete logic gates, though for me the occasional single transistor inverter pops up when I'm trying to save on ICs.

Also watch Ben Eater's videos. I really like his series on data transmission and/or error correction, and how he eventually explains the CRC. It also covers (or maybe that's a different one) a few different data protocols, like the manchester encoding in ethernet. Manchester encoding is pretty neat. So are CRCs.

>> No.1820074

Does anyone know of a hardware RAID controller board that's designed to be operated externally, or if it's possible to turn an Arduino or something into one?
I want to make a USB 3.0 external storage with multiple drives in RAID, but all the controllers I can find are designed for internal use in PCIe slots, the pre-built enclosures are all $100+, and the only Raspi that supports USB 3.0 is $80.
I just need a board that takes power and a USB cable and turns that into two SATA outputs, I don't get why that would be so hard to find. Surely they must exist, unless all the enclosures being sold are just running entire computers within them to handle the RAID.

>> No.1821210
File: 155 KB, 1043x763, 85514.jpg [View same] [iqdb] [saucenao] [google]
1821210

I'm a bit of a retard so I think it best I ask here before i spend any money

would a setup like this potentially enable me to piggyback or emulate any kind of USB device? like for instance a mouse or keyboard?

>> No.1821248

>>1821210
not really. arduinos don't have built-in usb, they just have a usb-to-serial converter, the little black chip closest to the arduino's usb plug in your pic. you'll need a teensy or any other board that wires usb data lines directly to the uC. also D- needs to be connected, it's not just another ground.

>> No.1821269

>>1821210
not even close.
USB 2.0 is 480 MHz, Arduinos...arent.
USB is differential pair, you absolutely have to read both as a diff pair to know what you're getting is correct.

>> No.1821281

>>1821210
You need a chip with a USB hardware unit on it, usually you need higher spec chips, usually ARM. The exception is that there is a bit-bang USB library out there, but it's gonna be jank as fuck except for very low performance requirements.
And then it's almost always going to be device-only, since USB host requires a lot of brains to handle stuff like hubs.
FWIW, a blue pill has a proper USB device port, and it's already built in, on a $2-$3 board. Higher-spec STM32 may have hardware support for host mode too. Teensy is another favorite for making usb thingys, especially for USB MIDI.

>> No.1821305

>>1821281
This wont work at all, since OP is trying to sit in the middle and therefor needs to support the wire spec. You're off a layer.

>> No.1821344

>>1821210
if you want to emulate a usb device you only need the male part that plugs into a computer. USB devices are just software descriptors sent by the device to the computer to know what it is, which can of course be emulated.
if you want to make a packet capture/injector is when you would want the inline setup you drew.

>> No.1821418
File: 12 KB, 265x265, beagleusb12-rgb144.jpg [View same] [iqdb] [saucenao] [google]
1821418

>>1821305
Ah, I misunderstood what "piggyback" and "emulate" meant. Yeah, nah, that stuff don't come cheap, even the cheap-looking stuff.
https://www.totalphase.com/catalog/product/view/id/13/s/beagle-usb12
Look at that little fucker, four hundred bucks.
The high-speed version, twelve hundred bucks. And that's still USB 2.0.

>> No.1821535

>>1821210
You can bit-bang USB 1.0 with a couple of zener diodes, like what the Micronucleus bootloader does for the Digispark, but it won't be very fun, or good, or fast.
>D+ and GND as the power pins
lmao you really have no clue

>>1821248
That black chip is actually an ATMega8U2, only the nanos (and maybe some Unos) have that CH340 USB-Serial IC. Not sure if the 8U2 has direct USB (it uses voltage dividers on the data pins after all) but it's better than a USB-serial IC, probably.

>>1821418
Wait, so what does he actually mean?
>that link
Isn't that just a logic analyser specifically designed for USB? Pretty sure an FPGA and a RAM IC would be cheaper than that. Actually getting the (parsed) data to a computer for permanent storage and display would be more difficult than piping it straight into RAM, but still probably reasonably possible with the FPGA.

>> No.1821732

>>1821535
People are really confusing "a device which can behave as USB" with "supporting any USB device". You cannot support the full USB 2.0 spec with an arduino. They are not fast enough.
Just because you see some random chip connected to D+ and D- does not mean it can support the full spec.

>> No.1821846

>>1812677
I have a shitload of 2.5 drives, mix of ssd and hdd, some in enclosures and some loose. I've set up software RAID before, I dunno exactly what I'd do here, but my main question is: what's the best way to power all these drives and connect them to an rPi?

>> No.1821869

>>1821846
Get an external USB case, hopefully your drives are all SATA, but I'll bet the chinks would still have a bunch of old 44-pin IDE cases in their closets. There are also adaptors without cases for when you just want to temporarily hook up a drive to copy shit off of it. I have one and use one of those silicone wristband thingys to keep it from falling off the drive.

>> No.1821877

what are the conventions for using xtals on 2 layer boards (both shredded up gnd planes)?

>> No.1822044

>>1821877
i'm not sure i follow. if you're shredding your ground plane then don't, at least not around the crystal. route 90% of your board like it's single sided and then run the final 10% of connections on the bottom layer through the ground plane as required.

>> No.1822067

>>1821877
what does shredded ground plane mean?

just draw a keepout zone near your xtal on both layers if possible but just the side it's mounted on at the minimum

>> No.1822068
File: 454 KB, 720x969, Screenshot_20200516-183337_Firefox.jpg [View same] [iqdb] [saucenao] [google]
1822068

Thoughts on this kit?
https://www.amazon.com/ELEGOO-Project-Tutorial-Controller-Projects/dp/B01D8KOZF4/

>> No.1822082

>>1822068
If you have nothing, it's good, you'll eventually find the parts useful for things. It's always good to have an assortment of parts.
There's no real reason to get a kit unless you want the assortment of parts. If you don't have any parts, a kit's a good way to get them all.
Other than that, are you getting it for a purpose other than learning? Without knowing your purpose, it's impossible to know if something is good or not, since tools are suited for purposes.

>> No.1822092

>>1821732
who said anything about usb 2.0?

>> No.1822127

>>1822082
You know what fuck it.
It's like $35, I just bought it. Consequences be damned.

>> No.1822154

>>1822082
It's going to be for learning, and I don't already have an assortment of components

>> No.1822207

>>1822127
Excellent choice. Having parts > not having parts in all cases.

>> No.1822228
File: 33 KB, 400x358, Dd6rO[1].jpg [View same] [iqdb] [saucenao] [google]
1822228

>>1812677
never seen this logo/marking design. the ones i've had looked a lot more modest and less flashy. and more professional 2bh. like this one.

>> No.1822230

>>1822068
>only two transistors
>no diodes either
Blowing shit up by switching a motor or relay directly with no freewheel diode in 3,2,1...
Also what is that DIP IC on a green board? Stepper driver? 7-segment decoder?

>> No.1822231

>>1822127
amazon shipping anything these days? how long does it take?

>> No.1822234

>>1822228
The op's pic is just for ads and promos not a real marking

>> No.1822238

>>1822231
Amazon have local warehouses in a lot of countries, so they're actually more likely to ship than a lot of international products. But since china is literally in a better position than the USA and a lot of europe as far as the virus goes, and china is basically the only place other than the destination country that's likely to have what you want in a warehouse to buy from, that probably doesn't apply. There aren't many countries that are better off than china in terms of covid-19.
But it's not like Amazon stuff doesn't ship from china at times, from what I've heard.

>> No.1822239

>>1822231
Takes about 2-3 days longer than it did before the whole worldwide pandemic thing. Amazon might be endangering their employees, but they still ship.
>>1822228
Yeah, I just used the picture of the chip on mouser, the ones you actually get never look like that, thankfully.

>> No.1822257

>trying to bury my anxiety by resuming my hobbies
>too many unfinished projects
>can't concentrate and keep checking the news which just makes things worse
fuck this corona shit

>> No.1822263

>>1822238
>>1822239
I received a package from China mid-March! Something I forgot I even ordered back in January. Mid march was the peak of panic buying of toilet paper and guns and other shit. While I received a $3 part from Ali...

>> No.1822278

Hi,
I want to make a (battery powered) circuit that monitors a door
If someone closes the door, I want the arduino to turn on, send out a signal over wifi, then turn off
If someone opens the door, I want the arduino to turn on, send out a signal over wifi, then turn off

The input is easy enough with a reed switch and maybe a latch, but I have no idea how to tell the Arduino to turn on and off in response to a flip in input. Could anyone offer any advice?

>> No.1822281

>>1822278
You want to use interrupts. I imagine you want to know what state the door will actually be in, right? In this case, you may want to build a dual edge-detector circuit for the interrupt, and after it's interrupted the arduino you just digitalread a different wire to figure out whether the door is open. As opposed to just constantly running a loop and checking if the door is open each iteration.
Also use a hall switch sensor (not an analogue hall sensor) instead of a reed switch, because hall sensors are faster and more sensitive, and also less physically delicate.

>> No.1822286

>>1822281
Thanks for your response, hall switch sensors seem like a more suitable choice.
I'm not sure if the state of the door needs to be sensed, as long as an initial state is provided. If the state is changed, then the circuit would send out a signal opposite to the previous one.
That does open the possibility of the door coming 'out of sync' with the circuit, but I don't see how that scenario could happen in this application.

>> No.1822321

>>1822281
What on earth would it need interrupts for? the arduino is starting from a power off state, and ending in a power off state.
When would it even receive an interrupt? All state is decided before the arduino is powered on. It literally would never receive an interrupt based on OP's spec.

OP you need a a soft power switch which latches on and can be turned off by a GPIO.

Go here and look at "Latching Style with safe shutdown"
https://macrofab.com/blog/power-control-product-starting-stopping-electrons/

>> No.1822329

>>1822321
Maybe he was thinking to use the "Sleep Forever" command from LowPower library, and 'wake up' the uC when the sensor latches. I think that is a good power budgeting idea

>> No.1822331
File: 29 KB, 1024x537, latchstyleforMCU-1024x537.png [View same] [iqdb] [saucenao] [google]
1822331

>>1822321
I was assuming that having the MCU sit in low-power / sleep mode would be sufficient for saving battery power, as that's the primary motivation for having the arduino turn off after sending the wifi data in the first place.
Your soft power switch basically externalises this process to a dedicated circuit with a lower q-current, but that only matters if the q-current of the MCU will take a significant chunk of his battery capacity compared to what the MCU does when it's been interrupted. And it also needs to take into consideration the Q-current of the magnetic sensor. Hall sensors can be a little high, so maybe using a reed switch is the right idea. Considering that it needs to transmit wifi, I'd imagine that this standby/sleep current is pretty insignificant, hence making an external latching circuit mostly useless.
But in the case that it's not, this circuit from your link would make a pretty good and cheap soft power switch.

I haven't actually done any low-power programming so I'm unfamiliar with what state your MCU has to be in for interrupts to work, but I've certainly seen such a method recommended a few times before.

>> No.1822337

>>1822321
Thanks, I was a little confused by the interrupts thing, your post is really helpful.
I messed with Arduinos a bit 3 years ago, but I remember pretty much nothing, so this is my first real project.

>> No.1822339

>>1822331
> spec says turn on
> I'll just assume it's already on
This has nothing to do with quiessence, and everything to do with understanding the specification as it was written.

>> No.1822398

>>1822339
I was reading between the lines, and assuming that if he knew that an arduino had a low-power mode and how interrupts work he'd have changed the implied "arduino is off when it's not transmitting data" requirement to "arduino is using a much lower amount of current when it's not transmitting data" instead.
Mindlessly building to a specification that isn't necessarily made with all relevant wisdom in mind isn't the smartest of moves.

For an extreme example, if some guy came along and said "ok I need a 10W potentiometer to use as a variable voltage divider to use as a benchtop power supply" you wouldn't direct him to such a potentiometer, but rather refer him to a more sophisticated power supply topology.

>> No.1822701

>>1822228
That's just the gay-ass logo style that ST uses for marketing. Did you think that was an actual chip? How do you think they balanced it on a corner like that?
>>1822231
>>1822239
I ordered something from Amazon the week before last and got it Friday, the shipping time when you order is way out there, but it will probably still take a few days less unless you're ordering something that's in low supply and high demand. I think they're hedging their dates a bit on everything just to be safe.
>>1822321
>What on earth would it need interrupts for? the arduino is starting from a power off state, and ending in a power off state.
And how does it power on? When a MCU is in a deep sleep state to save power, an interrupt will wake it, then it does whatever and goes back to sleep. Set the input to generate an interrupt every time it changes to wake it up. Note that some MCU GPIOs don't have an "interrupt on change" option, so you have to set it to "interrupt on raise" or "interrupt on lower", whichever is the opposite of the current state.

>> No.1823129
File: 96 KB, 818x743, 20200517_233553.jpg [View same] [iqdb] [saucenao] [google]
1823129

Currently waiting for stuff to arrive for my new project. Project is a force-feed back steering wheel system. Pic related is the motor controller.
It has two STM32: STM32F407VG is used for MMos, which is a readily available HID firmware, I might do a custom job on that some time. Second is an STM32F302RB, it's compatible with the STM32 Motor Control Suite.
Both are USB ready, so when I'm bored I can just use the F302 with a custom firmware and ignore the F407.

>> No.1823134
File: 70 KB, 839x629, 20200517_233555.jpg [View same] [iqdb] [saucenao] [google]
1823134

>>1823129
Second part is pic related: The heart of the actual steering wheel. It's an ESP32 handling buttons, paddles etc. It also contains a switch mode charge controller and a buck converter. Also a CP2102 for programming and USB power state management. It will be powered by a single LiIon cell and can be charged by USB. It's a 2-layer job btw, inverter is 4-layer.

>> No.1823141
File: 78 KB, 864x658, 20200517_233551.jpg [View same] [iqdb] [saucenao] [google]
1823141

>>1823129
>>1823134
This board handles HID I/O and rumble pack drivers for the pedalbox and shifter. It's just an ATmega32u4 because it's Arduino compatible which in turn has HID libraries. There's also SimuHub, which can generate code for such stuff (lazy).

So the steering wheel will be connected over Bluetooth (classic or BLE, libraries exist for both), pedals and motor over USB.
Motor will be a Small Mige (Google it...), so there'll be a lot of torque. With maximum current I could reach 27Nm, but the peak torque is rated at 20Nm (no idea if that will torsion off the shaft or if that's thermal).
Power for the inverter will come from a Recom 48V 480W AC/DC which I could sample.
I'll also tap into that with a 5V buck to power a USB hub since the pedals will have rumble packs (indicates loss of traction either on brake or accelerator) which need a bit of current. Might top off the project with bass shakers powered by AliExpress amplifiers.

Inverter and steering wheel have nfet reverse polarity protection because I'm using screw terminals.

>> No.1823590
File: 37 KB, 800x429, shahe-linear-dro-scales.jpg [View same] [iqdb] [saucenao] [google]
1823590

maybe anyone has code for stm32 hal library for these digital chinese calipers? can't figure out the implementation procedure, arduino codes available are so fucking nonintuitive

>> No.1823616

Anyone used esp8266 or esp32 with STM32?
I've seen some code examples and they all seem to be directly programming the WIFI chip's internal flash so basically use it as an MCU with no other micro required. I was wondering if it is practical to keep all the code in STM32 and interface with the WIFI chip in the AT mode as a serial slave device, i.e only send/receive bytes.

>> No.1823632

>>1822701
>I think they're hedging their dates a bit on everything just to be safe.
Yeah that's exactly what they are doing. Sometimes prime takes a few days, but they just say it does so you can't do anything against it.

>> No.1823641

>>1823616
Aren't those different architectures? what do you mean use ESP32 with STM32?

>> No.1823649

>>1823641
Well duh, he means use the ESP as a wifi-only slave chip. There are good reasons to do that with the 8266, less so with the ESP32 because it's more powerful.

>> No.1823656

>>1823641
yeah what he said >>1823649
imagine it is just a serial peripheral and you code in your usual STM32 environment as normal, no need to compile for a different architecture. i don't even know what tools you'd need. some kind of a toolkit from them. sounds like a hassle.

>> No.1823808

Can anyone recommend me some resources so I can get started with pic microcontrollers? or should I just stick with arduino?

>> No.1823811

>>1823808
Why go PIC?
If you want to do something more bare metal just use AVRs without Arduino. You already have an eval board for them.

>> No.1823813

>>1823811
I don't know anything about microcontrollers, I think I just need to start at the basics.

>> No.1823835

>>1823813
arduino is the basics tho

>> No.1823844

>>1823811
>just use AVRs without Arduino
downvoted. for simple applications the arduino mindset will work fine, and that's definitely the platform you want to start with, but you don't want to cultivate the arduino mindset when you actually need performance or deterministic timing. with that in mind there's no reason to prefer avr for actually learning microcontrollers, and by not using it you're also exposing yourself to different architectures.

>>1823808
to program pics buy a chinese pickit 3 (mine is literally labeled a "kit 3.5") and either use MPLABX (god no) or use the XC8 compiler with command line. i'd rec learning assembly first if you have any interest at all though. it'll make you think twice before throwing down a division operator or a uint_64t in an 8 bit uC. be warned that software toolchains are really annoying. the arduino platform is revolutionary because it's the only thing that just fucking works.

>> No.1823852

>>1823813
Same here. I have ordered a couple of ESP8266-03's and a USB to TTL adapter, and will attempt to program them with the Arduino IDE

>> No.1825068

Does anyone know a good cheap FPGA dev kit?

>> No.1825189

>>1821210
Nope.
But you can have a look at soft USB on Atmega328
V-Usb if I remember well?
You need two shotky 3.6V diode and two resistor in addition to the make connector.

You wont be able to pigback anythin on USB, the protocol is very strict. Use a USB hub instead.

>> No.1825335

>>1825189
>V-Usb
If I remember well it's hot garbage

>> No.1825600

>>1825068
a buddy of mine has the ice40 dev kit, i think you can get it for like $60? he likes it a lot, recommends it.

>> No.1825920

>>1825600
Thanks, I'll check those out

>> No.1826150

I wanna hook up a Pi 4 to a bunch of analog sensors (4-8) & some accelerometers.

The plan is to run MCP3008s for the analog items and work out the accelerometers after that.

Is this stupid? Is there anything I should know that most people overlook when doing something like this?

>> No.1826152

>>1826150
i'm going to sound like a piece of shit but honestly use an arduino for the sensor inputs and feed them back to the pi over a single interface. a chink nano costs at most $2 so you've already saved money over the adc.

>> No.1826156

>>1826152
Thanks for the advice, I was leaning towards arduino for the documentation available anyways, that just simifies the whole thing for me.

When you say $2 chink duino, would you happen to have an example of a "brand" /store that would be a good place to source? Where I am, they are all roughly $8-10USD+ & I'm not sure what to trust.

>> No.1826158

>>1826156
buy off aliexpress or ebay. you're right not to trust chinkshit in general but fake arduinos are safe. they'll have the same atmega328p onboard but will use a lower quality voltage regulator and a ch340g usb-serial converter which will need different usb drivers than a regular arduino.

>> No.1826159

>>1826152
Can you elaborate? Rpi GPIO are suitable for this, and you don't have to use C/C++ if you don't want to. I dont understand this view. You don't need extra pins to access the IO expanders, they are I2C.

>>1826150
OP just note the RPi I/O is 3.3V and not 5V tolerant, so you want to run the MCPs at 3.3V or lower (they can handle down to 2.7).

>> No.1826163

>>1826159
>Can you elaborate?
simply getting rid of the THT ADC makes it worthwhile. in addition the accelerometers will almost certainly have code written for use with the arduino environment that any dummy could drop into their program, though it's possible that those libs will exist for the pi as well.

using an arduino is kind of trashy if you want your project to look professional but it's not like this guy is going to roll a board for whatever it is he's doing.

>> No.1826189

>>1826158
Ah, I was going to ask if I just need to find ATMega on eBay.

Should I be worried about needing a different USB driver at all? This is the first time I've attempted something like this but I have some prior knowledge with various flavours of Linux and diy projects with old laptops.

>> No.1826192

>>1826163
I assumed you meant put an arduino in between the RPi and the ADC. Using it as the ADC makes more sense than what I thought you meant.

>> No.1826194

>>1826189
installing the ch340g drivers is a one-step process on the computer you're using to program the arduino. after that the fake arduinos behave exactly like a real one.

>> No.1826372

>>1814852
Back in high school we had the FRC version of this (roboRIO) and it was pretty cool so yeah

>> No.1826380

>>1822068
I bought their 37 sensor kit and it's nice if you don't have anything go for it

>> No.1827136
File: 13 KB, 474x474, buzzer.jpg [View same] [iqdb] [saucenao] [google]
1827136

I have a treadmill with a really loud and annoying buzzer. Every time you turn it on you get BEEP BEEP BEEP BEEP.
I opened it up and tried taking it out with a soldering gun but everything is really tightly soldered I'm afraid I will damage something. I settled for putting hot glue over it in hope it would silence it a bit. It didn't make much difference and the sound just got more high pitch.

Would it be a good idea to take pliers and crush that fucker? Or is there any other method, possibly reversible if something goes wrong?
Can I put a toothpick in that little hole and put hot glue over, would that silence it?

>> No.1827138

Hey /amg/ I want to get back into FPGAs and try out the Pynq. Not sure if you guys allow FPGA discussion here, but I was wondering if there are any alternatives to Vivado. I used to use Vivado is uni, but I looked at the price now, and I don't know if $5k is a good idea for a hobby. I don't know if my .edu email will work to run it again, but I was wondering if you guys know of another way around this.

If you suggest another board than a Pynq, let me know, cause that's the only thing I've looked into.

Thanks!

>> No.1827147

what the fuck is wrong with fpga prices

>> No.1827162

>>1827136
i'd pull it off with pliers if you can rather than crushing it. if it shorts out after being crushed it could damage other circuitry.

>> No.1827175

>>1827136
here is what's inside: https://www.youtube.com/watch?v=A0UgttksOzA
just pierce the membrane and you're done

>> No.1827451

>>1827162
I can't pull it out, I'd break the board.
>if it shorts out after being crushed it could damage other circuitry.
Yeah that's a good point, I thought about crushing it as much as I can and pulling all the pieces out.

>>1827175
I've watched a similar video. Do you think I could pierce it with a needle or a thin screwdriver?

>> No.1827476

>>1827451
i think so, use a needle first, if not enough damage, then a small screw driver should do it.

>> No.1827967

I have a RPi3b+ running runeaudio. I've attached Sabaj da3 dac/amp to it and plugged in logitech rear 5.1 speakers via a a adapter (3.5mm to RCA). I can play music wirelessly and the rear speakers work.

However, the quality is garbage and it sounds super crunchy and won't go too loud.
This was expected but I was wondering what is the most likely culprit in all this. Is it the noisey usb port or the cable? or even power supply.

>>1816230
Ended up finding one. Thanks.

>> No.1827980

>>1827967
Are there any ground loops? What's the power output of your amp? Does it sound fine if you just plug your headphones in before or after the amp?

>> No.1827989

>>1821210
Get a arduino leonardo or teensy

>> No.1828050

>>1827980
Looking it up it's probably the dac/amp since it's output is 1W, it's a portable dac. (https://www.amazon.com/Sabaj-Headphone-Amplifier-Portable-SABRE9018Q2C/dp/B073SSB81X)) and the satellites are 8W (https://www.logitech.com/en-hk/product/surround-sound-speakers-z506)) does that sound right?

>> No.1828190

>>1827138
My understanding of PYNQ is that you remotely access a Python environment and access the FPGA fabric through that, so you don't really need or use Vivado/ISE. I'm sure you get a free, limited Vivado license with the board, but if you're interested in PYNQ, I do have to ask why you're interested in the HDL tools. The idea of PYNQ is that it's an easy environment for hardware acceleration of existing Python shit (they market it as basically a step before AWS F1 and Alveo); although I'm sure there's some HLS capability, it's not the focus. If this is what you're looking for, you're in luck.

As for other boards, I'm partial to Altera. Terasic has the DE0-Nano (among other options) which is dirt cheap and good to learn on. There's also the various TinyFPGA boards, which use Lattice parts that have support for the open source toolchain that's been getting some hype lately. Basically, just pick something and go; you need experience before you can really appreciate the differences between the vendors.

>>1827147
Nothing. They exist for special applications that aren't high enough volume to benefit from economies of scale, and will always be comparatively expensive.

>> No.1828246
File: 40 KB, 902x427, FL4MOO0ITW3E3RT.LARGE[1].jpg [View same] [iqdb] [saucenao] [google]
1828246

>>1812677
will pic related work for powering my arduino off solar/battery? im not looking to burn down a field

>> No.1828291

>>1828246
yes, assuming the panel doesn't output more voltage /current than the rated input to the charger.
That diode is probably superfluous unless the charger is retarded, but can't hurt.
You probably want the charger to all allow passthough, meaning it will run off the panel while charging.

>> No.1828355

>>1828050
That definitely sounds like a possible source of distortion. But I think what matters more is the minimum impedance the DAC can drive. If the speakers are 8Ω and the DAC is made for 32Ω at the minimum then that will give you distortion for sure.

>> No.1828410

>>1828246
Keep the leads between the battery and charger short and put it in a case of some sort, because a pierced charged li-ion cell is no joke. Apart from that you should be fine.

>> No.1828489

>>1828291
>>1828410
thanks guys

>> No.1828766

>>1815978
they are though, it just depends on which compiler you use. don't use gcc, instead use something like compcert

>> No.1828769

>>1818362
if you're gonna build a radio of some kind implementing a gui works massively better with a rtos

>> No.1828780

>>1821210
this won't work, the atmega328p can't do usb 2.0. get a cheap stm32f103c8t6 board which does have hardware usb and is cheaper to boot.

>> No.1828794

>>1828780
>is cheaper to boot.

Not usually an issue, and you can disable the bootloader if need be.

fucking morons trying to give advice ruin this general.

>> No.1828795

>>1828780
who said anything about usb 2.0? 1.0 is more than enough

>> No.1828815

>>1828794
I believe that anon is using a (presumably) American colloquialism. "to boot", used at the end of a sentence like that, means "also", usually in reference to an additional positive advantage.

>> No.1829971

>plug moisture and TMP36 temperature sensor to arduino
>now put ethernet shield over arduino
>readings go haywire, apparently now my room is 90degrees Celsius hot
how do I fix this shit

>> No.1829973
File: 38 KB, 841x764, 1459039061143.jpg [View same] [iqdb] [saucenao] [google]
1829973

posting in correct bread

>buy cheap chinese W5100 Arduino ethernet shield
>doesn't work
Btw I saw in many places you could make it work if you solder 100Ohm resistors between the RJ45 pins, but I only have 220Ohm resistors. Will it work with them?

Also how do I connect it with my laptop straight away instead of the router? Tried with an RJ45 but to no avail, the laptop recognizes it but I can't get the router to recognize it.

>> No.1829983

>>1829973
You can always put them in parallel to get 110 ohm

>> No.1830715

>>1829973
>doesn't work
you need to be more specific than that. what doesn't work? what debugging have you done already. how do you know its a hardware problem and not a software problem.

>> No.1831146
File: 26 KB, 603x177, TTL.ESP2866.03.jpg [View same] [iqdb] [saucenao] [google]
1831146

I bought a vanilla ESP2866-03 board and an USB to TTL Serial Converter Adapter to connect it to my PC.

Can someone confirm I should be able to program this with Arduino IDE?

It looks like it's programming it but it hangs, displaying "Hard resetting via RTS pin... "

>> No.1831203

>>1831146
>"Hard resetting via RTS pin... "
that gets printed whether it worked or not. it's not a function your ESP model can take advantage of so it won't do anything.

how to program:
>pull GPIO0, GPIO2, RST, and CH_PD high with 10k
>pull GPIO15 low with 10k
>connect a button from GPIO0 to ground

>hold GPIO0 button
>turn on power (LED should flash once and stay off indicating programming mode)
>release GPIO0 button
>program as usual
>remove and restore power, don't hold button this time

you can program with the arduino IDE. if you have trouble now lmk and i'll post my config. it was a pain in the ass for me to get it working the first time too. also if you add a pulldown button to RST you can just use that in place of power cycling. idk the pinout on the -03 but it has to have the pins i described, and if it doesn't, they're pre-connected internally in the necessary fashion.

>> No.1831209

>>1831203
Phew, that's like a foreign language.
Honestly I didn't expect it to be this much of a steep learning curve.
I'll keep going, I'm determined to crack this thing.

>> No.1831210
File: 1.21 MB, 1196x634, file.png [View same] [iqdb] [saucenao] [google]
1831210

>>1831209
do you have any electronics background? the setup i described assumes you have some basic components and a breadboard sitting around. if you don't you'll have to order some or get one of the more tard-proof (and overpriced) esp boards like pic.

>> No.1831211

>>1831209
You could have gotten one with a USB port, like the Dev kit C.

>> No.1831226
File: 923 KB, 1456x2592, 2020-05-28 14.46.20.jpg [View same] [iqdb] [saucenao] [google]
1831226

>>1831210
I got the basic board, soldered some legs on to plug it into my breadboard

>> No.1831227

>>1831211
I know, I realise I've made it more challenging for myself, but hey, it's how you learn.

>> No.1831353

>>1831226
that board is cute as fuck. i love the ceramic antenna. too bad only 0.01% of the ESP's pins are actually usable.

>> No.1831481
File: 180 KB, 768x541, NodeMCU.png [View same] [iqdb] [saucenao] [google]
1831481

anyone knows how many servos I can run with an ESP8266?

>> No.1831502

>>1831481
All GPIOs can be PWMs, including the SPI shit. Assuming you correctly power the servos externally, just count the number of GPIOs.

>> No.1831588
File: 37 KB, 404x514, working.jpg [View same] [iqdb] [saucenao] [google]
1831588

>>1831203
Thank you very much. I installed on a push button on the GPIO0 and now have it working.

I haven't added resistors for now but at least I know the board works with the TTL adapter and Arduino IDE

>> No.1831606

>>1831226
Why can't I power this from my breadboard PSU?
Breadboard PSU outputs 3.29v
TTL USB adapter outputs 3.5v
Is the 0.21v making all the difference?

>> No.1831643

>>1831606
breadboard psu possibly can't provide enough current. the ESP is hungry. otherwise your grounds might be wrong.

>> No.1831693

>>1831606
Do you have both V+ lines from the USB-UART adapter and the breadboard PSU connected together? That is a bad move, you need to pick only one to use. Connect all the grounds, but only one V+
As the other anon said, you may not have enough current from your power supply.

>> No.1831796
File: 47 KB, 640x640, s-l640.jpg [View same] [iqdb] [saucenao] [google]
1831796

>>1831693
>Do you have both V+ lines from the USB-UART adapter and the breadboard PSU connected together?

No. I used the TX and RX from the USB-UART to the ESP2866, and the breadboard PSU for V+ and GND.

>> No.1831820
File: 240 KB, 1152x1536, sampler.jpg [View same] [iqdb] [saucenao] [google]
1831820

>>1812677
hi /amg/
sorry if im being retarded but heres my question, i hope its not confusing:
I want to build a sequencer/wav sampler for a music producer fren of mine. The controller would read wav files from an sd card and play them. Pic related is a sketch of the gadget. The idea is to assign samples to each chanel, there would be 4 channels total. Every channel has its row. Each column is a "step" and when you push start the sampler would iterate through the steps to play the sample if the step is "on" or skip if its "off". You can quickly turn the steps "off" or "on" with buttons, i designed a 4x4 grid for the four channel and 4 step. There will be 16 steps total, divided to 4 "page". You can quickly move to the next or previous page with additional buttons so you can quickly control 1 page at a time with the 4x4 button grid but still have the option to create 16 step loops. Theres a 8x8 led display at the bottom left corner of the device that shows the entire grid(all 4 pages). The tempo is controlled via a BPM knob. I plan to manage the output with 2 dual channel DAC chips for 4 possible output channel.
Now. I know how to code in c but my experience with embedded systems is limited at best. I originally planned to use an arduino for the prototype but i quickly realised that it would be impossible to stream that much data through an 8 bit ARM microcontroller. Wav files can get big(>1mb, ~1mb compressed). So i started to look around for more powerful solutions. It seems to me that for this project I would need something like the ARM Cortex M series microcontrollers.
How in the fuck would I start with something like this. I can get this for cheap in my country:STM32F405RGT6. This is an ARM Cortex M4 in an LQFP64 package if I understood correctly. I have not found a DIP packaged version but I found a DIP adapter for LQFP64. How can I program this shit? If I use a dev board like the STM32 DISCOVERY can I reuse my code if I want to make more of this device?
Halp

>> No.1831872

>>1831820
>how would I get started
I would say you already have started, but I bet there are tons of youtube videos that get into DSM processing or audio processing on ARM evaluation boards.
I do agree that you probably need more than an arduino 8 bit for this. But there are lots of cheap options for 32 bit evaluation boards right now. Stay optimistic and just dig in guy.

>> No.1831875

>>1831820
>>1831872
Meant to say "DSP on ARM"

>> No.1831917

>>1831820
>I have not found a DIP packaged version
There are no DIP packaged ARM CPUs. There were a couple from NXP long ago, but that was like 10 years ago cores.
Yeah, the F405, with 1M flash, 192K RAM, and floating-point? It should be plenty for this. I think the main issue is going to be keeping the sound running in a thread or interrupts or something to keep it from skipping and glitching. It's a lot harder than making a couple of servos turn.
For programming it, get one of the many chink ST-Link clones out there, then look for the st-flash utility to talk to it. And an IDE of some sort too.
You're still going to have an easier time starting with a Discovery board, since it handles all the messy soldering and stuff, and it has an ST-Link built in. There's a lot harder stuff to solder than LQFP, but it's still not babby tier.

>> No.1831936

>>1831820
You already have a pretty good handle on what you want to do from the sounds of it. That STM micro will be sufficient. Atollic TrueStudio is a free IDE that will do what you need. Start with the dev board (make sure you get one with the same micro), you will be able to reuse the code and if anything is going to get you in over your head, it's going to be the software. Once you know whether or not you're going to get away with this, you can design your own board based off of the dev board that has the DACs and other necessary hardware on it, which will make your life a bit easier as long as you can get all of the parts on it (LQFP isn't terribly hard but it's not a pushover). Once you have your own board, you're going to put a debug header on it for programming it using a knockoff ST-Link. My only recommendations are to investigate external SRAM to load the wave files in to. That micro has a memory controller included.

You're taking on a real man's project here; good luck brother.

>> No.1833487

>>1812677
how hard is it to learn assembly if I only know C

>> No.1833514
File: 46 KB, 1020x570, MLX90614.jpg [View same] [iqdb] [saucenao] [google]
1833514

Since nobody has answered this in the SQTDDTOT, I'll ask here too:
Anybody know of a cheaper alternative to MLX90614 Infrared temperature sensor modules or know where I can buy them for cheap?

It's for an experimental toaster.

>> No.1833540

Hi.
I have an EE degree and now work as embedded software developer.
I want to get in game industry and develop video game consoles. What should I know for that?

>> No.1833557

>>1833540
Embedded development knowledge might've been useful back in the 90s/early 2k. Nowadays the knowledge you have poking hardware directly is nearly worthless, as all the hardware is hyper-optimized to run things in certain ways that engines optimize towards, and you're more likely to be running under an OS, console-specific standard library to interface with that or some game engine like Unity.
Basically, you should start from 0. Go to /agdg/ or something.

>> No.1833728

>>1833514
I see someone watched that toaster video by Technology Connections. If you look into PIR sensors, the elements on them are dead-cheap.
https://www.aliexpress.com/item/32961064608.html
This D203S is damn cheap, but it isn't a thermometer sensor. A thermal sensor will use two or more sensors, with different filters on them, and taking differential measurements tells you what point on a boltzman/planck curve the object is on. This makes it independant of light intensity, but remember that a bimetallic strip doesn't have this independence. Since the bread is always the same distance from the sensor, the intensity will always be proportional to temperature anyway, so this PIR sensor should work fine.
Look at the datasheet, should give you some ideas.

>> No.1833739

what would be best device i can use to intercept data from various sensors on a vehicle and do other things like activate relays depending on sensor data and display sensor data to a screen?
specifically the two main ones will be oil pressure/temp and coolant temp.
The sensors get +5v and ground from ecu, then send data back to ecu on a separate wire. I am not sure but I believe the data will be analog 0-5v.
It seems easy enough but I'm just not sure what controller to use, and also I'm not sure how to actually tap into this because I need to be careful to isolate the sensor ground from the vehicle ground or car go bang and stop working.

any help pls :)

>> No.1833747

>>1833728
Sounds like a bit more work than plopping a plug-and-play sensor into an arduino or esp32. But considering the price difference, it looks to be the more realistic option for a toaster retrofitting.
Thanks.

>> No.1833917

anyone done any hydroponic automation?

I'm looking at something like fruxepi
https://docs.fruxe.co/#/

but it seems to be outdated. I'm gonna try and rebuild it. I have some experience with front end web stuff. but I don't know how to code, I only know how to copy and modify it. Anyone got any info on updated projects? or thoughts on the project? Pi comes in tomorrow.

>> No.1833937

>>1833747
It should just require an op-amp circuit before being fed into the MCU's ADC. But the internal circuit's gain may possibly drift, as it's not designed for DC operation. There are two main ways of fixing this, adding a spinning shutter in front of the aperture so you get an AC value that's approximately equal to the amplitude you care about, or modulating the input voltage and doing the same. Doesn't matter how shitty the difference is, all that matters is you get enough of a differential measurement to get a good value from your lookup table, and I don't even know if it will be necessary. You may be able to correct for drift by measuring the current draw to the PIR sensor's VDD pin. The gain stage just needs to push the output into a range where it gets you a better resolution with the ADC. This might involve some DC biasing if the signal ends up too close to one rail or the other, which could definitely interfere with your SNR. Having a good noise-free linear regulator powering the thing should be one of your priorities.

If the output has no drift to compensate with a lookup table or simple algorithm, all you'd need to do is feed the output into a comparator (maybe also a bistable latch), no MCU needed. Adjusting darkness with a potentiometer wouldn't be precise, but more than good enough for a toaster.

>> No.1834000

>>1833739
If it is a analog 0-5V and you have limited knowledge with stuff like this, get yourself a arduino. Nano is cheap and small, but has limited power and I/O, uno is the allrounder, but there's plenty with more options. Also depends heavily on what kind of calculations you want to do with the data. Plenty of tutorials out there and not that easy to fuck up. If it uses some kind of serial communication protocol reverse engineering is a whole lot harder.
Remember that arduino is open hardware, so clones are much cheaper and almost the same quality as the originals.

>> No.1834001

>>1833917
>anyone done any hydroponic automation?
Yes, but I coded everything myself. I didn't need monitoring stuff though, it just measures aridity and waters stuff based on that, which keeps everything very simple. I hate coding UI, so I just don't have one.

>> No.1834005
File: 178 KB, 597x435, 1591013263084.png [View same] [iqdb] [saucenao] [google]
1834005

Have anybody here worked with AMBE-2000? How can I make a pleasant ringtone using it?

>> No.1834022

>>1833739
If you have direct access to the sensors, you can interface the signals to most modern microcontrollers. Keep in mind that cars are 12v systems, and the sensors typically use that voltage, so you will need to convert voltage levels if necessary.

I would highly suggest looking into the CAN protocol to interface the OBD2 port. A lot of sensor IDs are universal, such as coolant temperature, and you can read the data from the existing OBD2 network.
From there you can use your microcontroller to interface your own circuit for a screen, relay, led, ect...

>> No.1834095

>>1834000
>>1834022
well the main sensor I'm interested in is the oil pressure.
The car has a 3 pin sensor that only does pressure, and I'm going to swap in a 4 pin one with integrated temp sensor. My idea is that I will let the car's ecu handle the +5v to the sensor so I only need to tap into sensorGnd from the ecu and the two data lines coming from the sensor.
I cant access it from can because the ecu is not set up to take in temp for oil. I thought about using another temp input on the ecu but I don't want to affect anything. I could easily wire it to fuel temp or underbonnet temp but then if the car sees 100c there it may go big umm.

once I have this info I need to for one know about it in real time when on track so I know when to stop and cool down the car. I also want to run a set of relays at certain temps, like once it goes over 80c it should enable the oil cooling pump and fan.

I may also want to mess around with other stuff and pull info and put info onto can, so it would be nice if the controller can handle it.

>> No.1834254

not sure if this is more /ohm/ or /mcg/ related.

I'm setting up an experiment with a game boy advance that requires a bunch of game carts. It's been about 20 years meaning that the games aren't "old" anymore, but "vintage" so they've all gone up a shitload in price.

It would be a lot cheaper if I could set something up such that a microcontroller could bitbang a gba game pak, and just load a ROM from my computer. Essentially, a microcontroller-based flash cart for a GBA.

does anyone know of any resources for doing something like this, or could tell me what all would go into it? I'm trying to grasp the scope of the project and see if it's feasible for someone like me to attempt

>> No.1834261

>>1834254
Looking into it, it seems that apparently GBA gamepaks had hilariously fast I/O access times that would be very difficult to implement, even with modern microcontrollers and SD cards.
This makes me wonder - if I were to get some kind of EEPROM, would I not be able to just flash the ROM onto the EEPROM and then have the gba read from it as normal?

>> No.1834313
File: 203 KB, 2251x1137, asdfsdf.png [View same] [iqdb] [saucenao] [google]
1834313

Is 3.43V Logic Supply the same as 3.43V Power? Trying to wire a gamecube controller to do macros and move randomly.


http://www.int03.co.uk/crema/hardware/gamecube/gc-control.htm

https://docs.google.com/document/d/1gWrSWay3a0utMu--3GWUzfrxPZzdtf34wqbHLplC7hE/edit

>> No.1834352
File: 29 KB, 300x250, 7GBBsRMyc4.png [View same] [iqdb] [saucenao] [google]
1834352

>>1834001
would you happen to have any of that code available for reference, fren?

>> No.1834355

>>1834261
if the interface isn't proprietary, sure, why not. Is it?

>> No.1834520

>>1834261
Yes, that's how I'd do it. But you'll need to look into the standard behind the carts. Obviously some people have cracked it even if it is proprietary, since you get all sorts of bootleg GB carts on alibay, which I think includes Pokemon Clover.

The answer to your initial problem of needing a bunch of carts could just be buying a bunch of bootlegs, but emulating a cart sounds more fun in the long run.

If you look hard enough, you might even find a USB reprogrammable GBA cartrige.

>> No.1834640

>>1831936
>>1831917
>>1831875
>>1831872
thank you guys!

>> No.1834648

>>1834355
>>1834520
I can't tell if the ROM IC itself is proprietary or not, but just googling around for part numbers,it doesn't look like they are.

I looked into getting a reprogrammable cart, but they're all like $60+ which I don't want to spend if I can avoid it.

>> No.1834664
File: 82 KB, 635x600, CR001_-_1_ml.jpg [View same] [iqdb] [saucenao] [google]
1834664

I have a pic related that I'm going to pair with a Bluetooth capable arduino. I can read the toggle switch easily, but im having issues with the buttons.

The connector for it has three pins and they are labeled red, black, white and increase, common, decrease respectively.

However the adapter cable that comes with it only has 2 wires out, red and black. First I assumed that I had to read it analog but the ranges I can detect are so small and unstable that I doubt this is the case. I guess my choices at this point is to cut the wires and test directly with 3 of them and hope thats the right call?

>> No.1834909

>>1834664
So I can read the two grey buttons just fine, but I suspect the red one is gated behind a diode. I'm currently testing with 3.3 V and its meant for 12V usage. I read the values from two of the wires and send power trough the third;

Would this be a reasonable assumption?

>> No.1834911

>>1834664
>>1834909
or rather, I can read from two buttons and depending on which pin I supply power to it switches which buttons that works.

I really would love to avoid doing something hacky like rerouting power and ground on the fly to read all three buttons

>> No.1834934

>>1834648
>it doesn't look like they are
How big are the ROMs? Because common EEPROMs only go so large. It might also have an unusual address pin/output pin ratio. With any luck, it uses parallel address pins, because that would make the wiring very simple.
I'd see about buying a female cart socket, so you can plug it into your EEPROM cart for programming. Though having an internal circuit for programming would work too I guess, depends on whether you want to make only one or significantly more.

>>1834911
What, they're charlieplexed or something similar? Figure out the internal circuit diagram, maybe there's an obvious way to read them that doesn't require push-pull 12V outputs (3 transistors + resistors for each output). Maybe logic-level-shifters will do the trick, and you'll just actively switch your GPIOs between input and output? I've never heard about charlieplexed buttons with diodes in series, but I suppose it makes sense.

>> No.1834937

>>1834934
>What, they're charlieplexed or something similar? Figure out the internal circuit diagram, maybe there's an obvious way to read them that doesn't require push-pull 12V outputs (3 transistors + resistors for each output). Maybe logic-level-shifters will do the trick, and you'll just actively switch your GPIOs between input and output? I've never heard about charlieplexed buttons with diodes in series, but I suppose it makes sense.
Thanks ill look into it, ive been working on this all day and kinda running out of ideas

>> No.1835060

>>1828795
sorry I just threw 2.0 on there for no particular reason: the main thing is that the 328p doesn't have USB support, you have to add hardware to get that

>> No.1835087

>>1835060
if an tiny85 with the micronucleus bootloader can bit-bang usb with a couple of zener diodes, then so can a mega328p

>> No.1835101

>>1835087
sure but you end up rewriting uart protocols or just using a dedicated UART chip. both of which are a waste of time when you can get a 32u4 for $3 that natively does all of that

>> No.1835125

>>1835101
Pretty sure a 32U4 won't act as both a host and device, only a device. The OP has both a USB male and a female in his crude diagram. If he just wanted to emulate a computer mouse or keyboard I'd completely agree with you (though there's probably a cheaper MCU out there with native USB support). Not sure what he means by "piggyback", but it might just be datalogging on all the USB packets.

Then there's the matter of the Uno already having a 32U4 and USB socket on it (with its own ICSP header no less), which nobody else has addressed.

>> No.1835126

>>1835125
Wait meant to say "already having an 8U4" on it. Point still stands.

>> No.1835443

>>1812677
How can I learn more about how to program hardware without using arduino code, since its too hobbyist and not industrial enough. In uni, I did register level bit manipulation with and/or/xor masking, that kinda thing and not just calling digital.write and ton of premade libraries. How do I get into it, and more importantly, does it matter if coding in arduino is basic bitch shit

>> No.1835468

>>1835443
>without using arduino code, since its too hobbyist and not industrial enough.

Start by learning at least the basic terminology. First of all, an arduino is a board that has something on it. That might be an AVR, or something more advanced. If it is an AVR, then you can program it in assembly language which is somewhat tedious but can be fun and has its uses.

http://ww1.microchip.com/downloads/en/devicedoc/atmel-0856-avr-instruction-set-manual.pdf

And if you were talking about something else entirely, then carry on.

>> No.1835469

>>1835443
There's nothing "non industrial" about arduino code. Like all code, you pick the tool that does the job. If you know nothing (sounds like it) start there to learn the basics. then you can just re-implement outside of the arduino ecosystem.
If you don't know anything about C/C++ and microcontrollers, it's a good place to start.
Then learn to compile using the command line and how to use the assembler, and you can dive into assembly.

>> No.1835476

>>1835468
Good take, you're right. I programmed arm and matlab for dsp in college, but my main gripe is that they have much less internet resources compared to moer abstract languages like python java etc, where can i gets. For instance, i only learned how arm, specifically cortex m4 takes 20 lines of code to initialize a single gpio pin compared to just saying pinMode(LED_BUILTIN, OUTPUT); in a class and not online.
what gives, where can i find that more advanced stuff other than hours ofpouring into datasheets

>> No.1835479
File: 76 KB, 500x348, tumblr_7dcc4e91e74baa9a026f27dafc9b6fa1_b3237814_500.jpg [View same] [iqdb] [saucenao] [google]
1835479

>>1834934
there were seldom few GBA games that were 32 MB. Most were between 8-16 MB.But now I'm looking into it and EEPROMs are in the orders of kilobytes so they're off the table.
Not really sure what else there is for reprogrammable memory.

just conjecturing - if the rom file is going to be flashed to the memory regardless, maybe there's some kind of volatile RAM chip that I can just dump the rom file into.

I'm trying to see if there's any development information for GBA games that actually talks about the game cartridge hardware. I'm still looking into if it's parallel address, but it looks like it from pictures

everything's mentioning SRAM on the chips and I'm not sure how I'll manage that.

>> No.1835517

>>1835479
Is the SRAM even used by the GBA? All the data return and address select pins look to be for the ROM, and there aren't any pins left for the SRAM. Unless there's pins on the bottom too. I'm guessing the SRAM is just used to buffer the data coming out of the ROM to stop the ROM read-rate being the bottleneck.
Finding a circuit diagram would be really helpful.

Are you searching for EEPROMs on Mouser or wherever? I thought they'd have ones in the 5MB range, but maybe I'm misremembering. The next step up is flash memory, which basically uses the same floating gate transistor technique as EEPROM, but is somehow different. But your biggest problem will be finding an EEPROM or flash memory IC that has that address/DIO overlapping pinout, or equivalently wiring up some logic to switch between the two.

>> No.1835531

>>1835476
Write assembly. Or try to understand the assembly produced by very simple code. Higher level languages like C/C++ and Libraries just make writing assembly easier. It seems like you're stuck understanding how the code relates to the hardware? Code compiles to assembly, assembly is 1 to 1 a stream of instructions in binary which are executes on the processor. Assembly is link, if you get the assembly, you can understand the machine code directly.

>> No.1835541

>>1835531
Really appreciate your input fren
I get the point you'e trying to make, I probably dont know enough low level either. I'll try to illustrate what I mean. I hear stm32 is the new king shit over arduino but all teh tutorials on it just say to use arduino code/libraries which is bad since it encourages busywait and other things. Here's some example code of blinking an led on the tiva tm4c laucnhpad that i used in uni (its arm cortex m4). https://pastebin.com/weqhUBZe I pretty much got that off a powerpoint and not from a datasheet. Whereas https://www.arduino.cc/en/tutorial/blink is all of 5 lines with fat libs premade.

I can program like that, but its only for that micro. I know concepts stay the same across mcus, do the other mcus such as stm32 contain such libraries?
With that in mind, 1) where can i learn to code like that for other mcus 2) does it even matter if i use a "real" mcu and not arduino?

>> No.1835565
File: 3 KB, 413x44, arduino-1.png [View same] [iqdb] [saucenao] [google]
1835565

>>1835541
Arduino is a coding ecosystem, it's not an MCU. all MCUs are REAL MCUs. You need to exit this mentality that you aren't using a real MCU. You are. specifically AVR ATMEGA whatevers are all REAL MCUs.
Using ARM (with the propritary too chain, for example) is the same as using arduino, it's just a different toolchain.
IF you understand programming a microcontroller in the arduino ecosystem from A-Z, you'll understand all tool chains. They all have the same parts.
Ardiuno uses avr-dude, which you can use without arduino. You can compile programs, link them, and assemble them. You can write raw assembly, you can inspect the assembly produced during compilation. It's the same tool. The arduino IDE just makes it easier to use.
For example, if you use the arduino IDE and click file / preferences / show verbose output you will see the actual commands the IDE runs. You can run those commands via copy paste, then learn what the commands are doing. IF you understand those commands, congrats, you are outside the arduino ecosystem.

>> No.1835569

>>1835565
Damn you just changed the perspective my college profs gave me, thanks

>> No.1835592

>>1835569
your profs are being elitist, and like i am elitist, so i know. But the thing is, arduino has done an amazing thing, making MCUs accessible. I learned when you had to buy $150 eval boards, and shit was mostly proprietary.
I love the idea of people exiting Arduino, and I used to teach it. I should write up a basic tutorial on how to "exit" it. But in terms of using it as an entrypoint, it's really good. You just have to tick a few flags and you can start to see where it's walls are.
It installs everything you need to go, so you don't need to fuck around trying to find shit, so it's on your disk ready to explore.
Here's a couple sources on avr-dude:
https://sites.google.com/site/avrasmintro/
https://www.cs.ou.edu/~fagg/classes/general/atmel/avrdude.pdf

>> No.1835598

>>1835592
>I should write up a basic tutorial on how to "exit" it.
not even that guy, I would absolutely bust a nut if someone made a guide like this
arduino programs are so huge, I'd love to use more specific libraries for my MCUs so that I can do more with the memory

>> No.1835601

>>1835598
One thing you CAN do is start looking at the libraries you use, and picking them apart for just what you need. for example, let's say you use some servo library. Rewrite the library yourself just as an exercise. Try to see which registers it's accessing directly, and why.

Like one of the best ways to learn to code is to read what others have done, so anything that you include, read that library. Very quickly you'll be on a hunt through the arduino libraries and you'll accidentally learn everything you need to learn. But having a map and guided examples would certainly make that easier.
not gonna lie, im stressed af right now and might not be able to do this now, but it's something I've been meaning to do. I'm sure something out there exists, too, I'll see if there's something.

>> No.1835676

>>1835592
See I went the other direction. I used to write ASM for MSP430 and upload with some janky python script off pastebin, or try to install some crusty version of ubuntu so I can compile some 5 year old hacked up GCC to use whatever flavor of the month MCU was in fashion. Now I have a job and ain't nobody got time for that. I just run "arduino-cli compile -u" and that shit just works.

>> No.1835686

>>1835676
A+ fren, this is exactly why I personally crusade against the "arduino isn't real" meme. How's it not real, it's a professionally developed ecosystem covering a broad range of hardware. People have no idea how good they have it, and how hard it really is to write software for many different architectures. If you crack open most IOT shit they have stuff which probably was developed or at least prototyped w/ arduino.
I have moved to micropython on ESP32s. Might not be ready for primetime, but shit is fucking easy af to prototype and throw some hardware together.

>> No.1835706

>>1835517
>and there aren't any pins left for the SRAM
Learn what a Chip Select is.
>EEPROMs
Almost every one of those is a serial chip, usually either I2C or SPI. The word you guys are dancing around is "Flash", specifically the NOR type. And they went almost straight from DIP to TSSOP. They also went to 3.3V at the same time, but at least GBA is a 3.3v device. (The original GBA supports 5V GB/GBC cartridges, presumably with a voltage booster.) The SOIC ROM on that pic was an uncommon format for flash.
Anyhow, a multiplexed bus isn't uncommon, but there's usually an ALE signal to identify when the data lines have an address to latch it. Not having seen this before, it's got me scratching my head.
Anyhow, GBA has a remote bootloader mode that can put code in what little internal RAM it has, that can let you play around without needing special hardware.

>>1835601
>read what others have done
This. There is some jank code out there, but if you see enough, you'll eventually figure out which is the bad code.

>> No.1835711

>>1835676
If you actually programmed an MSP430 like that, you're a retard. Why would you do that?

>> No.1835747

>>1835706
>Chip Select
That's what that's for? I assumed it was for enabling an HV programmer IC initially (because I also assumed it was a PROM), because the pinout didn't show anything other than the ROM pins. Feels pretty odd not just having all the RAM in the console itself, because you'd need to have memory on it anyway in order to pull bytes off the ROM and onto the RAM.

And TSSOP isn't a bad thing, makes designing a PCB easier. You wouldn't recommend trying to breadboard this project, would you? The guy said that an arduino was too slow after all.

Though I bet a bluepill could act as an intermediary between the GBA cartridge pins and a more conventional memory IC or even an SD card.
But it would feel kinda silly to have something as powerful as a bluepill just shuttling memory for a processor that's far more primitive.

>> No.1835881

>>1835747
that's extra ram for games that need more, I doubt every game will have it

>> No.1836271

>>1835476
>arm, specifically cortex m4 takes 20 lines of code to initialize a single gpio pin compared to just saying pinMode(LED_BUILTIN, OUTPUT)
look inside the function calls and you'll see all the abstractions that do the heavy lifting.

>where can i find that more advanced stuff other than hours ofpouring into datasheets
you honestly only want this as a learning tool. after you start re-writing the same things over and over and over on different platforms it gets annoying as fuck. You learn to love the abstractions.
Most vendors have HAL generators or SDK's you can use to make your code more portable and cuts the re-implementations to a minimum.

>> No.1836491
File: 203 KB, 700x524, programming-attiny44-attiny84-with-arduino-uno[1].png [View same] [iqdb] [saucenao] [google]
1836491

i wonder what the cap is for i tried it without it and it still works

>> No.1836514

>>1836491
The capacitor stops the serial reset command from also resetting the ATMega328P, because it's capacitively coupled by a 100nF cap from the ATMega8U2/USB-serial IC. Adding a 10µF acts like a voltage divider where the majority of the voltage is dropped across the higher impedance 100nF cap, preventing the voltage at the reset pin of the 328P (which is also the reset pin on the GPIOs) from going too low.

The Uno might not require it (there are a few different Uno circuits), but my older Nano definitely does.

I'd also recommend buying a USBasp for programming with. If you program a lot of DIP MCUs of the same pinout, I'd solder up a little programmer board with a (ZIF) socket on it alongside a reset button, LEDs, ICSP header, and maybe a crystal too. I also added a second ICSP header so I can monitor it on a logic analyser, but that was just because troubleshooting was a real bitch. Once you've got such a setup working, you no longer have to worry about your wires sticking in the breadboard properly or having to use your arduino or breadboard for another project.

>buys uno instead of nano
>uses it with breadboard anyway
why would you do this

>> No.1836531

>>1836514
I like uno because it has extra stuff like 3v3 voltage regulator, and i'm not using a breadboard i made a zif hat for the uno for my attinys
the main reason is just preference i guess, i just like the uno more for development for no particular reason

i don't really don't use it in production tho, for finished projects i use bare AVR bugs like attinies

>> No.1836599

>>1835711
kids these days have no idea how bad things used to be

>> No.1836603
File: 79 KB, 800x800, eprom-2764-intel-d2764a.png [View same] [iqdb] [saucenao] [google]
1836603

>>1836599
If you didn't have to program a micro by burning a new EPROM from a stack and then erasing the pile later, you don't know SHIT about embedded programming.
Holy crap, when whatever patent expired that allowed Flash in every MCU, it was like night and day.

>> No.1836863
File: 153 KB, 1070x1136, nec.jpg [View same] [iqdb] [saucenao] [google]
1836863

Is there a way to use microcontrollers from home appliances in hobby projects? I like to take the PCBs from broken appliances and use the capacitors, transformers... to fix other things. However, I've never know how to even start working with the microcontrollers.

Pic related, got it from a broken dishwasher.

>> No.1836873

>>1836863
Not usually, because most of them are going to be mask-ROM programmed, especially older stuff. And even when it's something modern enough to be re-programmed, it's possible that the protect bit was set and you can't read the old firmware to learn how to use the rest of the circuitry.
Then you have the problem that they often use weird chip architectures that you wouldn't have a development environment for. 8051 is pretty rare for hobby projects, but it's one of the less unusual for consumer electronics, especially in the '90s and '00s. You might still find some of the auxiliary chips to be useful, but even displays are going to be useless unless it's a standard 14-pin LCD text display.
But they can still be good for practice doing hot-air SMT rework soldering.

>> No.1836908

>>1836873
Thanks for the reply! It's a shame.

>> No.1837263

is the only advantage of running attiny with the enabled clock divider (so it's 1mhz instead of 8mhz) small energy savings?

>> No.1837392

>>1837263
Typically, yes, lower speed will give you power savings. For small battery powered devices, that is a critical factor.
It also depends on your design. I'm building a small system that detects how long it takes an item to pass between two sensors. From there, it calculates when it will reach another specific point. This can easily be done with a 4Mhz mcu that I have a pile of. The mcu can use a built in PLL to clock up to 16 Mhz, but at that speed, I'll have to use extra timers to calculate the distance over time. Keeping the system at 4Mhz will let me stick to one simple timer with no pre/post counters or anything fancy.