Difference between revisions of "BG7TBL"
Jump to navigation
Jump to search
(→Protocol: + sample code to check the firmware (4 Python lines)) |
(→Setting frequency: + prog. example in Python) |
||
Line 64: | Line 64: | ||
* 400 000 000 / 10 | * 400 000 000 / 10 | ||
* f040000000 | * f040000000 | ||
<pre> | |||
#!/usr/bin/python | |||
import sys, serial | |||
ser = serial.Serial('/dev/ttyUSB0', 57600, timeout=1) # Linux first FTDI | |||
# sys.argv[1] is frequency in Herz | |||
cmd = "\x8f" + "f" + '{:09d}'.format(int(sys.argv[1])/10) | |||
ser.write(cmd) | |||
</pre> | |||
=== Spectrum analyzer === | === Spectrum analyzer === |
Revision as of 09:41, 20 May 2018
Status | planned |
---|---|
Frequency (user) | 138MHz-4.4GHz |
Waveforms | sine (fixed) |
Amplitude | ? V |
Connectivity | USB |
The BG7TBL USB RF Signal Generator is a PC-based function generator. It has no external controls, requiring a USB connection to a computer.
Software to run this hardware can be found here http://www.dl4jal.eu/.
This device can be bought on ebay for ca $65. Search for "138MHz-4.4GHz". There is a version with the ADF4351 instead that will give you more range (35MHz-4.4GHz).
Hardware
- Microcontroller: Atmel Atmega 8L
- Wideband Synthesizer: ADF4350
- USB to Serial: FTDI FT232RL
- Logarithmic Amplifier AD8307
- Mixer: IAM 81008
- LDO: AMS1117
Photos
Protocol
Baud 57600, 8n1
The protocol is binary serial based.
Query firmware
- Send 0x8f+"v"
The answer should be in hex:
- 77
Where the returned byte is the firmware version, 0x77 = 119 = 'w'.
#!/usr/bin/python import serial ser = serial.Serial('/dev/ttyUSB0', 57600, timeout=1) # Linux first FTDI ser.write("\x8f" + "v") print("version is " + ser.read())
Signal generator
Setting frequency
To set a frequency send:
- 0x8f
Then f and then the frequency divided by 10 with leading zeroes. For example this is the payload for 400MHz.
- 400 000 000 / 10
- f040000000
#!/usr/bin/python import sys, serial ser = serial.Serial('/dev/ttyUSB0', 57600, timeout=1) # Linux first FTDI # sys.argv[1] is frequency in Herz cmd = "\x8f" + "f" + '{:09d}'.format(int(sys.argv[1])/10) ser.write(cmd)
Spectrum analyzer
The protocol is briefly described in the source code here: