How to make an IR sender to turn on my Sony tv.

How to make an IR sender to turn on my Sony tv.

I too was wondering how we can do a device transmit a learned IR it when motion occurs.