Sensors Connected?

I inherited a project from a previous student that used a DHT11, a MH rain sensor a SD card reader etc. peripheral devices. When I power up the unit the LCD 1602A displays random characters like >:)(*&^@ . Apparently it .."worked" before. It would cycle threw and read/display each device. I know its hard to answer a question w/o the code or the schematics but:

  1. Can I disconnect all but one device ..say the rain sensor ...and troubleshoot w one device w/o the others being connected or do all my peripherals need to be connected in order for the mega2560 work?? In other words what happens if my code tries to read an analog IN (A0) and the device isn't connected?
  2. Is there a "Self Test" I can run w/o anything connected to make sure my 2560 is OK?? working?? w just the LCD hooked up? Does it run threw some kind of routine that indicates its basically "OK"?

I have 8 vdc applied to "Vin". The 3.3VDC (Pin4) is good. The 5VDC (Pin5) is good. Measured using a DMM. When I measure the current by Vin it goes from 20 ma to 150 ma to 20 ma to 150 ma...etc. To me this indicates the processor is cycling threw the code and polling each device..I don't use interrupts.

I mainly concerned on eliminating my processor as the cause of the problem..ie static!!

thanks.

Yeah I figured.. thought I'd give it a shot. Thanks..

You're in a bit of a reverse engineering mode here. You could, for instance, look at the data pin on the DHT11 using and oscilloscope or logic analyzer checking for periodic activity. The expected waveform is described in the DHT11 datasheet. If this happens then there is a decent chance that the processor is running as expected, but that's not a certainty.

I'm guessing that the program wouldn't be spitting out strange characters regardless of the sensor readings, and in particular, it's unlikely that multiple sensors would have failed. Thus it seems likely you have a problem on the display side of the system. It uses a 4 or 8 bit parallel data interface and a broken connection on that bus could plausibly cause the symptoms you're seeing.

If you have another Arduino board available, you might try hooking the display up to that and running some example code from a reliable source. You could do the same with all the peripherals.

Thanks..thats what I was looking for. I'm now trying to get the source code and reload it. I did what you said and was fortunate to get a second board. Started playing w some sample code like the blinking LED. On my new board that worked. If I download that code on my 1st board does it over write the original ( my Project ) code? I want to download the example LED blinking code onto my troubled board but worried it'll wipe out my original project code.