I am facing a strange issue with RS485 data. Here is a brief description of the system.
The system is fitted in a heavy vehicle, a truck (Diesel Engine)
consists of a display unit and a sensor unit ATMEGA16A on the display unit and ATTINY2313 on the sensor unit.
The MEGA16A sends a request to the TINY2313 over a RS485 bus at 4800 Baud and the TINY2313 (sensor part) returns back the raw value to the MEGA16A (the Display unit).
UART to RS485 and vice versa is done using MAX485
UART on the MEGA16A is Software UART at 4800 bps (Hardware UART is used for USB data Logger)
RS485 Cable is about 30 meters twisted pair four core cable (two for data and two for sensor supply which is 24V)
The system was thoroughly tested in my workshop and worked perfectly as desired for almost a month.
Now the system has been installed in the vehicle it was logging the data with some errors.
I assumed that the sensor is getting a burnout reset probably because of cranking. There is a software loop when the ATMEGA16A doesnt get any data for a certain amount of time, it logs sensor open.
now after almost a day of testing in the vehicle, the sensor sends erratic values which is beyond the limit.
customer says that during cranking, the maximum voltage drop is 17V
I am getting confused on which point this is happening.
should i use a CRC check on the data?
Use filters and inductors on the power entry side? (space is very limited on the sensor side)
Reject values above max sensor value?
Recycle the sensor power supply on after error values?
All crystals used are external and clocked at 7.3728Mhz. Voltage regulator on both ends is LM2576-5V. Input voltage to the system was initially from the cigar lighter port. now connected directly to the vehicle battery.
need suggestions badly! :roll:
thanks in advance