Making a customized frequency generator for a medical device

Project Info


Our company was requested to make a customize signal generator with some special requirements. The device was part of a medical device and was to be used for a research application. The device included two coil cards. The frequency generator board was to products a modulated signal that was fed to a coil card and received by a second coil card according to the following graph.

coil card


The board had followings requirements:

  1. Function/frequency generator 1: This was for a carrier sine wave. It needed to generate sine waves from 1Hz to 20 MHz. This signal generator needed to be programmable to an accuracy of 1Hz.
  2. Function/frequency generator 2: This part was used for the signal. It needed to generate sine, square and triangle waves from 0.01Hz to 1 MHz. The signal part also was to be programmable to the accuracy of 0.01Hz.
  3. Mono audio channel: Played from the stored 4GB SD card. This would be stored in WAV lossless format.
  4. All three signals were to be modulated (or combined) together and generate a single output.
  5. The input control and data information were provided through a Bluetooth connection and the information was stored in an SD card.
  6. The PCB board needed to be powered using a USB rechargeable NDS Lite 2000mAh battery
  7. This subsystem needed to support the following programmable features using the microcontroller.
    1. Play/Stop audio
    2. Optional: Amplitude or voltage i.e. 0.25V to 3V tuning
    3. Different modulated output by mixing of the three signals
  8. Regarding the MCU, a low-power microcontroller was to be used which would communicate and program all the hardware sub-systems.
  9. The programming API could be in any way convenient for the hardware development so that the firmware could be developed accordingly to generate the appropriate audio signal.
  10. The ideal size of the board was 4cm x 10cm and it was not to be bigger than 10 cm x 10 cm


  1. Lack of EMI that could happen due to the small size of the board.
  2. Cost-effective for the production stage


Among different microcontroller options, the final solution was based on using an STM32F103XC. This MCU has many good features including low power consumption, flexibility, and ease of programming, up to 9 communication interfaces, … among many others that made it adequate for the design. Some of the other main components and their functionalities included the followings:

  • AD9850BRS: For Creating frequencies up to 20 MHz with 1Hz step and amplitude 0.5-3V
  • AD9833BRM IC WAVEFORM GEN: For reaching up to 1MHz with steps 0.01Hz and amplitude of 0.25-3V
  • nRF8001 QFN-32RV/5x5x0.5 IC RF TXRX BLUETOOTH: For receiving the input control and data information
  • FS8205A TSSOP-8 Power MOSFET; It is a dual N-Channel enhancement mode power MOSFET
  • TS4871SO-8 MSOP-8: It is an Audio Power Amplifier capable of delivering 1W of continuous RMS Output Power into 8 loads @ 5V. This component was used to amplify the audio signal.

After two iterations of the prototyping, the final solution was successfully tested and it worked according to the given requirements and without any EMI problems.

According to the given requirement, the PCB received commands and data using Bluetooth (Low-Energy) subsystem and the Bluetooth connectivity was mainly used for controlling commands and data. To reduce the power consumption, a switch was implemented in the PCB to switch-off/switch-on the Bluetooth connectivity when needed.


The final prototype took about 6 months to get completed and was submitted to the client to be used in the main design. The final design also included different modulation options. The modulation subsystem combined the output from the three frequency generators and output the final output from the PCB. This subsystem could support these programming features:
• Modulate only Frequency Gen1
• Modulate only Frequency Gen2
• Modulate only Audio Gen
• Modulate only Frequency Gen1 + Frequency Gen2
• Modulate only Frequency Gen1 + Audio Gen
• Modulate only Frequency Gen1 + Frequency Gen2 + Audio Gen

D. Johnson
February 8, 2019
Electrical and Electronic Engineering