Electrically driven heartbeat effect of gallium-based liquid metal on a ratchet