Arduino duemilanove not working

Hi All,

I have here an Arduino Duemilanove and it was working properly before.
As I am working on a project that requires a solar photovoltaic system, I plugged the 12V dc supply into the arduino and it shows a proper display on my lcd, however, after a while I got these black boxes on the first row of the lcd.
Whats worst is that I cannot restart the arduino. I also tried uploading a blink program but it also does not work.
Anyone knows whats going on here?

I have attached a picture of my circuit

What I am trying to do is at the beginning, the lcd displays a message, when the sensor detects something, the message changes and displays the number of times the sensor has detected something.
The code is as shown below:

#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2);
const int sensorPin = 7;
int sensorProxCounter = 0;
int sensorState = 0;
int lastSensorState = 0;

void setup()
{
pinMode(sensorPin, INPUT);
Serial.begin(9600);

lcd.begin(16,2);
lcd.clear();
lcd.setCursor(0,0);
lcd.print(" REWARDING BIN");
lcd.setCursor(0,1);
lcd.print(" Let's Recycle");
}
void loop()
{
sensorState = digitalRead(sensorPin);
if (sensorState != lastSensorState)
{
if (sensorState == HIGH)
{
sensorProxCounter = sensorProxCounter + 1;} //count increases by 1 when sensor is high
lcd.setCursor(0,0);
lcd.print("Thank You! ");
lcd.setCursor(0,1);
lcd.print("Cans: ");
lcd.setCursor(5,1);
lcd.print(sensorProxCounter); //lcd displays number of counts
}
lastSensorState = sensorState;
}

All in all, the problem is when i plug in the 12V dc into the arduino, everthing does not work, even when I plug in the usb cable. Please help!

What do you measure at the 5V header pin when 12V power is supplied?

5V

Does anything feel hot to the touch?

I gotta get to bed, more questions tomorrow...

nope temperature feels normal.

Just to check, is it acceptable to plug the power from the photovoltaic charge controller (12V) directly into the arduino power supply input?

Yes. Just 12V, yes?

Ya. 12V PV panel and 12 Lead Acid Battery

Could it be that 12V is just too much for it to handle? Because I had 2 of the arduinos and both were connected to the 12V, so when I switch to the other one, I could not solve the problem.

I solved this problem before using trail an error (by pluging in the usb and 12V together and removing one of them) but recently, something blew on one of the boards as shown on the photo. I had no idea what it is.

Could it be that the problem is with the LCD display? I am planning to buy an arduino UNO-R3 but not sure if that would fix it.

I think the arrow is pointing to reverse polarity protection diode.
Its only rated for 1A, if you blew that you are trying to get too much current into the board.

oh I see, probably is because there is a short circuit when I plug in and remove the 12v input plug

With no power connected to the board put a meter across the inner barrel connector and Gnd. Should measure something 1Mohm, 2Mohm, very high resistance.
If you are seeing very low resistance, then there is good chances something is shorted.

ya there is no resistance in the one that blew, and there is 2Mohm in the one that did not blow.

Just an additional info, my battery is a UNICELL TLA12260 12V 26AH lead acid battery.
and my solar panel is a Sunsolar AS25-12 with Rated Max Power: 25W
Rated Operating Voltage : 17.1V
Rated Operating Current :1.47A
Open-Circuit Voltage : 21.5V
Short-Circuit Current: 1.65A

I bought the arduino uno r3 and everythings well. But I'm still a little scared about plugging in the 12V. Is it possible to use a regulator to reduce the input voltage?

With open circuit voltage of 21.5V tha would be a great idea.
Mouser sells a line of Recom DC/DC modules,
such as

I'd look into something like that.

Wow! Thanks for the suggestion. I have with me a 9V and a 5V regulator, can I use it instead of a DC/DC converter? Ordering from mouser requires a shipping fee of $30 and it would not be worth it if I buy the converter itself.

If the 9V can take higher voltages, that would help. Don't forget caps as needed by the datasheets.

Is there any way to find out the capacitor rating required?

You'd want 50V caps on the input side of 9V regulator, 25V or 16V caps everywhere else.
10uF/1uF for 9V, and 1uF/1uF for the 5V would work fine.