How to generate 26kHz square wave signal?

A shrunk down Leonardo-compatible board, thumb drive sized with native USB support. [Product info]
Post Reply
SacredYH
Posts: 2
Joined: Thu Jun 20, 2013 5:00 am

How to generate 26kHz square wave signal?

Post by SacredYH » Thu Jun 20, 2013 5:12 am

Hi.

I just bought Leostick for controlling MZB1001 which is a small piezoelectric air blower. According to the the datasheet of this air blower, I need to make 10~20 Vpp with around 26 Khz square wave signal. Although they describe simple circuit to make this signal using LM7321MA, I would like to control without other components using Leostick.

When I check the Arduino forum, I could find some posts about how to generate square wave, but most of them didn't work because of low voltage.

Is anyone have good idea to make this signal using only Leostick? I mean I can use several resistors and capacitors.. but I do not want to use specific IC chips such as 555IC timers.



This is the datasheet of the MZB1001 micro air blower.

http://www.mouser.com/ds/2/281/MZB1001T ... 202918.pdf

Actually, I tried to make this reference circuit, but I cannot make it because of all of these recommended components are SMD type.. And I cannot control this blower when I use usual type of resister (0.5W) and PN100, PN200 transitors..

One more question is that Is it okey to use any NPN and PNP which has 500mA IC to make this reference circuit?

angusgr
Freetronics Staff
Freetronics Staff
Posts: 853
Joined: Tue Apr 09, 2013 11:19 pm
Location: Melbourne, Australia
Contact:

Re: How to generate 26kHz square wave signal?

Post by angusgr » Fri Jun 21, 2013 1:49 am

SacredYH wrote:Hi.

I just bought Leostick for controlling MZB1001 which is a small piezoelectric air blower. According to the the datasheet of this air blower, I need to make 10~20 Vpp with around 26 Khz square wave signal. Although they describe simple circuit to make this signal using LM7321MA, I would like to control without other components using Leostick.

When I check the Arduino forum, I could find some posts about how to generate square wave, but most of them didn't work because of low voltage.
I'm not familiar with the air blower device you're using, but I believe you can do this with just a MOSFET (probably almost any N-channel FET where the gate voltage VGS(On) is 5V or less) and the LeoStick, with no other components.

A Freetronics NDRIVE MOSFET module would be perfect:
http://www.freetronics.com/products/n-m ... cOw6BX8PRY

Wire it up as shown here, your air blower goes where "M" the motor is:
http://www.hobbytronics.co.uk/arduino-tutorial9-power

Connect the "gate" of the MOSFET to a pin on the LeoStick and use the Arduino tone() function to make a 26kHz tone (you should have a LeoStick V2 if you just bought it so this should be simple, if by some chance you have a V1 there are some issues with tone() so you may need to update the LeoStick or create the 26kHz a different way.)

I can't guarantee that will work, but I expect it will.
This is the datasheet of the MZB1001 micro air blower.

http://www.mouser.com/ds/2/281/MZB1001T ... 202918.pdf

Actually, I tried to make this reference circuit, but I cannot make it because of all of these recommended components are SMD type.. And I cannot control this blower when I use usual type of resister (0.5W) and PN100, PN200 transitors..

One more question is that Is it okey to use any NPN and PNP which has 500mA IC to make this reference circuit?
The short answer is "probably". However because you have the LeoStick you don't really need to create an analog oscillator circuit like this, just find a suitable driver FET and use the LeoStick to generate the target frequency.

- Angus

SacredYH
Posts: 2
Joined: Thu Jun 20, 2013 5:00 am

Re: How to generate 26kHz square wave signal?

Post by SacredYH » Mon Jun 24, 2013 2:55 am

Thanks for your reply.

I went to Jay car on last Saturday, and bought a MOSFET shield.

And then I tried to drive after wire it up.

D3 ------------------------------- G pin
GND ----------------------------- S pin
one motor Pin ------------------ D pin

9V battery + --------------------- another motor pin
9V battery - ---------------------- GND

after then I uploaded a simple sketch to test.

----------------------------------
void setup() {
}

void loop() {
tone(3, 26000);
}
------------------------------------

but it doesn't work.. I can hear very small sound from piezoelectric motor.
is there any problem in my sketch or wiring?


Actually, when I use toneAC library, it almost work without any extra device, but slightly insufficient voltage..

Now I'm looking for the method to amplify this signal..

anyway thanks/.

angusgr
Freetronics Staff
Freetronics Staff
Posts: 853
Joined: Tue Apr 09, 2013 11:19 pm
Location: Melbourne, Australia
Contact:

Re: How to generate 26kHz square wave signal?

Post by angusgr » Mon Jun 24, 2013 6:29 am

Your circuit and your code look good. Although with the code I would move the tone() call from inside the loop() method up to inside the setup() method, so it's only called once - after you call it then the tone continues playing until you call noTone(). It's possible starting the tone over and over again is actually preventing it from playing properly.

Second thing is that 9V may not be enough - the datasheet says 10-20 V peak to peak. Maybe look for a 12V battery, or put two 9V batteries in series for 18V?

Post Reply