Programmable Square Wave Function Generator 1Hz-150kHz / 0-100% Duty Cycle

(1 customer review)

CAD 5.90

>> Login to see your personal Discounts
>> Please read Important Information

14 in stock

SKU: 26153 Category:


This device is capable of generating square wave signal for experimental development that involves PWM dimming and speed controlling (e.g. motor drivers) as well as other micro controller use. It can be controlled via the Serial Protocol TTL (TXD & RXD pins). It is stable and reliable, and fairly simple to use.

This signal generator is based on a 16MHz, 8-Bit MCU STM8S003F3, and a Holtek HT1621B LC display driver, 4 buttons control frequency and duty cycle. It can also be remote controlled by the serial port (see info below).


Operating Voltage: 3.3 – 30 VDC**

Frequency Range: 1Hz ? 150 KHz

Frequency Accuracy: the accuracy in each range is about 2%

Signal Load Capacity: 5 – 30 mA

Output Amplitude: PWM Amplitude Equal to the Supply Voltage

Operating Temperature: -20 – +70 Celsius

Dimensions: 52 x 32 x 10 mm

Communication Standard:

9600 bps Data bits: 8

Stop bit: 1

Check digit: none

Flow control: none

Serial Communication

1) Setting the frequency of the PWM:

Command “F101”: Set the frequency to 101 HZ (001 to 999)

Command “F1.05”: set the frequency of 1.05 KHZ (1.00 ~ 9.99)

Command “F10.5”: Set the frequency to 10.5KHZ (10.0 ~ 99.9)

Command “F1.0.5”: set the frequency of 105KHZ (1.0.0 ~ 1.5.0)

2) Setting the PWM duty cycle:

DXXX”: set the PWM duty cycle to XXX; (001 ~ 100)

Example: ?D050?, sets the PWM duty cycle is 50%

3) Read the set parameter

Send a “read” string to read the set parameters.

Set successfully return: DOWN.

Setup failed to return: FALL.

**NOTE: Since we can’t confirm the exact type of the LDO voltage regulator on board, we recommend not to operate this device on a voltage of more than 15V DC (we recommend 4V to 15V).

Additional information







1 review for Programmable Square Wave Function Generator 1Hz-150kHz / 0-100% Duty Cycle

  1. m.p (verified owner)

    This square wave generator is ridiculously easy to use – just apply 5V to the Vin+, connect Vin- to ground, and you’ll get a signal out between the PWM and GND pins. Tested on two scopes (one good and old, one bad and new) and they both showed very little (if any) jitter and a consistent voltage out across the range. Maximum that the device will set to is 150kHz.

    If you want to set the frequency and DC faster than tapping and/or holding the buttons on the front, hook a microcontroller or something else with serial out pins to the RX, TX, and GND pins while the generator is being powered through Vin+ and Vin-. Works just like the description says, the display is nice and bright and easy to read, and it’s inexpensive. I don’t know how many 555s, PICs, and Arduinos I’ve used over the years as PWM sources for servos or clocks for various circuits, but having one of these would’ve made things a lot easier…

    Here’s some Arduino code I tinkered with as an example:

    SoftwareSerial generator(10, 9);
    void setup(){
    delay(1000); // Give the generator time after power-on to settle and be ready to go

    void loop(){
    // Send a string that starts with D (to tell generator you want to set DC) and then three digits (5%DC here)

    // If you want to set the generator without having to reprogram the Arduino, create a string that starts with F (to tell generator you want to set frequency) and then concatenate the digits and/or decimal points (to indicate kHz/10s of kHz/100s of kHz) one at a time until you’ve got what you want. In this case, sending 196Hz:
    String sendHz = “F”;
    int digit1 = 1; // Could get digit1/2/3 from anywhere – a button, keypad, serial connection from PC
    int digit2 = 9;
    int digit3 = 6;
    sendHz = concat(String(digit1));
    sendHz = concat(String(digit2));
    sendHz = concat(String(digit3));

Add a review