element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Embedded and Microcontrollers
  • Technologies
  • More
Embedded and Microcontrollers
Embedded Forum How can I make an embedded system robust?
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Embedded and Microcontrollers to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 11 replies
  • Subscribers 475 subscribers
  • Views 1452 views
  • Users 0 members are here
Related

How can I make an embedded system robust?

neuromodulator
neuromodulator over 7 years ago

Hello,

 

I'm working on a fleet control project on a very tight schedule (which I didn't set). I'm the primary (probably the only) developer, and the project should be completed in around 3 months. The system is based on an arduino due, a simcom 5360 (3G + GPS), accelerometers, odb2 interface and bluetooth low energy, all of which would be integrated into a single PCB by the hardware guy. I don't think I will have any problem at using these peripherals, but what I'm really wondering is what would be the best practices to make the system as robust as possible so that when its delivered it doesn't fail. A crash and reset, wouldn't be a disaster, but having the hardware to fail and not do what is supposed to do (process and send telemetry) would be a major disaster. So my question is, what are some good practices/recommendations to make the system as robust as possible so that once its delivered it will keep working for months?

As of now what I've been doing is to code as much as possible in the PC, because its faster to compile and easier to debug. My plan is to create wrappers for some Arduino functions to be able to test as much as possible code on my PC. I'm doing exhaustive unit tests to all functions and considering corrupt serial data (I wouldn't like garbage to cause a hang or crash). I also would like to do some code coverage, but I need to find the right tools to do it, as visual studio community 2017 doesn't support it. I plan to program a server that will simulate different situations, including different network conditions to test if the client performs as it should. I also plan to use an ODB2 simulator to test at home different conditions. A watch dog is going to be used to make sure the loop is properly looping. And that is pretty much my current approach to make the system robust.

One thing I'm not completely sure, is what are the best ways to perform field tests. Ideally I would like to minimise them, as they are expensive and time consuming. What are some good practices to make the most out of them? If something fails in the field I would like to be able to track it to the source of the issue, as opposed to end up wondering what caused it and repeating field test over and over on different conditions.

An alternative solution to trying to make the system bug-free, could be to implement OTA updates, which on the espressif mcus is pretty straightforward, but here I'm not sure how I could do it. Any ideas?

 

Also any suggestions and comments would be gladly welcomed...

 

Thanks

  • Sign in to reply
  • Cancel

Top Replies

  • michaelkellett
    michaelkellett over 7 years ago in reply to mcb1 +5
    I'll second that last paragraph - on this project 3 months might be just enough to get a working prototype together that was good enough for some initial trials. (But it is nothing like enough time to…
  • dougw
    dougw over 7 years ago +4
    It sounds like you are not doing the hardware yourself, but a vehicle environment can be very hard on hardware, so it needs to be considered when reliability is important. There are a lot of things to…
  • Fred27
    Fred27 over 7 years ago +3
    Well for a start, an Arduino is probably not really suitable. There are microcontrollers and peripherals that are appropriate for automotive and industrial environments - such as TI's Hercules series.
Parents
  • dougw
    dougw over 7 years ago

    It sounds like you are not doing the hardware yourself, but a vehicle environment can be very hard on hardware, so it needs to be considered when reliability is important. There are a lot of things to consider when making hardware robust for vehicle applications, including power supply, shock, vibration, temperature, humidity, operator mistreatment, etc. Let us know if advice is needed for that.

    I'm not really a software guy, but here are some pointers anyway...

    On the software side, try to build in self diagnostics for each subsystem and a graceful way to handle errors.

    Add at least a temperature sensor and create a periodic non-volatile time-stamped log of temperature, system status, errors and system activity (and firmware rev number) - so when it fails you know when it failed, what the conditions were and what part of the program was running.

    Ensure there are no possible conditions that could result in an endless loop - for example do not wait forever for a (possibly broken) sensor to respond.

    Do not depend on data such as GPS data being properly formatted - garbled data needs to be taken in stride.

    One aspect of fleet monitoring systems that should not be overlooked is acceptance by the operators. They need to pretty enthusiastic about what is being recorded and reported, otherwise equipment will just "mysteriously" cease to function. Protecting against reluctant operators is a whole other level of robustness.

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • Cancel
  • neuromodulator
    neuromodulator over 7 years ago in reply to dougw

    That's some good advice, and yes, I'm not doing the hardware part, hopefully its done the right way and there are no issues with power or signal integrity. I like your suggestion about logging temperature, as high temperature could cause instability. I thought about logging, but I'm afraid the internal non-volatile memory could wear out very fast if I do so, as an alternative an SD card could be used, at least for the prototypes. On relying on the correct working of each subsystem is a very good idea also. For the endless loop condition I'll use a watchdog to make sure it doesn't get into such state. When you talk about GPS data being garbled, would that be because of signal integrity issues, or do you think GPS modules are not mature enough to work properly and generate properly formatted data?

    How operators accept the system is completely out of my control, I suspect that if they think they are being controlled they may not like it at all and try to break it, I'll comment that to the part of the team concerned with those issues...

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • neuromodulator
    neuromodulator over 7 years ago in reply to dougw

    That's some good advice, and yes, I'm not doing the hardware part, hopefully its done the right way and there are no issues with power or signal integrity. I like your suggestion about logging temperature, as high temperature could cause instability. I thought about logging, but I'm afraid the internal non-volatile memory could wear out very fast if I do so, as an alternative an SD card could be used, at least for the prototypes. On relying on the correct working of each subsystem is a very good idea also. For the endless loop condition I'll use a watchdog to make sure it doesn't get into such state. When you talk about GPS data being garbled, would that be because of signal integrity issues, or do you think GPS modules are not mature enough to work properly and generate properly formatted data?

    How operators accept the system is completely out of my control, I suspect that if they think they are being controlled they may not like it at all and try to break it, I'll comment that to the part of the team concerned with those issues...

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
Children
  • dougw
    dougw over 7 years ago in reply to neuromodulator

    I'm not sure what all the reasons for GPS data to get messed up are, but I suspect they each manufacturer has their own algorithms to deal with satellite signal drop-out and RF interference. I know some of my GPS modules send out partial data sentences unexpectedly.

    I use FRAM when I need to constantly write to a non-volatile memory. You can get an SPI FRAM module from Newark or Adafruit.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube