top of page

写真1 AD9833 DDS MSOP 0.5ピッチ 変換基板に乗せる

 

それはさておき、

 

このチップは10ピンのMSOPで、写真にようにピンセットの先ほどの大きさです。

 

変換基板に取り付けましたが、ピンのピッチは0.5なので、半田付けにはちょっと技術が必要です。

 

まずチップをゲルタイプの瞬間接着剤で正確な位置に仮止めしておきます。

 

フラックスをほんのわずか塗って、すべてのピンにわざとまたがるくらい半田を盛ります。

 

半田吸い取り線で、余分な半田を吸い取って、出来上がり。

 

慣れれば簡単ですが、最初は数個パーにする覚悟がいります(笑)。

 

このDDSは、マスタクロック(MCLK)周波数は最高25MHzで、その場合最高発振周波数(ナイキスト周波数)は12.5MHzとなり、分解能は0.1Hzです。

 

今回は手持ち部品の関係で、20MHzのクリスタルを使用したので、10MHzまでのプログラマブルオシレータとして、実験してみました。この場合の分解能は約0.075Hzです。

mbed DS1820使用の温度計

投稿日 2011/04/28

mbed_ds1820.jpg

DS1820 1wire thermometer ブレッドボードの右端の黒いのがDS1820

 

DS1820は1ワイヤインターフェースで使える温度センサーです。

 

現在はDS18S20やDS18B20等が入手できるようですが、私は数年前に購入したため、DS1820を使用しました。

 

グランドとデータラインの2本線で並列接続でき、距離も延ばせるようなので、温室の数箇所の温度を観測するような場合に便利です。

 

mbedのホームページにDS1820のライブラリがアップされていますので、それを利用し、プログラムも載っていたサンプルコードをほとんどそのまま使用しました。

 

写真のようにS1820により計測した温度と市販のデジタル温度計(時計に付属のもの)の表示を比べてみました。

 

DS1820はとても敏感なようで、指先で頭に触れるとすぐに反応します。

 

DS1820の電源は3.3Vでは動きませんでした。消耗ぎみの電池をつないで抵抗を2.2KΩくらいでOKでした。この抵抗値はスペックでは4.8KΩになっています。

回路図

DS1280をmbedのp19に接続

 

/* This is a thermometer using DS1820. With DS1820 library 
of Michael Hagberg, I just used most of the sample cords.
Please see notebook http://mbed.org/users/jf1vrr/notebook/ds1820-thermometer/.
*/
#include "mbed.h"
#include "TextLCD.h"
#include "DS1820.h"

 

TextLCD lcd(p24, p26, p27, p28, p29, p30);

 

const int MAX_PROBES = 1; //とりあえず1にしたが、16個まで接続可能
DS1820* probe[MAX_PROBES];

 

int main() {
int i;
int devices_found=0;
// Initialize the probe array to DS1820 objects
for (i = 0; i < MAX_PROBES; i++)

probe[i] = new DS1820(p19);

// Initialize global state variables
probe[0]->search_ROM_setup();
// Loop to find all devices on the data line
while (probe[devices_found]->search_ROM() and devices_found<MAX_PROBES-1)

devices_found++;

// If maximum number of probes are found, 
// bump the counter to include the last array entry
if (probe[devices_found]->ROM[0] != 0xFF)

devices_found++;
 

lcd.cls();
if (devices_found==0)

lcd.printf("No devices found" );

else {
lcd.printf("DS1820 Thermo" );
while (true) {
probe[0]->convert_temperature(DS1820::all_devices);
lcd.locate(0,1);
for (i=0; i<devices_found; i++) {

lcd.printf("%4.1fc",probe[i]->temperature('c'));

}
}
}
}


 

http://mbed.org/users/jf1vrr/programs/DS1820_thermometer/lqd786



 

(JF1VRR)

mbed_ds1820_kairozu.jpg
bottom of page