I feel.... Dirty...  - Page 1
Forum section: electronics / general

author: MarkS
author_rank: Unknown
timestamp: April 28, 2023, 06:05:37 am
content: I finally broke down and bought myself an Arduino Mega. I hate the platform, and have always viewed it as child-level, but I need more GPIO than the more powerful microcontrollers I own have and I find myself interfacing to 5v parts more often than not, and more than a handful of level shifters in circuit SUCK!I feel cheap and dirty. I'll need to hide it from my ESP32-based controllers.

author: daqq
author_rank: Super Contributor
timestamp: April 28, 2023, 12:22:12 pm
content: If you are using an ESP32 and feel clean you should see someone about that

author: Black Phoenix
author_rank: Super Contributor
timestamp: April 28, 2023, 12:31:39 pm
content: Excuse me but can someone ELI5?

author: mrburnzie
author_rank: Regular Contributor
timestamp: April 28, 2023, 01:12:42 pm
content: Real G's will buy an Arduino and run raw Atmel compiled code on it.There is a reason for the ISP connector on it

author: tooki
author_rank: Super Contributor
timestamp: April 28, 2023, 01:37:53 pm
content: Quote from: MarkS on April 28, 2023, 06:05:37 amIt’s C++ with a couple of standard libraries that you can use, but don’t have to.Quote from: MarkS on April 28, 2023, 06:05:37 amCan’t you just run the other parts at 3.3V?Quote from: MarkS on April 28, 2023, 06:05:37 amI do wish Espressif made some MCUs with a lot more GPIOs.Hah, look at this! 😂https://www.cnx-software.com/2023/04/28/meet-the-1000-esp32-board-with-512-gpios-12v-24v/

author: globoy
author_rank: Frequent Contributor
timestamp: April 28, 2023, 04:03:49 pm
content: No need to feel dirtyI'm an embedded developer and although I've never designed/shipped a product using the Arduino IDE I've found it incredibly useful for a ton of quick&dirty applications such as personal projects, lab devices, proof-of-concept prototypes, and manufacturing test fixture/programming controllers. Personally I think a lot of the anti-Arduino sentiment is simply yet another religious war or arm-chair quarterbacking. Lots of opinion and ignorance. I've seen Arduino libraries that are better written then vendor supplied "pro" libraries. And always nice one gets to see all the source - and modify it - if one wishes.Arduino may have started as a super simple way for non-technical people to access micro-controllers but it is evolving. Today there are capable IDEs and real debugging in the environment if you need/want it. And an amazing ecosystem of boards.

author: psychoacoustic
author_rank: Newbie
timestamp: April 28, 2023, 07:47:47 pm
content: ...or you could just use PlatformIO, use the Arduino framework but pretend you're not...

author: SiliconWizard
author_rank: Super Contributor
timestamp: April 28, 2023, 07:58:11 pm
content: Quote from: daqq on April 28, 2023, 12:22:12 pm

author: MarkS
author_rank: Unknown
timestamp: April 29, 2023, 12:26:19 am
content: Quote from: daqq on April 28, 2023, 12:22:12 pmFair enough! They are more powerful than the average Atmel chip found on an Arduino, but they do leave a lot to be desired. Now if ST would just START PRODUCING CHIPS!!!Quote from: tooki on April 28, 2023, 01:37:53 pmUnfortunately, in my current situation, no. I'm struggling with with getting the SST 39SF040 flash chip to work. I'm fairly certain the issue I'm having is one of timing and it only runs at 5v. Between the level shifters, IO expanders and slow as crap I2C bus, I'm getting nothing but problems. I'm going to remove the crap and connect directly to the chip.Quote from: tooki on April 28, 2023, 01:37:53 pmNo. That's just insane.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: April 29, 2023, 04:54:33 am
content: B...but I use AVR too. 🥺Nothing wrong with that, long as you're aware of what the platform and toolchain do. Arduino is just thinly wrapped g++ AFAIK, with extensive (but also frequently problematic) libraries. Use 'em or don't, it's up to you. If nothing else, can just treat it as any other dev board and run mfg tools (GCC based, with the build environment set up for you and maybe some peripheral configurator stuff) or fully open toolchain (I use Code::Blocks myself).If you're just doing busywork and housekeeping, much of what you do on ARM can be ported simply to AVR; I suppose the main shock is not having a HAL, as the peripherals are simple enough to use directly, for the most part. It's a refreshingly capable platform, thanks to the modest clock speed and complete C support. And if you need to do ASM on it, well, probably better to reach for the more capable part, but, if you have to, it's certainly a simple enough ISA to get into!Tim

author: james_s
author_rank: Super Contributor
timestamp: April 29, 2023, 05:35:14 am
content: You don't have to use the Arduino IDE, the Arduino hardware is little more than a breakout board, you can program them bare metal with gcc if you want.I've always used the Auduino platform to program ESP8266 and ESP32 parts, it works great, it's just so easy to throw something together.

author: JPortici
author_rank: Super Contributor
timestamp: April 29, 2023, 05:36:17 am
content: What's the stuff against ESP32? can't you just use their IDE and write C/C++ and not that platformIO monstruosity?Not that i would see a reason to use an AVR while i have my trusty and rusty PIC18 at my side, but if you need 5V IO there are also options from ATMEL (ATSAM C20/21) and some kinetis from NXP (don't remember the family number, but look for "white goods" in the description)

author: Ed.Kloonk
author_rank: Super Contributor
timestamp: April 29, 2023, 06:24:00 am
content: Incoming wall of text. Sorry.A few years ago when I could foresee myself having some time on my hands, I did weigh up Ardruino vs. going somewhat deeper into rolling custom boards with more exotic, specific micros.I had a bucket list(!) of home projects and after considering each one, realized that the Ardrino family satisfied the needs mostly, the big lure was the fact that if I run a standard board across all projects, I could cannibalize, at a pinch, if things failed.And the mature programming interface. I knew that what ever Linux I happened to be on, I could plug in the board and have it connect. As a novice lacking only in experience, quick research indicated that the big micro suppliers would fall short for rapid application development, due to the complexity and inconsistency.Coming out the other side, the only thing I'm dirty about is that we didn't have this fancy stuff when I was a little bloke. However, where I feel the need to speak up in these discussions is I still haven't found a reason, except for hardware limitation, why any of the Pro eco-systems are worth bothering with.Any of the big chip makers could have owned the Arduino market. Yet, silly marketing wank and competitiveness has prevented them still from lowering themselves to create a simple, compelling turn-key solution to attract an audience who might like to get into mircos which might actually be greater than the existing number of rusted-on users, I'd wager.What do you think?

author: tooki
author_rank: Super Contributor
timestamp: April 29, 2023, 01:43:22 pm
content: Quote from: MarkS on April 29, 2023, 12:26:19 amOther than more GPIOs, what are they lacking? (For typical applications.)Does anyone else make an MCU with built-in Wi-Fi and Bluetooth? If so, at what price? That's the ESP32's big selling point IMHO. The only other thing that comes to mind is the Raspberry Pi Pico W board (which uses a separate Wi-Fi chip).Quote from: MarkS on April 29, 2023, 12:26:19 amYeah. That's another reason I've embraced the ESP32: they've maintained availability!Quote from: MarkS on April 29, 2023, 12:26:19 amGotcha, makes sense.But would it not be better, for the long term, to choose a 3.3V capable memory chip instead? There are 3.3V-compatible versions of your chip, the SST39LF040 and SST39VF040.If you're using I2C now as a workaround, could you use an SPI Flash chip or I2C EEPROM? Then you wouldn't need to worry about large amounts of GPIOs. ESP32's have several SPI buses, so you could likely dedicate one to Flash if need be. (Or get an ESP32 model with more Flash memory to begin with?)

author: tooki
author_rank: Super Contributor
timestamp: April 29, 2023, 01:50:04 pm
content: Quote from: JPortici on April 29, 2023, 05:36:17 amYeah, I don't understand why some people are against ESP32. It's not suitable for all applications, but overall it seems pretty good.Quote from: JPortici on April 29, 2023, 05:36:17 amYup. Though it's a primarily command-line thing, so it's usually used from within a full-featured graphical IDE like Eclipse or VS Code.When using ESP32 with Arduino, the entire ESP-IDF libraries are used in the background (ArduinoCore basically runs atop FreeRTOS), so you can also use ESP-IDF commands if you want.Quote from: JPortici on April 29, 2023, 05:36:17 amWhat's wrong with PlatformIO? It seems to work really well for a huge number of people.

author: VK3DRB
author_rank: Super Contributor
timestamp: April 29, 2023, 02:08:38 pm
content: Just remember how Microchip (Atmel) abandoned you during Chipageddon - no parts and no communications.ESP32's were still available from several vendors right thought. Despite any technical performance and IDE differences, what the point if you cannot get the parts?

author: MarkS
author_rank: Unknown
timestamp: April 29, 2023, 02:32:51 pm
content: Quote from: tooki on April 29, 2023, 01:43:22 pmYeah, I thought about my comment after posting. To be fair, my gripe is with CircuitPyton and not the chip. I need to get back into C/C++ programming and stop with these cutesy, "Let's make everything easier for the developer!!!!111oneone" languages/libraries. My laziness has made my life a living hell. Doing it right (C/C++) would have taken slightly longer to code, but I'd have a better grasp on why it either did or didn't work.Quote from: tooki on April 29, 2023, 01:43:22 pmI'll be using this chip as a ROM in a retro MC68000-based project. Right now all I'm doing is trying to verify the legitimacy of the chips I bought through secondary sources. I need 30 GPIO, so I'm using two MCP23017 IO expanders to interface with the chip. Between the I2c bus, level shifters and expanders, I cannot get the timing correct. I do have several MCP23S017s, and should have used them instead of the I2c version in the first place, but at this point I'm burned out with this "simple" project and am just going to cut out the middleman and directly connect to the chip.

author: daqq
author_rank: Super Contributor
timestamp: April 29, 2023, 03:04:34 pm
content: Quote from: tooki on April 29, 2023, 01:43:22 pmI know that there are areas where they are a great fit, consumer IoT in particular, but overall they leave a sour taste in my mouth. We actually use them in a bunch of stuff. The stuff I don't like:- ADC parameters, linearity and overall ADC WTF- requires a lot of support components, external memory in particular is annoying- documentation is not exactly awesome- some pinout choices that I don't likeThis is not to say that I won't use one where it's appropriate, but unless something really requires BLE/wifi then no way.

author: tooki
author_rank: Super Contributor
timestamp: April 29, 2023, 04:11:57 pm
content: Quote from: MarkS on April 29, 2023, 02:32:51 pmAh! I've never tried CircuitPython, I've only ever done C/C++.Quote from: MarkS on April 29, 2023, 02:32:51 pmOh I gotcha, so you're really just using the MCU as a programmer?

author: tooki
author_rank: Super Contributor
timestamp: April 29, 2023, 04:33:21 pm
content: Quote from: daqq on April 29, 2023, 03:04:34 pmYeah, the ADC is kinda lame!But as for external support components -- well, isn't that precisely why they sell finished modules you can just solder in? That saves all the trouble of external components, antenna design, etc. that you have to do when using the bare SoCs.Also, they do have some SoC models with integrated memory, like the ESP32-PICO-V3-02, and the ESP-S2F, -S3F, and -C3F series. Several of those, as well as the upcoming ESP32-S3-PICO-1 series, have both PSRAM and Flash integrated into the SoC.

author: artag
author_rank: Super Contributor
timestamp: April 29, 2023, 06:14:45 pm
content: Quote from: tooki on April 29, 2023, 01:50:04 pmOnly that it's monstrous. It tries to do everything and, as a result, it both does it badly and gives the user little choice.It may have improved recently, but I had experience of it in the early days and was so put off I've never tried again.Examples if wanted, but for now let's just leave it that some people, for their own reasons, don't think much of it and are likely to stay that way.

author: JPortici
author_rank: Super Contributor
timestamp: April 29, 2023, 09:32:45 pm
content: Quote from: daqq on April 29, 2023, 03:04:34 pmI have a design for 2024 that is going to be- BLE- Screen- Battery, possibly Qi charging (without Qi logo of course)- USB?and it's an accessory so it's going to add at most 30€ to the product's price, what else should we use?

author: Psi
author_rank: Super Contributor
timestamp: April 29, 2023, 09:43:27 pm
content: Feel dirty about programming using the arduino library and especially the IDE.But using the arduino hardware for your own atmel code is fine.You are saving the hardware from a lifetime of sad arduino abuse that it would have had otherwise.So it's like a public servicePoor little AVR never asked to be put into an arduino.

author: MarkS
author_rank: Unknown
timestamp: April 29, 2023, 09:59:04 pm
content: Quote from: tooki on April 29, 2023, 04:11:57 pmYe... No? Maybe? I have two authentic PLCC chips bought from Digikey along with PLCC to DIP adaptors. I also have two suspect DIP packages bought off of Amazon of all places. The original intent was to make a chip tester. I'll use the PLCC chips in a future project, but the main project I'm working on now will use the DIP chips, assuming they are legitimate.However, why the heck not use it as a programmer?

author: tooki
author_rank: Super Contributor
timestamp: April 29, 2023, 10:31:20 pm
content: Quote from: artag on April 29, 2023, 06:14:45 pmI guess that argument just makes NO sense to me whatsoever. Every IDE attempts to "do everything" because that's literally the point of anintegrateddevelopment environment. First-party IDEs (MPLAB X, Cube MX, Keil, etc.) do all the same things, sometimes more...Are you sure you're not actually annoyed at Visual Studio Code, which merely happens to be the most commonhostfor PlatformIO? But you can use it in other IDEs, or use just the CLI version.

author: james_s
author_rank: Super Contributor
timestamp: April 30, 2023, 12:57:27 am
content: Quote from: daqq on April 29, 2023, 03:04:34 pmYou'd have to be a masochist, or really need something as compact as possible to use a bare chip, I use the modules that have all the RF stuff all ready to go with a metal shielding can, it's much easier than fussing around with the RF stuff, unless that's your thing.

author: MarkS
author_rank: Unknown
timestamp: April 30, 2023, 01:40:20 am
content: Quote from: james_s on April 30, 2023, 12:57:27 amI answered this a few posts back.

author: daqq
author_rank: Super Contributor
timestamp: April 30, 2023, 07:08:13 am
content: Quote from: james_s on April 30, 2023, 12:57:27 amA lot of the stuff we do needs to be crazy compact. One of my boards was 8mm wide and used an STM32WB5MMG module for everything. For an ESP32 I had a 15mm wide board that was chock full of goodies, so no space for anything extra.

author: artag
author_rank: Super Contributor
timestamp: April 30, 2023, 07:23:19 pm
content: Quote from: tooki on April 29, 2023, 10:31:20 pmPlatform i/o makes it worse by trying to do everything for every processor. This might be a strength but usually isn't. Proprietary IDEs are sometimes savedby at least limiting the damage to one.I don't need an IDE, I've got Unix. The entire OS is an IDE and does indeed do everything - and does it well. Not in a half-arsed way like most job-specific IDEs. That makes even less of a use-case for platform i/o : it fails to have processor-specific goodness by being all-encompassing and fails to be universal by trying to integrate less and poorer tools than you need. But that's not why I dislike it as that applies to many IDEs.Yes, the default editor doesn't help. It's possibly not as bad as the previous default editor.What I don't like about the 'you can change the editor' argument is that you tend to have to dig in pretty deep to change it. By which time you've learnt the wretched thing. Idk if this is the case for PIO, as I said, I was put off it by my first encounter and have avoided it like the plague ever since.

author: Brumby
author_rank: Unknown
timestamp: May 01, 2023, 08:57:32 am
content: Don't beat yourself up too much.I had a project offered to me (through the EEVblog no less) to provide a custom mod to a digital scale. I was supplied with a number of units of a typical scale and found an Arduino Nano clone board fitted perfectly in a space within the case. It had more than enough memory, adequate performance and just enough ports to do the job and once built, no-one would ever know unless they opened it up.Sometimes getting something already built and tested is a more sensible choice.Just don't ask me to share the source code though - so ugly- as it was my second effort in an embedded project (the first effort is still under development, you know - one of those projects that depends on a tuit of the circular form)

author: tooki
author_rank: Super Contributor
timestamp: May 01, 2023, 09:27:08 am
content: Quote from: artag on April 30, 2023, 07:23:19 pmForgive me for being blunt, but this reply kinda tells me that you don’t know what you’re talking about.UNIX isn’t an IDE. It can be used as a development environment, but it’s not integrated. The entire UNIX philosophy of small, single-purpose utilities is the exact antithesis of “integrated”.“Default editor”? PlatformIO has no default editor. The editor is whatever you choose to use, be it a command line tool, a standalone graphical text editor, or the editor in whatever IDE you choose to install PlatformIO into (if you do that).As for “trying to do everything for every processor” — what the hell are you talking about?

author: artag
author_rank: Super Contributor
timestamp: May 01, 2023, 01:04:11 pm
content: Quote from: tooki on May 01, 2023, 09:27:08 amYou're completely wrong and have entirely missed the point of Unix.The intention of the Unix philosophy, to have those small, single-purpose utilities that are good at just one thing is that the shell and OS integrate them. As I said, the whole system is an IDE. It doesn't need half-assed partial IDEs to live inside it. Just more utilitiies that fit the integration.What's an IDE ? An Integrated Development Environment. An enviroinment in which to develop <something> providing all the tools with which to do that and, in a well-designed system, the ability to add tools in a way that integrates into the existing system.

author: tooki
author_rank: Super Contributor
timestamp: May 01, 2023, 01:14:39 pm
content: Quote from: artag on May 01, 2023, 01:04:11 pmNo, I am not wrong. And I am well aware of the UNIX philosophy.You’ve just got a rather inventive idea of what the word “integrate” means.UNIX shells don’t integrateanything.You, the user,are left to integrate everything yourself. That’s a VERY different thing. It’s very powerful, but it’s all on the user to daisy-chain things together, use scripts and macros to make them work together in complex ways. The utilities aren’t inherently aware of each other or of the context, which is what the integration in IDEs does.

author: tooki
author_rank: Super Contributor
timestamp: May 01, 2023, 01:27:33 pm
content: Quote from: artag on May 01, 2023, 01:04:11 pmYes. But saying UNIX is an IDE is really a stretch. It’s not integrated, it’s not specifically a development system. It’s an uncommitted blank slate. The fact that you can use it as your development environment doesn’t mean itisan IDE!You aren’t entirely alone in your belief. But that doesn’t mean you’re right (nor conclusively mean you’re wrong!), and it certainly doesn’t make it a widely accepted notion.Further reading:https://en.wikipedia.org/wiki/Integrated_development_environmenthttps://blog.sanctum.geek.nz/series/unix-as-ide/

author: artag
author_rank: Super Contributor
timestamp: May 01, 2023, 05:36:33 pm
content: It has all the tools - pipes, shared memory etc. to integrate with.Many tasks - those that lend themselves to piping or filtering - are already done that way, and new tools tend to be built along the same lines.Imported tools require it to be done, it's true : but there are easy tools to do that (make and configurable filters such as awk)

author: MarkS
author_rank: Unknown
timestamp: May 01, 2023, 08:29:01 pm
content: *cough* The UNIX argument deserves it's own thread, don't you think? *hint hint*

author: james_s
author_rank: Super Contributor
timestamp: May 01, 2023, 08:48:25 pm
content: Quote from: Brumby on May 01, 2023, 08:57:32 amThe Arduino nano is a nice little board to integrate into projects. I really cringe when I see a fullsized arduino and a solderless breadboard stuffed inside a project box though.

author: MarkS
author_rank: Unknown
timestamp: May 02, 2023, 03:53:36 am
content: I got the Arduino today and wired it up. "Borrowed" some code I found online and.... It just works!I wasted a ton of time needlessly. At least I know I have four good chips.

author: james_s
author_rank: Super Contributor
timestamp: May 02, 2023, 06:24:09 pm
content: That's been my experience too. Initially I avoided Arduino for a long time, viewing it as bloated, but then it got to the point where hardware is SO cheap that it doesn't matter if it's bloated, it's just SO easy to get things working since there are loads of different libraries all ready to go. As a platform for hobby projects it's hard to beat.

author: tooki
author_rank: Super Contributor
timestamp: May 03, 2023, 10:02:47 am
content: Quote from: james_s on May 02, 2023, 06:24:09 pmYep. And then when you need more power, you can easily transition to other hardware like ESP32, STM32, or RP2040.