Hello and a very good day. I am currently doing my final year project which involving Arduino KY-031 Knock Sensor as my input signal and it is apparently a digital type of sensor. So, my question is can the digital signal be converted to analog signal ?

The reason I need it to be analog signal because I wanted it to be classified into 3 type of stages (low,medium,high).
p/s: I am using Arduino Uno as my controller.

  • Yes, there is a Digital-to-analog converter. it is apparently a digital type of sensor - what is this sensor? Please read How do I ask a good question?. – Nick Gammon Apr 11 '18 at 3:36
  • The Arduino is a digital device. You are getting a digital input. How will it help to convert it to analog? – Nick Gammon Apr 11 '18 at 3:39
  • @NickGammon It's a KY-031 as per the question :-) – Mark Smith Apr 11 '18 at 8:39
  • Oh yes, sorry. If you want loudness then you need a different sensor, like a small microphone where you could detect the level of output from it. – Nick Gammon Apr 11 '18 at 20:57

You can create an analogue representation of any signal - but you can't add in information which wasn't previously there. The KY-031 doesn't give you any more information than "knock" or "no knock", so there's no way to get further detail out of it.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.