ArduFgx - Arduino based Function Generator

Arduino based Function Generator

Function generator with tone burst output
L6470 (stepping motor controller)
SD card player
Cascaded LC filter as antialiasing filter
DC-DC converter to support USB buspower

Feastures

Arduino with 20MHz
See optiboot@20MHz
DAC
Microchip MCP4922
PGA
TI PGA2311
Command
Input commnad from serial port with maximum 13 characters
TeraTerm recommended
Sampling Rate
100kHz or 125kHz
Play from SD card
Mono Fs=20kHz 16bit Little Endian binary file
Trigger
Diode protection

Download

ArduFgx Project Page
Use git for the latest version.

GUI

Arduino based Function Generator

GUI for ABR or VsEP
SELECT COM PORT - port selection
For WindowsXP, SP3 with Java 7 processing-2.1.1

Version

WDOSC 60p1 - SD player and motor driver controller
WDOSC 22p1 - Initial figrmware with ABR signal function only The PIN should be set according to the hardware type. For the initial prototype version, WDOSC 23p0LB should be used because the SPI pins and L/R differs from the PCB. The semi-fixed resistance sets the output after LPF to 4Vpp(¡Þ 10%;4kHz).

Examples

There are the continuous mode, the internal triggered mode and the external triggered mode. The initial state is the continuous mode. st command starts and tp command stops. st command is also required in the triggered mode. For numerical parameters, input = and number without space.

Reset

$ reset
. reset

<< Programmable Triggered Function Generator >>
Version: 60p1 Build: Aug 12 2017, 20:26:45
setup(): Initializing...

$
    

60dB attenuator on/off

<< Programmable Triggered Function Generator >>
Version: 60p1 Build: Aug 12 2017, 20:26:45
setup(): Initializing...

$ mo
. mo
*** -60dB att -> ON.  ***
$ mf
. mf
*** -60dB att -> OFF. ***
$
    

Continuous mode 4kHz

<< Programmable Triggered Function Generator >>
Version: 60p1 Build: Aug 12 2017, 20:26:45
setup(): Initializing...

$ status
. status
 [ Current Status ]
 Trigger Mode     : Continuous
 Wave Type        : Sine Wave
 Polarity         : Single Mode
 Time Period      : 10us
 Sampling Rate    : 100kHz
 Tone Frequency   : 1kHz
 Flat duration    : 10ms
 Internal Trigger : 100ms
 PGA Gain [dB]    : 0, 0
$ =4
. =4
Parameter = 4
$ freq
. freq
Frequency = 4kHz (@Fs=100kHz), Updating table ... [Flat][Rise][Fall] done.
 Sampling Rate    : 100kHz
 Tone Frequency   : 4kHz
$ status
. status
 [ Current Status ]
 Trigger Mode     : Continuous
 Wave Type        : Sine Wave
 Polarity         : Single Mode
 Time Period      : 10us
 Sampling Rate    : 100kHz
 Tone Frequency   : 4kHz
 Flat duration    : 10ms
 Internal Trigger : 100ms
 PGA Gain [dB]    : 0, 0
$ st
. st
Trigger : Started.
$
    

External triggered 8kHz rise/fall 1ms flat 3ms

For ABR experiments with alternating output. Fs=100kHz. us specifies the time between samples*2. The sampling rate should be specified before other parameters.

alt
trigext
=20
us
=8
freq
=3
fl
start
    

External triggered mode with alternating mode 31.25kHz rise/fall 1ms flat 2.4ms

Fs=125kHz¡£

alt
trigext
=16
us
=25
freq
=3
fl
start
    

Internal triggered mode

The time of the internal trigger is specified with ms.

<< Programmable Triggered Function Generator >>
Version: 60p1 Build: Aug 12 2017, 20:26:45
setup(): Initializing...

$ =1000
. =1000
Parameter = 1000
$ trig
. trig
Internal Trigger = 1000ms
$ tint
. tint
*** Trigger Mode -> Internal. ***
$ ss
. ss
 [ Current Status ]
 Trigger Mode     : Internal Trigger
 Wave Type        : Sine Wave
 Polarity         : Single Mode
 Time Period      : 10us
 Sampling Rate    : 100kHz
 Tone Frequency   : 1kHz
 Flat duration    : 10ms
 Internal Trigger : 1000ms
 PGA Gain [dB]    : 0, 0
$ st
. st
Trigger : Started.
$
    

PGA2311 gain

<< Programmable Triggered Function Generator >>
Version: 60p1 Build: Aug 12 2017, 20:26:45
setup(): Initializing...

$ ss
. ss
 [ Current Status ]
 Trigger Mode     : Continuous
 Wave Type        : Sine Wave
 Polarity         : Single Mode
 Time Period      : 10us
 Sampling Rate    : 100kHz
 Tone Frequency   : 1kHz
 Flat duration    : 10ms
 Internal Trigger : 100ms
 PGA Gain [dB]    : 0, 0
$ =-10
. =-10
Parameter = -10
$ g1
. g1
 PGA Raw Value    : 172, 192
 PGA Gain [dB]    : -10, 0
$ g2
. g2
 PGA Raw Value    : 172, 172
 PGA Gain [dB]    : -10, -10
$ ss
. ss
 [ Current Status ]
 Trigger Mode     : Continuous
 Wave Type        : Sine Wave
 Polarity         : Single Mode
 Time Period      : 10us
 Sampling Rate    : 100kHz
 Tone Frequency   : 1kHz
 Flat duration    : 10ms
 Internal Trigger : 100ms
 PGA Gain [dB]    : -10, -10
$
    

Output Samples

Tone burst 1k rise/fall 1ms flat 10ms

Arduino based Function Generator Tone Burst

Bipolar pulse

Arduino based Function Generator Bipolar pulse

Single pulse

Arduino based Function Generator Single pulse

Stimulation pulse for vibration excitor

The start of the signal is output on EXT1, whereas the lamp stimulation is output on EXT2, which should be used for the accumulation of the signal.

vp1

Arduino based Function Generator

vp2

Arduino based Function Generator