So I was reading about Simple AutomaticLight Controller using LDR. or with the help of LDRSenso. But I have LM393 Photoresistor (LDR) Sensor I like to know are they same thing or somewhat different. So the way they work is detecting

light intensity and It is associated with both analog output pin and digital output pin labelled as AO and DO respectively on the board.When there is light, the resistance of LDR will become low according to the intensity of light. The greater the intensity of light, the lower the resistance of LDR.

And before that I was reading about Analog Piezoelectricity Ceramic Piezo Vibration Sensor For Arduino

So LDR sensor needs some kind of resister. And Analog Piezoelectricity Ceramic Vibration sensor needs some IC.

Can Anyone be specific to these specific resister and IC for each sensor types. I have them both as module for arduino Uno. I like to code in gcc avr. Thats how I am restricted. And will use C code to control but Can any please be briefly explain this type of resister for LDR sensor and Piezoelectric vibration sensor IC. Just few words to help me relate to some explanation and easily get poped in my mind when ever I hear about these two modules again. So Just some brief on this specific types of resister and IC related to these two modules why they needed how to code, and control through code

These are pictures of two sensors as Chrisl asked

enter image description here

enter image description here



  • 2
    If you need extra circuitry for a sensor depends on the exact sensor. Please provide a link to that exact product, that you have. Or - if there is no product link - then at least a few good photos of the used sensor/board and the part numbers, that might be printed on the boards or components.
    – chrisl
    Commented Apr 14, 2022 at 7:53
  • @chrisl hi please check the sensor modules pictures I have posted
    – user786
    Commented Apr 14, 2022 at 8:53
  • So you have a product page. Then please include the link to that product page in your question.
    – chrisl
    Commented Apr 14, 2022 at 9:03

1 Answer 1


Both images, that you included, show breakout boards. They are circuit boards (PCB - Printed Circuit Board), which contain all the components, that are needed to connect the corresponding part (in your case a piezo and an Light Dependent Resistor (LDR)). They are called this way, because they are "breaking out" simple output pins from the sensor circuitry for directly connecting them to the Arduino. So instead of having to build the circuit with the pure components you have a simple board, which gives you standard pin headers for connecting to the your Arduino. They are also often called "modules".

That means, that you don't need any additional circuitry or ICs to connect these boards to the Arduino. For the piezo sensor the image even shows the wiring diagram. You can see there, that you don't need any additional parts besides the breakout board, piezo and the Arduino itself. The same applies for the LDR breakout board.


For the piezo sensor you have an analog output. Thus you need to connect that to an analog input on the Arduino (A0 to A7) and read the signal with analogRead().

For the LDR breakout board I cannot be sure without a link to the product page, but it seems, that it has a digital output (DO). You can connect it to a digital input of the Arduino. It will switch between HIGH and LOW at a certain threshold brightness, which you can control by using a small screwdriver to rotate the little potentiometer on the board (the blue box with the hole in the middle).

  • can u please tell what is meant by breakout board. I have no clue. Are u refering breakout board to my sensor modules?
    – user786
    Commented Apr 14, 2022 at 9:27
  • I have also posted product page link
    – user786
    Commented Apr 14, 2022 at 9:28
  • @user786 I changed the description at the start of my answer to make it more clear.
    – chrisl
    Commented Apr 14, 2022 at 9:33
  • Can u please tell last thing what is negative and positive electrodes on piezo sensor. Can I use screw driver for this too to control something?
    – user786
    Commented Apr 14, 2022 at 9:49
  • @user786 The black wire of the piezo is ground. And no, you cannot set anything with a screwdriver here. You need to read the analog signal in your Arduino code. Then you can use your code to do a similar thing (doing something, when the read analog value is higher or lower than a specific threshold).
    – chrisl
    Commented Apr 14, 2022 at 10:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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