I'm using a L298N H-bridge (on a breakout board) to switch a signal back and forth to create a positive and negative cycle square wave. I could do this using a 555 and a bit of jiggery-pokery but I gain a lot more flexibility if I use an Arduino to switch the H-bridge through a set of GPIOs. I could use two to control the direction of current flow and one to enable and disable so I get just the pulse length I want - and can create all kinds of feedback control in software.
But the system needs to run reliably for years. I have no concerns about the H-bridge. It's basically a set of Mosfets and therefore very reliable over very many cycles. If I used a 555 I'd similarly expect it to run for ever (ie huge numbers of millions of cycles).
But what about the GPIOs on the Arduino? The system's going to be switching the channels at more than 100Hz and so I'll get to more than four million GPIO cycles in a working day - and I want the system to last for years of daily use.
So how long (or over how many write-cycles) are the GPIOs likely to be able to keep going? Is there a better choice of Arduino for this purpose - are the GPIOs of some inherently tougher than others?
The H-bridge consists of a set of Mosfets, some capacitors and resistors. I would expect each of these, individually, to have a very long life-times/cycles.
The Arduino is a much more complex and sophisticated device and I would expect, perhaps wrongly, that its GPIOs will form parts of circuits with a lot more, and more vulnerable components.
And that's why I would be much more concerned about the likely cycle-life-span of the Arduino than the H-bridge.
But I'd be very happy to learn otherwise - though my original focus was on whether the Arduino would last as long as a 555 as a switching signal source.
It's not going to "wear out". I don't know what that MTBF for the Arduino is, but it's many-many years. I think thing the MTBF for the ATmega chip is estimated at something like 100 years, but that information is hard to find.
Generally, the MTBF for solid state electronics is estimated because the parts are obsolete long before they start to die of "old age". i.e. The particular chips haven't been around long enough to know how long they'll last.
Processors run at full speed constantly while they are powered-up unless they are in a sleep or low-power mode. The CPU in your computer is probably running NOPs (no operation = do nothing) instructions in a loop 90% of the time, and it's otherwise keeping time and updating the display, and other background operations when it's not doing "something important".
...Flash and EEPROM memory does have a finite number of read/write cycles. And saved data may be lost over time.
This is from the ATmega datasheet:
Electrolytic capacitors tend to lose capacitance over time (maybe they "dry out").
I guess that there are two components to the aging process - the gradual decay of the components through (very slow) decomposition and, as you say, things such as "drying out" of components subject to such things. And then there's the "wear" caused by cycling between voltages.
The question originally occurred to me because the datasheet for a solid state relay I'm using gives a lifetime of between 50 and 500 million cycles - which is very much less than I require (so I went over to a Mosfet-controlled H-bridge to do my switching) and I wondered whether any of the critical components of an Arduino would be similarly limited.
The analogy with CPU life-times makes sense.
So I'll stop worrying about it and get on with using an Arduino to control the H-bridge.
Can you suggest alternatives (preferably on breakout boards)?
The application: I'm driving a constant ~1mA into a resistance up to ~100kOhms in order to measure soil electrical resistance using the standard four-electrode approach.
With good electrical design, the Arduino lifespan is virtually infinite.
Don’t stress the input and output parameters - either in hardware or software, and there’s nothing ro worry about.
On your recommendation I've been trying to find an H-bridge board to replace that for the L298 - which I appreciate has it's issues.
I'm not having much luck since I need voltages of the 40-50V region to drive the current I need against these resistances. What I'm seeing are devices with much lower voltage limits.
Can you suggest something that will do the job - switch up to 50V with a current of up to 10mA (to give myself some room)?
I'm still using 50-year-old CMOS ICs with GPIOs that are firing like crazy and they rarely need replacing. When they do, I think it's more about the power components going bad, a bad power source, or a leaking capacitor that causes the issue.