I started with the above idea and changed it to a thermoelectric / peltier based cooling system. Now the problem is the peltier cools for a few seconds and then starts getting heated up, I dont think the peltier is damaged because after a while if I try it the same thing happens again. What am I doing wrong here.
This video might help, though it is more about energy harvesting. The warm side of the peltier element does need to be cooled or have a large heatsink for it to work. Works like a heat pump, heat energy must flow from one side to the other. But once the hot side is filled up with energy (too hot) then no heat can flow from the cold side any more and the temperature difference starts to fade.
https://www.youtube.com/watch?v=9aSPopIcKLQ
From your link it is far from clear how you replaced the fan with the Peltier element. (there is no mention of it) Please explain better what you did with it. Schematic please.