The other common cause can be debris like dried up toilet paper stuck onto the sensors inside the tank.
After you check the wiring as suggested by Eagle, there's an old trick many recommend, although I haven't had to try it myself, it sounds like it would.
After dumping thoroughly, fill up your tank with plain water, maybe about 2/3 then pour in a bag or two of party ice (small cubes). Do this just before a trip of at least a few hours. Advocates say all the bouncing and jostling of the water in the tanks tosses the cubes around enough, before they melt, to knock most or all of anything hanging around on the sensors.
Personally, I never rely on the sensors for the black tank, unreliable at the best of times. I can tell by looking down in through the toilet when its time to dump! Also I get a certain "sense" its time when a certain smell starts to become more prevalent when its time!!