I have this circuit I wanted to build a 12v automatic battery charger using a relay. My charger specs is 12v 1a and my 12v battery is 3000mAh..my 1k resistor is connected to the 13 pin on arduino.and 12v ground is connecte4d to the ground of arduino. Is it safe to use the 12v battery under charge to control a solenoid.???
will it my not damge the arduino???
what changes to my circuit do i need to do??
WHY ARE ALL YOUR SUBJECT LINES IN ALL CAPS? 
It is considered yelling when you use all caps. Don't do that. 
12v battery 3000mAh is not enough information when discussing charging.
What chemistry battery? NiCad? NiMH? LiPo? LiFE? SLA?
OP image inlined
vinceherman:
WHY ARE ALL YOUR SUBJECT LINES IN ALL CAPS? 
It is considered yelling when you use all caps. Don't do that. 
12v battery 3000mAh is not enough information when discussing charging.
What chemistry battery? NiCad? NiMH? LiPo? LiFE? SLA?
OP image inlined
Sorry sir, my mistake.
Its a lithium ion (Li-ion) battery sir.
will h=the arduino will be safe?
What exactly is your "12V 1A charger"? Link please. Also a link to the actual battery.
But if you have a 12V power supply not a lithium ion charger then it is dangerous trying to charge a lithium ion battery with it.
Steve
Yes it is safe to take power from a battery which is under charge. However a li-ion battery needs a smart charger and the power draw may confuse the charger.
What does the left side of your circuit do? It looks like a simple voltage-sensitive circuit except it is sensing the voltage of the charger, not the battery.
MorganS:
Yes it is safe to take power from a battery which is under charge. However a li-ion battery needs a smart charger and the power draw may confuse the charger.
What does the left side of your circuit do? It looks like a simple voltage-sensitive circuit except it is sensing the voltage of the charger, not the battery.
No its a combination of a automatic 12v charger using relay to avoid overcharging the lithium ion battery(12, 3000mAh) then the second circuit is used to control the solenoid door lock sir.
Hi,
I would suggest you go and research how to charge Li-ion batteries.
First find out what type of Li battery you have.
Then get a PROPER charging module for it.
Li batteries CANNOT be charged like GelCell or NiCad or NiMh.
Li batteries are not tolerant to abuse from excessive charging and discharging.
Tom... 
PS you have google.. use it...
That is NOT a lithium ion charger. It's a basic DC power adaptor, possibly not even regulated in which case the voltage may go much higher than 12V and do serious damage to the battery.
Steve