I suffered through a burnout while working at my own company (which failed miserably), so I know my signs of burn out. My alarm bells go off when topics that should be exciting are not and I am more nihilistic (than usual). But these signs are different from person to person.
If I notice these things, I know I need to take a break and “do one for the soul”, as Paul Lewis says. Find a project that I want to do, with no connection to my day job. Sometimes it’s even better to put away the technology and enjoy some sports, the outside, and other non-technology hobbies (currently that’s photography).
In general keeping an eye on work/life balance has proven quite effective for me at preventing burnout.