Author Topic: Piezoelectric sensors, Fm trancievers and more.  (Read 1967 times)

0 Members and 1 Guest are viewing this topic.

Offline WigoTopic starter

  • Contributor
  • Posts: 44
  • Country: at
Piezoelectric sensors, Fm trancievers and more.
« on: May 13, 2019, 11:38:53 am »
Hello Community,

I am fairly new to electronics. I started my learning expierience 4 months ago. And while i am making good progress, the information on the internet is just too much to choose the right spots. Even my google skliis have forsaken me as i am out of ideas of what terms to search for. So i hope you can help me in designing my first own project and bringing it to life  :scared:

So what do i want to design?
Good you ask. Basically i want to meassure inpatcs on wooden tragets and transmit the "data" to a base station where it will be stored and displayed.

So what is the purpouse of this "gadget"?
Well in short it should save me time. If i can meassure the inpacts (or better said the number of inpacts) on the targets and transmit it back i can save up to 2hrs.
The maximum range for the transmitting would be up to 1km but with line of sight.

What have i achieved till this point?
Ok this will need a little bit of room to outline this all.

  • I came up with the idea to use 2,57cm piezoelectric disks (or better said guitar pickups) to sense the inpact. As i have no idea how much of the inpact energy will be transferred i needed some way of  setting the sensitivity for the meassurement.
  • Some googling later i tried to use the piezo directly on the analog inputs of an Arduino (mit a 1M resistor in parallell) and set the sensitivity in the code. This got me the first hint that i need something different. The signal was too small to be meassured if the inpact was more than a few mm away from the sensor.
  • ok my next thought was that i need some kind of amplifier. Said and done i found a little tutorial ( http://davidhoulding.blogspot.com/2014/02/high-sensitivity-vibration-sensor-using.html?m=1 ) online that uses a LM358 as amplifier and comparator to puls a logic high signal if vibrations are sensed by the piezo and the sensitivity can be set via a 100k potentiometer.
  • through Google i found that i can use LoRa to transmit the data from my Nodes to the Base.
  • All Sensors and Nodes should be powered by battery and should work for 48 hrs. But i have not had the time to think about power consumption jet

Ok now to the guts of my problem(s)/questions.

  • As i have up to 50m between the sensores and my transmitting nodes i had the idea to establish an Fm connection between teh sensors and my nodes. But is it possible to toggle a Fm signal without a microcontroller? The easiest way i can think of achieving this would be some sort of Fm relay that toggles to logic high when it gets a Fm puls from the sensor. The Node will be a Micro to handle the LoRa transmission with the base.
  • As following tutorials is nice and easy but it does not have a greast value in understanding why and how this things work i want to design my own amplifier circurit. But i have no clue where to begin with looking for an OpAmp or better said i do not know exactly what the OpAmp should be capable of. Maybe some one can give me a hint on what to look after?

I hope someone can give me a little hint. Even tipps on what to google after are highly appreciated.

The first picture is of a simplified positioning of the Sensors and other things. Green are the sensors, Red is the Node consiting of a Microcontroler and the LoRa module and Red will be the Basestation made of a Microcontroler and LoRa module.

The second sketch is of the dimensions of the target and the position of the sensors.

Best regards,
Chrsitian
« Last Edit: May 13, 2019, 11:49:27 am by Wigo »
 

Offline WigoTopic starter

  • Contributor
  • Posts: 44
  • Country: at
Re: Piezoelectric sensors, Fm trancievers and more.
« Reply #1 on: May 27, 2019, 07:48:32 am »
Ok i made a few steps forward.

I kept the amplifier circuit based on the LM358 and made a successfull test with real life conditions. It works nice but it is a little bit too sensible. Good that i can adjust the sensitivity.

As this is working i moved on to the next part. The Fm transmition of the signal. I found cheap 433mhz receivers and transmitters. And as i have to have a way to tell the sensors appart i will add HT12E/D pairs to the transmitters and the reciever. Now i can set an individual adress for each sensor and i can tell them appart within the microcontroller on the receiving end.

Attached is the schematic for the sensor and transmitter circuit. Maybe someone can have a look at it. i am sure there are mistakes in it that i have not spotted yet. Or maybe there is room for improvement?
Please let me know if so.

Best regards
Christian
 

Offline jeremy

  • Super Contributor
  • ***
  • Posts: 1079
  • Country: au
Re: Piezoelectric sensors, Fm trancievers and more.
« Reply #2 on: May 27, 2019, 11:34:25 am »
LoRa should easily do what you need, how much data do you need to transmit and how often? It should be pretty easy to get 48h of battery life.
 
The following users thanked this post: Wigo

Offline profdc9

  • Frequent Contributor
  • **
  • Posts: 331
  • Country: us
Re: Piezoelectric sensors, Fm trancievers and more.
« Reply #3 on: May 27, 2019, 03:12:56 pm »
A piezoelectric element has a high impedance.  You may get better results using a JFET op-amp which has a high input impedance such as the TL081/TL082, especially at high frequency.  The TL082 is a drop-in replacement, more-or-less, for the LM358.  I typically use JFET op-amps on piezo disc guitar pickups and the like.

 
The following users thanked this post: Wigo

Offline ThomasDK

  • Regular Contributor
  • *
  • Posts: 139
  • Country: dk
  • B.Eng. EE
Re: Piezoelectric sensors, Fm trancievers and more.
« Reply #4 on: May 27, 2019, 05:57:15 pm »
The TL082 is a drop-in replacement, more-or-less, for the LM358.
Well, mostly 'less' in this case. A TL082 will NOT work in this circuit.

LM358 has common mode range to ground, while TL082 is 3V to VDD. In other words, the piezo needs to output at least 3V before the TL082 'sees' it.
 

Offline WigoTopic starter

  • Contributor
  • Posts: 44
  • Country: at
Re: Piezoelectric sensors, Fm trancievers and more.
« Reply #5 on: May 27, 2019, 09:11:12 pm »
LoRa should easily do what you need, how much data do you need to transmit and how often? It should be pretty easy to get 48h of battery life.



LoRa is definetly planned. I have to cover up to 1000m open ground.

My plan so far is to use "dumb" sensors. The sensor consists of the schematic from my last post with a slight variation. I will add another 2n222 to switch the transmitter on and of if a signal is detected. And a transmission is needed. So far this works.
The receiver, for up to 10 Sensors will consist of a uC, a receiver module and 10 decoders + one LoRa module.

I need to transmit, in this case, 12 bits from the sensors to the receiver, but, at the worst case, up to a few hundred times in a minute. (But not all sensors are transmitting constantly). But i only need this transmissions for a maximum timespan of 12 hrs, with up to 1 hr between the next events.

With the LoRa modules i plan to send the gathered data to a "base" station but only if the data is requested. And there the data would be nothing more than an array of 10 integers.

I just meassured the current draw of one of the sensors (but without the encoders, they will arrive on wednesday) and while transmitting it is arround 40mA and while idling arround 22uA.

I have not decided on what batteries i will use but mit 2400 mAh AAA (4pcs) i will get arround 3 1/2 years of battery life ;) so i think i could downscale this a little bit and just use 2 Cr2032.


A piezoelectric element has a high impedance.  You may get better results using a JFET op-amp which has a high input impedance such as the TL081/TL082, especially at high frequency.  The TL082 is a drop-in replacement, more-or-less, for the LM358.  I typically use JFET op-amps on piezo disc guitar pickups and the like.


The TL082 is a drop-in replacement, more-or-less, for the LM358.
Well, mostly 'less' in this case. A TL082 will NOT work in this circuit.

LM358 has common mode range to ground, while TL082 is 3V to VDD. In other words, the piezo needs to output at least 3V before the TL082 'sees' it.

I will have a look at them and test them out. The only thing that could happen is that it will not work.
 

Offline WigoTopic starter

  • Contributor
  • Posts: 44
  • Country: at
Re: Piezoelectric sensors, Fm trancievers and more.
« Reply #6 on: May 28, 2019, 05:39:51 pm »
I changed the schematic a little bit to make it more clear, and to account for the changes in the transmitter circuit. It is now only powered when it needs to transmit a signal.
 

Offline WigoTopic starter

  • Contributor
  • Posts: 44
  • Country: at
Re: Piezoelectric sensors, Fm trancievers and more.
« Reply #7 on: June 05, 2019, 10:07:09 am »
So a few days have passed and i drew a back to start card.

What has happend in the meantime?
I had the chance to test it under real life conditions and it works but it does not life up to the expectations. While the sensor curcuit itself is fast enough to detect the impacts at a reasonable fast rate the transmissiin circuit with the encoder/decoder is to slow to transmit fast pulses.
And i have to have a look at the transistors if they are the right part for the job.

So basically i have two ideas:

First:
Introduce a buffer circuit to buffer fast pulses and transmit them once the buffer is full (if this is even possible in analog circuitry)

Second:
Switch to microcontrollers that will handle the data aquisition and the transmission.

So am i missing something?
Or do you have other ideas that i am overlooking?
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Piezoelectric sensors, Fm trancievers and more.
« Reply #8 on: June 05, 2019, 11:06:15 am »
"I need to transmit, in this case, 12 bits from the sensors to the receiver,"
"encoder/decoder is to slow to transmit fast pulses."


Some parts confuse me. :)

The output voltage from a piezo can vary a lot from mV to Volts, depending.....
The BW of a LM358 with a gain of 150 won't be very high, but that might not matter too much, because HF pulses from the piezo will be higher in amplitude than LF pulses.

Now you've done some real-world tests of the impacts perhaps you could build a simple mock-up just of the wooden target and piezo and tap it with a similar level and speed of impacts for bench testing.

"Switch to microcontrollers that will handle the data aquisition and the transmission."

It sounds like it, if it doesn't complicate it too much!
« Last Edit: June 05, 2019, 11:08:08 am by StillTrying »
.  That took much longer than I thought it would.
 

Offline WigoTopic starter

  • Contributor
  • Posts: 44
  • Country: at
Re: Piezoelectric sensors, Fm trancievers and more.
« Reply #9 on: June 05, 2019, 11:52:53 am »
"I need to transmit, in this case, 12 bits from the sensors to the receiver,"


The 12 bits come from the encoder, it will transmit 8 adress bits and 4 data bits.


"encoder/decoder is to slow to transmit fast pulses."



The decoder needs three complete transmissions to verify the data and to switch on/turn off his outputs.

I have done testing in my shop without the encoder/decoders and with continous sending of the transmitter and i get a signal every tap.
If i install the encoder/decoder i can only manage to get repeatable results if i take a significant pause between the taps.
So i assume the en/decoding takes up the time.

But as all i need would be a attiny that takes care of the signaling. I think i will go down this way if i can not figure out the analog problems.

Thanks so far and i will keep you guys updated
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Piezoelectric sensors, Fm trancievers and more.
« Reply #10 on: June 05, 2019, 01:04:04 pm »
"The decoder needs three complete transmissions to verify the data and to switch on/turn off his outputs."

I see.

"If i install the encoder/decoder i can only manage to get repeatable results if i take a significant pause between the taps.
So i assume the en/decoding takes up the time."


By my calculation with 3 transmissions it takes about 1/23 sec. to change the state of the decoder's output, so the max. rate of transmitted pulses is about 11 per second, I assume that's fast enough.

It's not clear to me from the HT12A/HT12E data sheet what happens with the 12.3 bit pilot/preamble time when the HT12A is in continuous transmission, which might slow the max change/pulse rate down even more.
« Last Edit: June 05, 2019, 01:12:25 pm by StillTrying »
.  That took much longer than I thought it would.
 
The following users thanked this post: Wigo

Offline WigoTopic starter

  • Contributor
  • Posts: 44
  • Country: at
Re: Piezoelectric sensors, Fm trancievers and more.
« Reply #11 on: June 05, 2019, 02:23:06 pm »
The fastest pulses would be arround 6ms (rounded down, calculated they are near 6,6 ms) so the ht12 would be too slow, but that rate would not be needed on every sensor.

But at that frequency i run into other problems.
The RC network that is used to elongate the pulse to allow a sucessfull transmission would also be to slow. (But that can be changed)
But i think that with that short pulses i need a better way to distinguish between the pulses and oscilations of the piezo after a pulse. Thats definetly something i need to meassure.

I think i takled this a little bit too fast, interms that i was racing to get everything implemented. Till i can take the next real life experiments i have a few months time, so i can troubleshoot and reevaluate the whole thing.

The analogue circuit is nice in terms of power consumption, but it gets more and more complicated and open for failures.

If i go the uC route however i could establish a good an reliable communication and i can, if i use trancievers, establish a just send on request policy.

I have ouch to think about.
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Piezoelectric sensors, Fm trancievers and more.
« Reply #12 on: June 05, 2019, 04:22:58 pm »
"The fastest pulses would be arround 6ms (rounded down, calculated they are near 6,6 ms) so the ht12 would be too slow,"

Yes the HT12E is taking at least 25ms to send just one frame.

This no encoder/decoder might be worth a read while you're thing about it.
https://www.romanblack.com/RF/cheapRFmodules.htm
.  That took much longer than I thought it would.
 
The following users thanked this post: Wigo

Offline WigoTopic starter

  • Contributor
  • Posts: 44
  • Country: at
Re: Piezoelectric sensors, Fm trancievers and more.
« Reply #13 on: June 05, 2019, 06:07:25 pm »
 
Yes the HT12E is taking at least 25ms to send just one frame.

This no encoder/decoder might be worth a read while you're thing about it.
https://www.romanblack.com/RF/cheapRFmodules.htm

Thanks for the link. It was a good read and something worth to consider to use. I have the exact same RF-Modules as used in the article.

Now i have to turn on my calculator, fire up google and start a new planing phase
 

Offline WigoTopic starter

  • Contributor
  • Posts: 44
  • Country: at
Re: Piezoelectric sensors, Fm trancievers and more.
« Reply #14 on: June 24, 2019, 09:18:08 pm »
Just a quick update.

I am currently in the process of redesigning the whole project.
As mentioned above the purely analog sensor/Tx circuitry is to slow to capture the (possibly) fastest pulses i have switched over to using uC for the sensors as well.

By now i am evaluating what uC i really need for that task. And it depends on how i will, can implement some sort of identification for the sensor it self. I really like the idea of using Dip-Switches for setting the ID/Adress of the Sensor and given that i need a maximum of 10 Sensors connected to one Node i could use the first 4 "bits" to specify the Adress of the Node it self and the last 4 "bits" to specify the Adress of the Sensor.
That would give me a total of 15 Nodes that could work independently with each Node having up to 10 Sensors connected to it. (If i have not miscalculated something).

I want to use Dip-Switches over "Hardcoded" Adresses because that would eliminate the need of tieing the Sensors to the Nodes permanently.

The second path i am following is that i consider switching from a one way communication to a complete two way communication. That would give me the ability to time the transmission of the Sensordata to the node (so that i do not have overlaping signals) and i could easily implement a powersaving mode and a reset. It would also lower the time i use the frequenzy as ther would only be a transmission if it will be requested by the user.

And the third path is that i am trying to build a test system, or a simulation system, to test various settings of filters and timing at home. I only need one more realtime test with the old analoge Sensor to get a good meassurement of the oscillation of the piezo upon impact to recreate it at home. But i have to decide if i want to do a realworld modeling (in terms of the forces provided) or a simplified modeling. Maybe i can even recreate the oscillation with an AWG but first i need to get a real world measurement.

I will keep you updated.
Christian

 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Piezoelectric sensors, Fm trancievers and more.
« Reply #15 on: June 26, 2019, 02:07:51 pm »
I think this is becoming awfully complicated, and still not well defined, the 2 way LoRa communication would be a project all in itself.
.  That took much longer than I thought it would.
 

Offline WigoTopic starter

  • Contributor
  • Posts: 44
  • Country: at
Re: Piezoelectric sensors, Fm trancievers and more.
« Reply #16 on: June 27, 2019, 07:23:10 am »
I think this is becoming awfully complicated, and still not well defined, the 2 way LoRa communication would be a project all in itself.

You are right. It gets more and more complicated as i go on with designing it. This is also something that bothers me.

Ideally i would want really dump sensors that just transmit the puls to one central unit which would collect the data. That would eliminate the need of a two way communication,  reseting the sensors and so on.

But regarding this method i have two major concerns:
First: More than one Sensor could send at the same time and thus i could loose some of the data.
Second: As the pulses are not consistent and nowhere near a fixed frequency (but the highest frequency can be 830 HZ where an analoge transmission with encoder/decoder would be to slow) i have no idea how to gather the data with other means.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf