Analog Comparator using LM393A with analog and digital output from ICStation. Module you can buy from http://www.icstation.com/product_info.php?products_id=3303