SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By angelsix
#91174
I've finally managed to get my ultrasonic sensor circuit to work and detect a reflection, but only using the indoor transducers (not the ones I need to use), but the outdoor ones would only have a reflection of about 100mV after 7,500x amplification driven at 5V (see original post and scope here viewtopic.php?t=18817&start=15).

I presume that the outdoor sensors are a higher voltage rating or something and need driving at a higher voltage (could it also be something to do with 30mA current from PIC not being enough?). Unfortunately I have no specs on them but do know they are 40kHz and are xceivers not just transmitters.

My main questions are firstly how can I boost my 5V frequency to 20V or at least higher than 5V, with the smallest (size) components and only having a 5V supply line feed (so cant use a 12V line and a transistor for example).

Secondly, once I drive the transducer at a higher voltage, my amplifier is connected to one of the pins so would see that higher voltage also and damage it, so could I just use a zener diode clamp or would that not react fast enough?
By markaren1
#91185
Possibly.

Try driving the transducer differentially (one leg high while the other leg low), then the inverse through some high current buffers. This will give you 10V p-p total drive.

You will need some external buffers in parallel on the same die (chip) one set inverting, the other set non-inverting and a few ohms (4R7) to limit current during transitions.

Make sure you have plenty of 5V decoupling close to the ICs - 1uF and 100uF in parallel should be OK. Keep these close to the ICs.

74Hxx240 for one side (all inputs and outputs paralleled), 74xx241 (all inputs and outputs paralleled) for the other. Another option might be using some 26x31s. Also look at the DS0026 clock buffer.

I am leaning towards the 26C31 after saying that all out loud...

If you want more volts, then maybe a small ferrite transformer on the output of the this arrangement.

Don't take this as gospel, but is should be a reasonable starting point.

Regards,

Mark
By MichaelN
#91222
Have a look at the test circuit shown in a spec sheet for some ultrasonic transducers I got from Audiowell Electronics (China). It shows an easy way to drive transducers at a higher voltage and still use as a receiver:

http://users.adam.com.au/mnoble/PAGE3.pdf
By markaren1
#91246
MichaelN, I rather like that.

Do you know of any readily available transformers for the job ? That is the fiddly bit.

Maybe an iron cored torroid ?

-Mark
By MichaelN
#91248
Sorry, not sure of readily available transformers, but you should be able to use wind your own from the same ferrite parts used for switchmode power supply transformers (40KHz is the same ballpark as many switchmode supplies). You'll probably have to do some reading to work out the right number of turns etc.

You may even be able to butcher a small switchmode power supply to save yourself the trouble (eg a switchmode cellphone charger).
By lukemalpass
#91740
Sorry for late reply, thanks to the intelligence of one edembowski who decided to post in the spam list saying I (angelsix) was a spammer, when it was actually a post from a user called Palmer, I have been banned for over a week and am still waiting for the SF IT team to sort it out so have had to create a new account for now. Looks like then dont actually read who posts messages just what other users post.

Anyhoo, rant over. As you know I'm trying to drive this sensor still. I have just come across this http://uk.farnell.com/jsp/search/produc ... ku=1774947

It looks like 1:10 mini transformer for an ultrasonic sensor but I cannot really find any app notes about it. I presume this is used to drive the prowave sensors from a higher voltage going from 10:1, or from a lower voltage and driving it 10x. Is this correct and if so do you think I could use this to try and drive my current sensor from 5V supply to give it 50V drive?
By markaren1
#91819
Hi lukemalpass,

You can always add a few hundred ohms in series with the primary to cut down the current if need be.

My original suggestion to use differential drive (26C31) avoided the need for the transformer - just to see if 10V p-p gets you near where you need to be.

-Mark
By MichaelN
#91824
I have just come across this http://uk.farnell.com/jsp/search/produc ... ku=1774947

It looks like 1:10 mini transformer for an ultrasonic sensor but I cannot really find any app notes about it. I presume this is used to drive the prowave sensors from a higher voltage going from 10:1, or from a lower voltage and driving it 10x. Is this correct and if so do you think I could use this to try and drive my current sensor from 5V supply to give it 50V drive?
Those transformers look like they'd be suitable (considering they are designed to drive these transducers: http://www.prowave.com.tw/english/produ ... 0ep14d.htm)

The simplest way to drive this transformer would be with the "single-ended" drive circuit shown in the link I sent previously (you might want to reduce the value of resistor R2 - I suggest experimenting):

http://users.adam.com.au/mnoble/PAGE3.pdf

As for Mark's suggestion, that is worth a try if you are getting almost enough drive as it is, but this will "only" give you double the voltage. Note that the output power is (probably) related to the SQUARE of the drive voltage.
By lukemalpass
#91830
Thanks for the two replies. I didn't ignore either I was just asking the question about this transformer first as I have had to order another prowave sensor as microchip have my current one and I noticed the transformer as I was ordering so wondered if they would be any use. I have ordered 2 along with them anyway now so I will try all the suggestions.

With regards the PAGE3 document. I presume the R2 and Q1 are just a current limiting resistor and a NPN transistor to basically provide the transformer with the 12V pulses at 120mA (with the 100uF cap there to smooth the ripple) to give 84V drive correct? And it also looks like its one way drive so one leg (C) is always seeing 0V, and the other does the pulsing is that right?

After that the diodes would limit any voltage into the amp to 0.6V max, and the R3/4 seem like a voltage divider to half any reflected voltages? I presume at least some of my thinking here is wrong however?
By lukemalpass
#91831
Mark,
With regards to the line drivers - they look quite cool never knew about them before. However, when I read the data it seems its doing what I already do. I input 5V and I have 2 pins that are then 5V and 0V. When I go low the pins switch over. They are still limited to 0-5V and I already drive my 2 pins like this using the uC so would this not do the same? Other than the benefit of 120mA current?
By MichaelN
#91835
With regards the PAGE3 document. I presume the R2 and Q1 are just a current limiting resistor and a NPN transistor to basically provide the transformer with the 12V pulses at 120mA (with the 100uF cap there to smooth the ripple) to give 84V drive correct?
Yes, R2 and C1 provide a current limiting and smoothing function. The actual voltage at this point would depend on the average current that the transformer is drawing.
And it also looks like its one way drive so one leg (C) is always seeing 0V, and the other does the pulsing is that right?
Yes, point "C" is ground, and point "B" would alternate between a positive and negative voltage. The actual voltage wouldn't be as high as 7*12V (in that example), since the voltage at C1 wouldn't be quite 12V (and also due to the actual transformer, which is loaded with the transducer, which has quite a high capacitance).
After that the diodes would limit any voltage into the amp to 0.6V max, and the R3/4 seem like a voltage divider to half any reflected voltages? I presume at least some of my thinking here is wrong however?
You are correct that the diodes limit the voltage seen by the amplifier, but resistors R3 and R4 do NOT divide the received signal in half (R3 would have to be on the other side of R4 for this to happen). I'm not really sure what purpose R3 has - perhaps it offers some needed damping of the transducer.

I missed the fact that you were driving with 2 pins already, so you are achieving a p-p voltage of 10V anyway.

I don't think you'd achieve better results by using a line driver, since the microcontroller can deliver enough current to ensure a reasonable waveform. It sounds like the transformer would be the best way of achieving higher voltages.
Last edited by MichaelN on Tue Jan 26, 2010 3:05 am, edited 2 times in total.
By markaren1
#91836
Hi lukemalpass,

Doing polarity inversion in software may just be OK if you have a very fast uP and write the inversion in assembler. It didn't occur to me originally. I am also not sure what the peak drive current of the transducer is, but +-20mA may be adequate (?)

Why not try this approach first ? You have all the hardware and I will be interested to see how the performance improves.

I am not sure if you plan to use a transformer that is designed to drive your specific transducer. If not, you may have some resonance or matching issues which may end up with poor performance.

In any case, please report your findings.

Regards,

Mark
By lukemalpass
#91840
Thanks guys. Yes so I have a 10V drive done in pic ASM already and the transformers should come in a day or two so I will try 2 things first. I will try doing exactly as I am but changing the pic outputs to drive NPN transistors connected to the legs through current limiting resistors so the only difference would be a higher current supply.

Then I will try by adding a transformer to drive the transducer with a 100uF to ground on the input side to smooth (like the example), then add a BAV99 on the line going into the amp with pins 1 and 2 to ground and 3 on the line to limit the amplifier input to 0.6V, but the transducer will of been driven at roughly 1:10 of 5V, and compare the results between all 3 methods. I will leave the amplification at the massive 7,500 for now and that can always be reduced once I see a good drive.

Can you see any issues with suggested 2 designs, any extra caps needed due to using NPNs, or anything like that?

Cheers for all the help again.

Luke
By MichaelN
#91846
Hi Luke,

It would really help if you could post at least partial schematics, as I'm having trouble figuring out exactly what you mean. In particular, I can't figure out how you can use just NPN transistors to drive the transducer directly:
... I will try doing exactly as I am but changing the pic outputs to drive NPN transistors connected to the legs through current limiting resistors so the only difference would be a higher current supply.
As stated before, I don't think the current drive capacity of the PIC outputs is a limiting factor here. It is really the voltage - if you need more range, you either need to drive the transducer with a higher voltage, or change the receiver section. It sounds like you've already got a huge amount of gain, so you probably don't want to increase this further.
By gmarsh
#91848
Assuming your PIC generates 40KHz, feed it into two chips:

- A 74HC04, running off 5V. Use one gate to invert the 40KHz from the PIC, and use the remaining gates to feed 40KHz into a voltage doubler circuit to give you 10V. For a cleaner 10V, make a two-phase voltage doubler using both the non-inverted and inverted 40KHz signals.

- A CD4009 running off 5V VCC, 10V VDD. Parallel up three gates with the PIC 40KHz, and parallel up the other three with the inverted 40KHz. Feed the output of this into your ultrasonic sensor through whatever resistors/capacitors are required.

Total solution should cost less than a buck.