论坛风格切换切换到宽版
  • 11986阅读
  • 77回复

DIY的小电台问题 [复制链接]

上一主题 下一主题
离线lxy
发帖
1993
只看该作者 60楼 发表于: 2018-01-26
直接配有源晶振,简单,稳妥
地址:四川成都市
离线lxy
发帖
1993
只看该作者 61楼 发表于: 2018-01-26
用两脚晶振的话若是匹配电容不合适,即便起震,频率也会有误差
地址:四川成都市
在线bg2kaj
发帖
1226
只看该作者 62楼 发表于: 2018-01-26
看了看,我挺好奇的,SI5351是不需要外部搭成完整的振荡器电路的,不知道为什么还要加三极管,直接晶振和电容就可以了。还有你的程序有没有问题
=BG2KAJ C类 KG2KAJ Amateur Extra JJ1RRS 二アマ=
=  业  余  无  线  电  考  操  作  证  爱  好  者  =

WAPC&WAJA达成了!奔向JCC和JA FM DX……
我写过的关于业余无线电的文章汇总:bg2kaj.cn
离线BG8GFY
发帖
118
只看该作者 63楼 发表于: 2018-01-26
振了,大约0.2Vp-p。
谢谢BD4LB,谢谢大家



本主题包含附件,请 登录 后查看, 或者 注册 成为会员
QQ807087233
13896060783
离线BG8GFY
发帖
118
只看该作者 64楼 发表于: 2018-01-26
回 bg2kaj 的帖子
bg2kaj:看了看,我挺好奇的,SI5351是不需要外部搭成完整的振荡器电路的,不知道为什么还要加三极管,直接晶振和电容就可以了。还有你的程序有没有问题 (2018-01-26 16:54) 

我的si5351和我的振荡电路一个毛病,低频的晶体放上去就振,25和27兆的晶体,放上去就是不振,刚才有个朋友,bg8gcz说震了,但是测量的时候ke可能造成了不振。
QQ807087233
13896060783
离线bd4ru
发帖
1318
只看该作者 65楼 发表于: 2018-01-26
楼主独石电容做晶振电路不太好,cc4瓷片电容更好
离线BG8GFY
发帖
118
只看该作者 66楼 发表于: 2018-01-26
经过测量确认了,bg8gcz的说法。实际上si5351已经震了,当我用示波器探头X1挡去测试就测不到振荡波形, 用X10就可以测到了,以前一直没注意这一点。
根据bd4lb的电路图做的,也是这样的结果,都是因为我示波器的探头的原因。
[ 此帖被BG8GFY在2018-01-26 22:18重新编辑 ]
QQ807087233
13896060783
在线bg2kaj
发帖
1226
只看该作者 67楼 发表于: 2018-01-26
回 BG8GFY 的帖子
BG8GFY:我的si5351和我的振荡电路一个毛病,低频的晶体放上去就振,25和27兆的晶体,放上去就是不振,刚才有个朋友,bg8gcz说震了,但是测量的时候ke可能造成了不振。 (2018-01-26 18:07) 

还是不懂你的意思,你的SI5351电路有电路原理图么?发出来看看?
=BG2KAJ C类 KG2KAJ Amateur Extra JJ1RRS 二アマ=
=  业  余  无  线  电  考  操  作  证  爱  好  者  =

WAPC&WAJA达成了!奔向JCC和JA FM DX……
我写过的关于业余无线电的文章汇总:bg2kaj.cn
在线bd4lb
发帖
3091
只看该作者 68楼 发表于: 2018-01-26
楼主好!
看到您搞明白了,我更高兴!
用频率计测量这种振荡电路的频率,一般不能用探针接触元件。很可能停振的。
把探针靠近元件就可以了。
要作为收发信机的本振电路,还要在发射极串联104电容和1K的电阻,单独输出。
输出端可以用探针直接测量。
73!
离线BG8GFY
发帖
118
只看该作者 69楼 发表于: 2018-01-26
回 bg2kaj 的帖子
bg2kaj:
还是不懂你的意思,你的SI5351电路有电路原理图么?发出来看看?



本主题包含附件,请 登录 后查看, 或者 注册 成为会员
QQ807087233
13896060783
离线ba2ba
发帖
961
只看该作者 70楼 发表于: 2018-01-27
si5351我的应用电路中,C1,C2我也没有用,测量时,只能用频率计的探针测量晶体的某个脚(具体那个忘了),频率计的地接芯片地(目标板地),没有任何问题的。
[ 此帖被ba2ba在2018-01-27 08:18重新编辑 ]
地址:黑龙江省伊春市伊美区美溪镇新兴小区12号楼一单元201室
姓名:陈铁石/BA2BA
邮编:153021
电话:18804585572
QQ:464826156
离线BG8GFY
发帖
118
只看该作者 71楼 发表于: 2018-06-29
回复评分新鲜事举报
在线 BG8GFY


#include "si5351a.h"

int main(void)
{
    si5351aSetFrequency(10000000);

    return 0;
}
QQ807087233
13896060783
回复评分新鲜事举报
在线 BG8GFY

注册用户
发帖112
只看该作者 23楼  发表于: 2018-06-29 , 编辑
/
// Author: Hans Summers, 2015
// Website: http://www.hanssummers.com
//
// A very very simple Si5351a demonstration
// using the Si5351a module kit http://www.hanssummers.com/synth
// Please also refer to SiLabs AN619 which describes all the registers to use
//
#include <inttypes.h>
#include "i2cmaster.h"
#include "si5351a.h"

#define I2C_WRITE 0b11000000        // I2C address for writing to the Si5351A
#define I2C_READ  0b11000001        // I2C address for reading to the Si5351A

uint8_t i2cSendRegister(uint8_t reg, uint8_t data)
{
    uint8_t stts;

    i2c_start_wait(I2C_WRITE);

    stts = i2c_write(reg);
    if (stts) return 3;

    stts = i2c_write(data);
    if (stts) return 4;

    i2c_stop();    

    return 0;
}

uint8_t i2cReadRegister(uint8_t reg, uint8_t *data)
{
    uint8_t stts;

    i2c_start_wait(I2C_WRITE);

    stts = i2c_write(reg);
    if (stts) return 3;

    stts = i2c_rep_start(I2C_READ);
    if (stts) return 4;

    *data = i2c_readNak();

    i2c_stop();    

    return 0;
}

//
// Set up specified PLL with mult, num and denom
// mult is 15..90
// num is 0..1,048,575 (0xFFFFF)
// denom is 0..1,048,575 (0xFFFFF)
//
void setupPLL(uint8_t pll, uint8_t mult, uint32_t num, uint32_t denom)
{
    uint32_t P1;                    // PLL config register P1
    uint32_t P2;                    // PLL config register P2
    uint32_t P3;                    // PLL config register P3

    P1 = (uint32_t)(128 * ((float)num / (float)denom));
    P1 = (uint32_t)(128 * (uint32_t)(mult) + P1 - 512);
    P2 = (uint32_t)(128 * ((float)num / (float)denom));
    P2 = (uint32_t)(128 * num - denom * P2);
    P3 = denom;

    i2cSendRegister(pll + 0, (P3 & 0x0000FF00) >> 8);
    i2cSendRegister(pll + 1, (P3 & 0x000000FF));
    i2cSendRegister(pll + 2, (P1 & 0x00030000) >> 16);
    i2cSendRegister(pll + 3, (P1 & 0x0000FF00) >> 8);
    i2cSendRegister(pll + 4, (P1 & 0x000000FF));
    i2cSendRegister(pll + 5, ((P3 & 0x000F0000) >> 12) | ((P2 & 0x000F0000) >> 16));
    i2cSendRegister(pll + 6, (P2 & 0x0000FF00) >> 8);
    i2cSendRegister(pll + 7, (P2 & 0x000000FF));
}

//
// Set up MultiSynth with integer divider and R divider
// R divider is the bit value which is OR'ed onto the appropriate register, it is a #define in si5351a.h
//
void setupMultisynth(uint8_t synth, uint32_t divider, uint8_t rDiv)
{
    uint32_t P1;                    // Synth config register P1
    uint32_t P2;                    // Synth config register P2
    uint32_t P3;                    // Synth config register P3

    P1 = 128 * divider - 512;
    P2 = 0;                            // P2 = 0, P3 = 1 forces an integer value for the divider
    P3 = 1;

    i2cSendRegister(synth + 0,   (P3 & 0x0000FF00) >> 8);
    i2cSendRegister(synth + 1,   (P3 & 0x000000FF));
    i2cSendRegister(synth + 2,   ((P1 & 0x00030000) >> 16) | rDiv);
    i2cSendRegister(synth + 3,   (P1 & 0x0000FF00) >> 8);
    i2cSendRegister(synth + 4,   (P1 & 0x000000FF));
    i2cSendRegister(synth + 5,   ((P3 & 0x000F0000) >> 12) | ((P2 & 0x000F0000) >> 16));
    i2cSendRegister(synth + 6,   (P2 & 0x0000FF00) >> 8);
    i2cSendRegister(synth + 7,   (P2 & 0x000000FF));
}

//
// Switches off Si5351a output
// Example: si5351aOutputOff(SI_CLK0_CONTROL);
// will switch off output CLK0
//
void si5351aOutputOff(uint8_t clk)
{
    i2c_init();
    
    i2cSendRegister(clk, 0x80);        // Refer to SiLabs AN619 to see bit values - 0x80 turns off the output stage

    i2c_exit();
}

//
// Set CLK0 output ON and to the specified frequency
// Frequency is in the range 1MHz to 150MHz
// Example: si5351aSetFrequency(10000000);
// will set output CLK0 to 10MHz
//
// This example sets up PLL A
// and MultiSynth 0
// and produces the output on CLK0
//
void si5351aSetFrequency(uint32_t frequency)
{
    uint32_t pllFreq;
    uint32_t xtalFreq = XTAL_FREQ;
    uint32_t l;
    float f;
    uint8_t mult;
    uint32_t num;
    uint32_t denom;
    uint32_t divider;

    i2c_init();                        // Initialise the I2C

    divider = 900000000 / frequency;// Calculate the division ratio. 900,000,000 is the maximum internal
                                    // PLL frequency: 900MHz
    if (divider % 2) divider--;        // Ensure an even integer division ratio

    pllFreq = divider * frequency;    // Calculate the pllFrequency: the divider * desired output frequency

    mult = pllFreq / xtalFreq;        // Determine the multiplier to get to the required pllFrequency
    l = pllFreq % xtalFreq;            // It has three parts:
    f = l;                            // mult is an integer that must be in the range 15..90
    f *= 1048575;                    // num and denom are the fractional parts, the numerator and denominator
    f /= xtalFreq;                    // each is 20 bits (range 0..1048575)
    num = f;                        // the actual multiplier is  mult + num / denom
    denom = 1048575;                // For simplicity we set the denominator to the maximum 1048575

                                    // Set up PLL A with the calculated multiplication ratio
    setupPLL(SI_SYNTH_PLL_A, mult, num, denom);
                                    // Set up MultiSynth divider 0, with the calculated divider.
                                    // The final R division stage can divide by a power of two, from 1..128.
                                    // reprented by constants SI_R_DIV1 to SI_R_DIV128 (see si5351a.h header file)
                                    // If you want to output frequencies below 1MHz, you have to use the
                                    // final R division stage
    setupMultisynth(SI_SYNTH_MS_0, divider, SI_R_DIV_1);
                                    // Reset the PLL. This causes a glitch in the output. For small changes to
                                    // the parameters, you don't need to reset the PLL, and there is no glitch
    i2cSendRegister(SI_PLL_RESET, 0xA0);    
                                    // Finally switch on the CLK0 output (0x4F)
                                    // and set the MultiSynth0 input to be PLL A
    i2cSendRegister(SI_CLK0_CONTROL, 0x4F | SI_CLK_SRC_PLL_A);

    i2c_exit();                        // Exit I2C
}
QQ807087233
13896060783
回复评分新鲜事举报
在线 BG8GFY

注册用户
发帖113
只看该作者 24楼  发表于: 2018-06-29 , 编辑
#ifndef SI5351A_H
#define SI5351A_H

#include <inttypes.h>

#define SI_CLK0_CONTROL    16            // Register definitions
#define SI_CLK1_CONTROL    17
#define SI_CLK2_CONTROL    18
#define SI_SYNTH_PLL_A    26
#define SI_SYNTH_PLL_B    34
#define SI_SYNTH_MS_0        42
#define SI_SYNTH_MS_1        50
#define SI_SYNTH_MS_2        58
#define SI_PLL_RESET        177

#define SI_R_DIV_1        0b00000000            // R-division ratio definitions
#define SI_R_DIV_2        0b00010000
#define SI_R_DIV_4        0b00100000
#define SI_R_DIV_8        0b00110000
#define SI_R_DIV_16        0b01000000
#define SI_R_DIV_32        0b01010000
#define SI_R_DIV_64        0b01100000
#define SI_R_DIV_128        0b01110000

#define SI_CLK_SRC_PLL_A    0b00000000
#define SI_CLK_SRC_PLL_B    0b00100000

#define XTAL_FREQ    27000000            // Crystal frequency

void si5351aOutputOff(uint8_t clk);
void si5351aSetFrequency(uint32_t frequency);

#endif //SI5351A_H
QQ807087233
13896060783
回复评分新鲜事举报
在线 BG8GFY

注册用户
发帖114
只看该作者 25楼  发表于: 2018-06-29 , 编辑
上面的程序,希望对你有用。我就是用的这个程序改的。
QQ807087233
13896060783
回复评分新鲜事举报
在线 BG8GFY

注册用户
发帖115
只看该作者 26楼  发表于: 2018-06-29 , 编辑
根据你的硬件,把下面这两个程序改一下就行了。
uint8_t i2cSendRegister

uint8_t i2cReadRegister
QQ807087233
13896060783
离线BG8GFY
发帖
118
只看该作者 72楼 发表于: 2018-06-29
si5351输出的是方波,谐波丰富
QQ807087233
13896060783
离线bd4igh
发帖
4250
只看该作者 73楼 发表于: 2018-07-02
王安林
山东.日照
曾用呼号BG6AG
安徽境内首个业余台
QQ:317311229
手机:13376330683
Email  :wal 696@163.com.
离线bi8akt
发帖
196
只看该作者 74楼 发表于: 2018-07-04
回 BG8GFY 的帖子
BG8GFY:si5351输出的是方波,谐波丰富 (2018-06-29 02:04)

昨晚我也做了个si5351,用的25M普通晶振,直接就起振了,(我直接用示波器探的时钟输出端),我的输出方波不像方波,用一级lc中周滤波后波形非常不错。
使用的arduino 程序。下一步也在找合适的电路,准备diy个小电台玩。
[ 此帖被bi8akt在2018-07-04 13:06重新编辑 ]
离线BA6BF
发帖
16968
只看该作者 75楼 发表于: 2018-07-06
5351输出最好不要直接用,需要做一级轻耦合的射级输出器做缓冲隔离。否则负载变化大的时候,会导致PLL工作不正常。
EX:BG6-1-045 BH6HYW BG6BF BD6BF

有志气者不会甘居下游,有见识者不敢自满自足,有恒心者则断无不成之事。

https://shop36305010.taobao.com/

13九6537779三
离线RENKE
发帖
332
只看该作者 76楼 发表于: 2018-07-09
这个DIY帖子第一次看见,其实这样的呼声或观点,在这里多次出现;我也很感兴趣。
记得1964年参观缴获的特务电台,其发射机不管大的还是小的,无非是两个电子管。大的还有个晶体,小的就只有一个线圈。至于电键,也就是大指甲盖那么大。那个接收机呢,也就是一个很普通的八晶体管机,比一般收音机性能也好不了那里去。后来报纸登过,那个有两只6V6加五个小零件的简单电台,配合巴掌大的简易接收机,沟通了新疆天山到台湾联络。那个小的,折叠起来也就是一本书那么大。既然在山东地区缴获,就是说这个除两只指姆电子管,再加上一个小线圈三个电阻电容器的小玩意,也可以从山东联通到台湾。当时看过里面构造,感觉比矿石机复杂不了哪里去。
开心就好!
离线bg5upv
发帖
154
只看该作者 77楼 发表于: 2018-07-09
E- mail:bg5upv@gmail.com
微波有源电路、测控分系统
目前从事高精度定位导航应用行业
F7A + IC-751A + TH-42A