Continue to Site

Arduino makes "anybody" a systems software engineer?

cupoftea

Advanced Member level 6
Advanced Member level 6
Joined
Jun 13, 2021
Messages
3,351
Helped
65
Reputation
132
Reaction score
154
Trophy points
63
Activity points
17,331
Hi,
We are doing the power supply for a customer who is making monitoring equipment
to monitor fluid levels in tanks in various places over Europe. It monitors, then sends
back the levels to a central depot via wireless link. It also needs to be bi-directional
comms as they need to update the software in the monitoring site sometimes.

They have asked us to do a start-over system and do all the software aswell. Do you think we would easily
be able to do the whole system with Arduino? We know basic C programming. (even managed to do a LED dimmer
once where a user twiddled a pot and I got the PIC micro to read the pot via its ADC then output a reference
voltage via a step-mode digital pot.)

So do you think we could do all the comms, including RF comms , with Arduino and Arduino code?
Does Arduino make this sort of thing "easy for anyone"?

I did some Arduino software once....it seemed like C but more logical and understandable than C.

We obviously wouldn't put the Arduino board in the product....but just the relevant chip.

Shouldn't all companies be transferring all of their software systems over to Arduino so that "anybody"
can maintain and modify it?

After all, Arduino is the easiest software platform. Even to write a simple PIC micro program, you have to
know all that setup and config code.

So why hasnt Arduino taken over the software world generally?..or has it?....is it in th eprocess of doing so?

The software engineer left and didnt yet write the code to include the bidirectional comms......is it true that software engineers sometimes write code in a more complicated way than needed ,, in order to "protect their job/territory"? Do Software engineers sometimes use a more complicated software system than necessary in order to say theyve used a complicated system so their CV looks better? How can you tell if a software engineer has done this?
 
Last edited:
Hello!

I would say Arduino doesn't make anybody a software engineer. If you don't know anything
except software, then after your arduino "design" you will still know nothing about embedded
design and programming.
That said, that's certainly a good platform to learn, and also to do a quick project, but certainly
not for making a product.
Would you step into a Boeing running on Arduino?

Dora
 
Thanks, any thoughts on why its so difficult? (software), i am an Analog hardware and power supply engineer, and have dome lots of little c programs for test jigs. Eg, read a voltage on ADC, then output a signal on port X,1 after a delay of y seconds...etc etc.
 
Hello again!

I'm not saying it's difficult. But I think if you want to really use Arduino's processor, then you have
to do it without Arduino's standard software. I tried co compare in the past an Arduino mega 2560
programmed using Arduino libs and "raw programming" by accessing register.
If you make a simple LED blinker with the "digitalWrite" functions to blink the LED, it's extremely
slow. I don't remember how slow, but I think there was a factor of 80 in the frequencies of the loop.
One of the loops was:
while(1) {
digitalWrite(Led, 0);
digitalWrite(Led, 1);
}

And the other loop was:
while(1) {
PORTA |= 0x01;
PORTA &= ~0x01;
}
Note that I don't remember exactly the frequency ratio, but I did the test several times to be
sure and it's a few 10s of times slower.
And if you chek the publicly available software online, there is not even 1 instance of a sofware
properly written. Example, as mentioned earlier this week, the worst way to make a delay is to
count. Not sure of how arduino's delay is done, but anyway it just waits. That's shitty programming,
nobody should ever publish that kind of example, except maybe in "hello.c" to show the basics,

Dora.
 
I already do remote telemetry and updating software.
I suggest using Arduino IDE but base it on the ESP32 processor. Use either an MQTT library and an OTA library or one that does both combined. This gives you analog inputs, digital inputs and outputs, WiFi connectivity to transfer data in standard formats and the ability to update the software over an internet connection.

Doraemon, there is a fundamental difference in your two loops, the first just writes to the port, the second has to read the port, apply the logic and then write it back again. It will always be slower doing it that way.

Brian.
 
Hi,

ARDUINO isn´t ARDUINO.

* There is ARDUINO IDE.
it usually uses C / C++.
Lot´s of library available. By community written, thus there is a huge range of quality. Some are good, some are bad.

* There is ARDUNIO hardware.
I think they stared with ATMEL (Now Microchip) AVRs, like ATMEGA328 and ATMEGA5256, but they also support STM32xx, ESP32xx and so on.

You can use the Arduino IDE with your own designs (I´ve done it) ... in simplest case your hardware is compiler wise compatible with a standard Arduino hardware.
The IDE can assist you and do a lot for you in the background, so you don´t have to worry about it. usually using [void setup()] and [void loop()]
But you may also write your code wihtout support, usually using [void main()]

Yoiu also may use Arduino hardware and code it with different IDE, different language, as you like.

***
The problem I personally have with Arduino libraries is, that I can not rely on them. Especially regarding processing time.
Most of my applications use a lot of interrupts, no busy waits, and a state machine that controls the timing for the diffesrent tasks. This way my code works close to multitasking, which means that do a lot of things "at the same time", without missing a single event.

Most libraries simply don´t fulifill my personal requirements.

For sure I also have some "quick and dirty" projects (mainly internal testing harware).. which don´t need to be that advanced.

Klaus
 
Arduino comprises a number of core processors. As Brian, I have already made some stuffs with the ESP8266/32 as well as with the Atmega family and not just for funny. I'd say there is no issue on doing so, BUT one thing is the software platform and the other one is their hardware itself; their even official Atmega development boards are not suited for commecial products, there are a lot of issues. I'm not sure I would have the patience to go back to developing on bare metal at this point in my life. If your code is well structured, you can use this platform without fear.
 
At the root of this discussion is open source versus vendor specific families.

I use both, and found overall Arduino poor at debug (using Arduino tools), libs that change
and can undo prior designs, eg. changes, upgrades. More than once had to revert to prior
versions of IDE due to unwanted lib changes affecting code completed at an earlier IDE
revision level.

Whereas, more often, there is more coordination in development in vendor specific changes.
Tongue in cheek as vendors have, due to technical demands, moved from one IDE to another.
But overall quite different support model between vendor specific and open source.

Arduino is an agglomeration of different processors and capabilities. So focus is somewhat
diluted compared to vendor specific families. But to Arduino Credit libs got added to make
WiFi apps relatively easy to work with, eg. ESP8266, ESP32. But overall I do not think of
Arduino as a robust IDE design environment. I use it, will continue to use it, but mostly
one off stuff.

HW wise I have wanted since 70's Analog and Digital on a chip. I always found prototyping a
pain in the great divide and wanted it all on one chip. Ideas hampered by construction roadblocks.
I wanted a lab in a chip. With routability and random logic fabric, analog, deep IDE with wizards
to perform/ create tasks like complex DMA operations, state machines. Ability to roll my own HW
specific pieces (FPGA like), but without getting into the weeds. Various vendors have given some
attention to that, different bits and pieces, but nothing in a broad sense. Until Cypress came along
and got a process to allow broad mixed signal, precision, variety, routability on and off chip, and libs
for each onchip resource eliminating the need to do a lot of driver coding.

This is what the 5LP family looks like (multiple copies on chip of almost all elements shown)

1740663014579.png


The fabric allows one to create custom elements from schematic capture and/or Verilog. So
community has done stuff like DDS and Cordic, even 74HC look alikes.

So until I get a family that I can telepathically send an idea to and it creates itself ( I will
give it a couple of hours to do this) I will unabashedly support PSOC.

Regards, Dana.
 
Last edited:
Hello!

Thanks for your comment.
Yes. I'm aware of that.
I think you may have mistaken: the second just writes the port (portA |= 1), the first on does a lot more in the background
(the digitalWrite stuff), a lot more that most of the users don't care about, including me, usually. When I want to set a port at
a specific status, I don't check its status first. The only time I recall having needed to read the port status first was for
a I2C bit banging. And right now I don't even remember why I had to do that.
I'm sure the arduino developers had good reasons to do it this way, but as for the real benefit, I just don't get it.
Anyway, Arduino is classified (for me) as useful for a half-day quick&dirty project, but not more.

By the way "writes it back again": what do you mean?
Guessing what it does, I suppose it has to find in some table to which port belongs, for instance, pin 7 and find which
pin, then just write that pin. Why should it read? You mean read somewhere in a table what port and what bit?

And beside this, I hate the fact that the connectors are not on grid which makes it impossible to use a general purpose
universal PCB (the one with only holes). Nothing is on pitch. Not even the width (between the connector rows),
I also hate this ugly USB connector making it impossible to plug a larger mezzanine (same for the power connector).
We're in 2025 and they use components from the 90s. Even the arduino-dedicated mezzanine boards don't fit.
In summary, a dirty board for dirty work.

Dora.



Doraemon, there is a fundamental difference in your two loops, the first just writes to the port, the second has to read the port, apply the logic and then write it back again. It will always be slower doing it that way.

Brian.
 


Write your reply...

LaTeX Commands Quick-Menu:

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top