Circuit to recharge a battery

Hi,

I have a project and I want to supply Arduino by a 9V or 12V rechargable battery. Also, I want to recharge that battery with Arduino, throught the USB port. Is this possible? If it is possible , do you know how I can do that?

I have Arduino UNO and Arduino Nano.

Thanks

YMON:
Hi,

I have a project and I want to supply Arduino by a 9V or 12V rechargable battery. Also, I want to recharge that battery with Arduino, throught the USB port. Is this possible? If it is possible , do you know how I can do that?

I have Arduino UNO and Arduino Nano.

Thanks

It would help you to get better answers if you described your project in more detail.

'a 9V or 12V rechargable battery' for instance is not a lot of help and whether it would be possible to recharge either from the 5V on an Arduino board rather depends on the '9V or 12V rechargable battery' you had in mind.