Connect with us

Piezo sensor circuit

Discussion in 'Sensors and Actuators' started by Rixen, Aug 1, 2016.

Scroll to continue with content
  1. Rixen

    Rixen

    98
    23
    Feb 16, 2016
    Hi all

    My brother, who is a long distance competition shooter, asked me to help him with a small circuit that, when he hits the target plate would turn on a lamp for a few seconds, he showed me a forum where a guy had made just this, using an arduino, but this seems like a much more expensive solution for something that im thinking, is quite simple, so I came up with this, the idea is to simply attach the sensor and/or the whole circuit, to the back of the target plate, im intending it to run off a 9v battery.

    [​IMG]

    The sensor sends out a given voltage depending on how high the pressure is, the op-amp compares it's non-inverting input with the inverting and turns the output high when it exceeds, which triggers the 555 timer in a monostable configuration, which triggers the load.

    This is the type of sensor im using, I dont have any datasheet for it, not even a name, I bought them on eBay.
    If you really put the hammer to it, it almost outputs 100VAC.

    [​IMG]

    I've breadboarded this and experimented with some of the values, and it works exactly the way I want it to work, which I suppose isn't an actual problem, but I've never used these kind of sensors before.

    Im looking for some input on the circuit, especially the sensor output and op-amp input, am I doing this right? or will my op-amp have a short life.. Im also thinking of changing D2 with a potmeter so the sensitivity can be adjusted.

    Well? ;)
     
  2. Alec_t

    Alec_t

    2,822
    754
    Jul 7, 2015
    You will need to protect the opamp inputs from high voltage spikes. Diodes from R2 to both supply rails will help.
    D1 is unnecessary as the piezo generates a bipolar pulse.
    The non-inverting input of the opamp may need to be biased to a level close to that of the inverting input.
    Personally I'd replace the zener with a resistor.
    Both opamp inputs need a path to ground for their bias currents.
     
    Rixen likes this.
  3. Rixen

    Rixen

    98
    23
    Feb 16, 2016
    Thanks for the input Alec!

    Ah ofcourse.. like so?
    [​IMG]

    I understand what you mean, but im not sure how to go about doing this without "messing up".. can you elaborate?

    Ditch the zener diode for a potmeter, bias the inputs with very large resistors and equally large resistors to ground?

    Yep, im planning on doing just this :)

    Once again thanks :)
     
  4. Alec_t

    Alec_t

    2,822
    754
    Jul 7, 2015
    Yup.
     
    Rixen likes this.
  5. Rixen

    Rixen

    98
    23
    Feb 16, 2016
    Hehe, it requires 7nA input bias current, well. It's certainly getting that now :)

    [​IMG]

    Hows that looking? is R6 messing with me? will I need a capacitor in series with the sensor now?
     
  6. Alec_t

    Alec_t

    2,822
    754
    Jul 7, 2015
    The piezo effectively is a capacitor.
    Might be an idea to mount the piezo via a slightly resilient layer, not directly on the target plate. The piezo material is brittle.
     
    Arouse1973 and Rixen like this.
  7. Rixen

    Rixen

    98
    23
    Feb 16, 2016
    Yeah, I just thought the current comming from R8+R3 would somehow disturb it or otherwise make it behave "funny" :confused:

    Good point, im thinking of just putting the sensor inside the box with the rest of the electronics, unless it becomes too insensitive then..
     
  8. Jouellet

    Jouellet

    86
    19
    Feb 2, 2015
    I did something similar to that for a target system for Airsoft guns.

    I used a piezo that is connected directly to an Arduino Pro-Mini. The Piezo will generate a small spike that will drive an interupt in the Arduino's logic.

    I printed a casing for the Piezo (there are also a few LEDs) and protected the piezo with a layer of Lexan (polycarbonate). I actually ended up with 3 x 1/8" Lexan, as the impact would crack the piezo behind....
     
  9. Rixen

    Rixen

    98
    23
    Feb 16, 2016
    This is pretty much what I saw another guy do aswell.

    I've got a plastic project box, that im planning on putting the whole thing into for now, sensor included.
    The box will be attached to the back of the target plate using velcro, with wires comming out to the lamp, (A rather powerful handheld searchlight..) if it survives being shot at like that, it's all jolly good I suppose, if not, I'll have to come up with something else :)
     
  10. Jouellet

    Jouellet

    86
    19
    Feb 2, 2015
    That's what my target looks like :


    upload_2016-8-5_9-45-23.png
     
    Arouse1973 likes this.
  11. AnalogKid

    AnalogKid

    2,359
    659
    Jun 10, 2015
    Late to the party; some questions...
    How are you controlling the power to the lamp?
    What is the lamp voltage and current?
    What is a good adjustment range for the lamp ON time?
    Do you have any feel at all for the peak voltage out of the piezo sensor in this application?

    If the lamp can be switched on and off with a power MOSFET, I'm thinking you can replace the TL071 and the NE555 with one transistor (maybe) or one CMOS logic chip (definitely).

    ak
     
    Last edited: Aug 5, 2016
  12. Rixen

    Rixen

    98
    23
    Feb 16, 2016
    Well, welcome! :)

    It runs off 3.6v, it houses 3x 18650 lithium batteries in parallel, the current draw is unknown, I dont have the thing here to test it right now, my brother who's a machinist is currently making a few small modifications to it.

    They said anything between 2 and 5 seconds is good, right now it's about 5 seconds, but I've made it adjustable by changing R5 to a pot meter.

    I tried to measure the peak voltage using a scope, if you really punish that sensor it will output about 100VAC-PP.
    But how much will it output in this application? Unknown, I cant come up with a way to safely test it, I dont want to risk myself or my equipment :( so I need to be able to adjust it's sensitivity.

    This is the lamp were going to use: https://www.xtardirect.com/collecti...h-and-rescue-led-flashlight?variant=529950765

    We are good friends with the dealer and he gave us a few samples to work with.
    At first I wanted to somehow modify the electronics inside it, but it does not come apart, atleast not without damaging it or it requires special tools.

    So im going to control the power by putting this disc into the battery housing, the 555 timer will close the circuit by activating a relay, that's the idea anyway.

    [​IMG]

    I originally wanted to use a MOSFET for this, but I just dont feel like I really know enough about them, so I went with a relay..

    Im very interested in learning about alternatives to my current circuit :)
    which CMOS chip will do this?

    Thanks!
     
  13. AnalogKid

    AnalogKid

    2,359
    659
    Jun 10, 2015
    To turn a short input pulse into a multi-second output pulse, two methods are some form of R-C (resistor-capacitor) timer like a 555 or logic gate monostable, or a counter. The counter method is much more accurate and stable, but more difficult to adjust, An R-C timer is pretty simple, but has problems with the large capacitor needed for a long delay because the capacitor leakage current can be a significant fraction of the timer charging current, and vary greatly with temperature.

    I'm not a big 555 fan because the chip has many...quirks. It isn't a true monostable because it has no feedback, so under some conditions the output pulse width varies when the input pulse width varies. A true monostable made with two of the gates in a CD4093 makes the same output pulse whether the input pulse is 100 ns or 100 s. Also, the gates have hysteretic inputs so there is no output noise burst when the input changes very slowly. This is important for a multi-second timer.

    An oscillator-counter circuit can be way more accurate than you require here, and not automatically more complex. One advantage is that in its cheap mode (R-C oscillator instead of a crystal) the capacitor is much smaller than one in a monostable with the same output pulse width. Smaller caps are more stable over time and temperature.

    I'll putter around with a couple of schematics.

    Separate from that, your schematic shows the timer powered by 9 V. Standard CMOS parts are rated down to 3.0 V operation, so the timer could be powered by the flashlight battery supply.

    ak
     
    Rixen likes this.
  14. AnalogKid

    AnalogKid

    2,359
    659
    Jun 10, 2015
    Schematics for two of the many alternate circuits to do this task. The upper one is a standard monostable followed by a logic-level N-channel power MOSFET, and everything runs on the lamp batteries. R3 can be changed to a pot for variable lamp on-time. The lower one is based on an oscillator/counter chip, with separate power for the timer and the lamp. These circuits assume the piezo makes at least 2 V or 6 V. If not, there are simple mods for lower input signals. Questions?

    ak
    TargetFlasher-1-c.gif
     

    Attached Files:

    CDRIVE, BrianRD and Rixen like this.
  15. Rixen

    Rixen

    98
    23
    Feb 16, 2016
    That's some really cool circuits there, I've recently used the 4060 at work, but for something much different.
    I think im going to try play around with the first one using NAND gates, though it may have to run off 9v, im not at all sure I can actually get to both terminals in the battery housing, the case itself may be circuit ground too though, but I will have to test for that.

    Im looking at the NAND circuit and I just want to be certain that I understand how it works as I want to learn from all my projects, bear with me :)


    ON / Charging:

    Sensor outputs a high pulse, U1A output goes LOW and U1C output is initially HIGH

    U1D output goes HIGH, charging C1, U1C Inputs are held HIGH, output is LOW, U1B output is now HIGH for 4,7 seconds.

    OFF / Discharging:

    U1A inputs are LOW, output is HIGH, C1 is discharged through R3, U1C output is HIGH U1B output is LOW
    U1D Output is LOW

    And on it goes.

    It made sense in my head, I hope this is correct? also, which program was used to make these schematics?

    Thanks for the help, it's really appreciated :)
     
  16. AnalogKid

    AnalogKid

    2,359
    659
    Jun 10, 2015
    Your analysis is correct as far as it goes. Two things.

    1. On the very first positive edge out of the sensor (and negative edge out of U1A) U1C's output goes low. AND, it is fed back to the other input of U1A. This low holds the U1A output high no matter what happens at the sensor input. High, low, bounce, oscillation - doesn't matter. This is a fundamental characteristic of a true monostable circuit, the output pulse completes its timed period no matter what.

    2. When the U1C output completes its period and goes high again, that high goes back to U1A. There are two possible conditions at the other U1A input, so there are two possible conditions at the left side of C1. These affect when C1 is discharged and ready for another cycle. As shown, it takes at least as long for C1 to discharge as it did to charge. This can be shortened greatly by adding a catch diode in parallel with R3, anode to GND.

    ak
     
    Rixen likes this.
  17. Alec_t

    Alec_t

    2,822
    754
    Jul 7, 2015
    AK, would it be advisable to add 100k or so in series with the inputs of U1C, to limit the internal protection diode current?
     
    Rixen likes this.
  18. AnalogKid

    AnalogKid

    2,359
    659
    Jun 10, 2015
    I thought about that when I drew this up. Its never been a problem in the gazillion times I've used the circuit, but 10 uF is a bit larger than a typical monostable timing cap. Either a series resistor or the catch diode mentioned above will protect the input; the diode has the added advantage of resetting the capacitor more quickly.

    ak
     
    Rixen likes this.
  19. Rixen

    Rixen

    98
    23
    Feb 16, 2016
    Alright, looks like im set, im going to add the diode in parallel with R3, I dont have the 914's from the schematic but I do have alot of 4148's instead, I think it should be fine.

    I've ordered some 4093's, im looking forward to trying this out :)
     
  20. Rixen

    Rixen

    98
    23
    Feb 16, 2016
    Just thought i'd give an update on this one.

    It all worked as it should on the breadboard, so I went ahead and made a PCB for it, it's going to be mounted in the box, after i've drilled the various holes for the pot meters and on/off switch, MOSFET has yet to be soldered, but I think i'll use one of those IRL3034's from a previous project, since I have like 30+ of those lying around.

    Here's a picture of the work so far:

    [​IMG]

    Never mind the mounting holes there, there's a different set of holes in the box that I will be using :)
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-