I wonder if anyone has hacked an Optical Mouse sensor to measure water level in an overhead water tank? Its possible to read frames data from the sensor and if those frames could be processed with a MCU then it looks like its possible to detect water level in a tank. I am going to do it for a tank of 4 to 5 feet height using STM32F407 MCU. Is it worth a try?

  • \$\begingroup\$ Can you give more detail on how you plan to have the sensor read the water level itself? Should be easy enough to read the sensor with your MCU though. \$\endgroup\$ – evildemonic Feb 4 at 23:11
  • \$\begingroup\$ One possibility is to read the frames at various water levels and save those frames in the MCU and later correlate the runtime frames with them to estimate the water level at any point in time. The update rate can be very slow due to the specific nature of application.. even if it takes several seconds to confidently process a frame even that would suffice. Arranging a LED light source and focusing lens arrangement could be a big challenge i think. \$\endgroup\$ – scico111 Feb 4 at 23:16
  • \$\begingroup\$ My understanding of these sensors is that they do not put out an image. i.e. they do their own image-difference interpretation and output direction and velocity data. Do you have a particular sensor in mind? (part number or better yet a datasheet link would be helpful) \$\endgroup\$ – evildemonic Feb 4 at 23:19
  • \$\begingroup\$ I'm pretty sure they also tend to have a focal range of basically nothing, since they're supposed to be used pressed up against a surface. \$\endgroup\$ – Hearth Feb 4 at 23:21
  • 1
    \$\begingroup\$ Neat sensor! I think you do have a shot at making this work, using the pixel data this chip puts out, provided you lens it properly. Has a decent enough serial interface too. \$\endgroup\$ – evildemonic Feb 5 at 16:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.