Search
2020年4月8日 星期三
MSP430G2 Geiger Counter and True Random Number Generator(TRNG)
清個庫存把MSP430G2433消耗掉做個蓋格計數器跟物理亂數產生器,如果有核種可以找露營燈紗(瓦斯燈芯, 汽化燈燈芯)含釷的可以加快亂數產生,製作時如果電錶調整到1000VDC檔位內阻在10M(查文件)則調整VR1測量蓋格管的電壓為250v實際電壓就大概是400v了,我測試J321βγ和M4011沒問題,但這兩個管子拿強光手電筒照會有Event做輻射測量需要防光,相關資訊都在下面連結。
2019年11月25日 星期一
ESP32-CAM MJPEG Stream Decoder and Control Library
半年前在做自己的Computer Vision Board採買材料時,無意間知道ESP32-CAM這東西,買來放一段時間後,上週末有空拿出來測試這東西挺讓我驚艷,相見恨晚,主要是150NTD的價格加上已經有現成的Arduino相容範例,直接搞定SCCB設定跟DCMI Data還有一個4M PSRAM作為Frame Buffer,收到的MJPEG Stream在 UXGA 1600x1200解析度可以約10FPS每個JPEG 100Kb左右。
就整體來說這東西在Wi-Fi環境感覺上非常具有淺力,一些多Camera Computer Vision的應用可以配合Raspberry Pi運算,或者簡單的Robot需要Computer Vision然後輔以別的控制器以UART通訊控制(GPIO扣掉SCCB+DCMI和SDIO只剩UART...)都是不錯的選擇。
我把wxRovio的軟體改一改後主要是抽出C/C++ MJPEG Stream decode,還有示範POST參數給ESP32-CAM修改解析度,基本上相依OpenCV和libcurl,在Github有用OpenCV GUI和wxWidgets GUI的範例,後者順便放YOLO V3和OpenPose的DNN應用,Library在MAC和Win10+VS2017編譯x64版本都可以通過。
2019年11月9日 星期六
Atrial Fibrillation Detection Blood Pressure Monitor Oscillometric Method
This project is electronic blood pressure monitor research platform with Oscillometric method, include SBP and DBP estimate algorithm, Atrial Fibrillation detection algorithm, calibration curve, GUI tool for fine-tune BP algorithm...etc, ofcourse, this is research use only.
2019年9月29日 星期日
Enable STM32F4 FPU
1. ./Libraries/CMSIS/Device/ST/STM32F4xx/Include/stm32f4.h -> add
#include <arm_math.h>
2. ./system_stm32f4xx.c -> in "void SystemInit(void)" add
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
SCB->CPACR |= ((3UL <<10*2)|(3UL <<11*2));/* set CP10 and CP11 Full Access */
#endif
3.main.c add
#define __FPU_PRESENT
#define __FPU_USED
#include <arm_math.h>
2. ./system_stm32f4xx.c -> in "void SystemInit(void)" add
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
SCB->CPACR |= ((3UL <<10*2)|(3UL <<11*2));/* set CP10 and CP11 Full Access */
#endif
3.main.c add
#define __FPU_PRESENT
#define __FPU_USED
wxECGAnalyzer - cross platform ECG signal process tool
Detection of abnormal rhythm morphologies is more difficult than normal beat, therefore, we need to collect abnormal rhythm signals in clinical practice to improve the detection of QRS-complex.
This project is for Electrocardiogram(ECG) signal algorithms design and validation, include preprocessing, QRS-Complex detection, embedded system validation, ECG segmentation, label your machine learning dataset, and clinical trial...etc.
For algorithm performance, in ANSI/AAMI EC38,it is required that the detected QRS shall in the 150ms range of the signed point from annotation by human exper.
目前僅用MIT-BIH等標準心律不整資料庫或是生理訊號挑戰賽提供的標註資料,理論上很難得到超越其標注的學習模型,實務上還是需要配合其他臨床實驗搜集更多案例強化模型,下個To-Do會用標準資料庫訓練分類模型增加基本的自動化標註,目前僅針對臨床實時運行的特殊案例配合人工選擇QRS-Complex演算法自動切片。
This project is for Electrocardiogram(ECG) signal algorithms design and validation, include preprocessing, QRS-Complex detection, embedded system validation, ECG segmentation, label your machine learning dataset, and clinical trial...etc.
For algorithm performance, in ANSI/AAMI EC38,it is required that the detected QRS shall in the 150ms range of the signed point from annotation by human exper.
目前僅用MIT-BIH等標準心律不整資料庫或是生理訊號挑戰賽提供的標註資料,理論上很難得到超越其標注的學習模型,實務上還是需要配合其他臨床實驗搜集更多案例強化模型,下個To-Do會用標準資料庫訓練分類模型增加基本的自動化標註,目前僅針對臨床實時運行的特殊案例配合人工選擇QRS-Complex演算法自動切片。
2019年7月21日 星期日
Cross-Platform Serial Port Library
This is cross-platform(build passing High-Sierra and Win10) serial port library written in C++ , and for demo application wxTerm.
SerialPortLibrary in more detail : Github
2019年6月21日 星期五
2019年1月13日 星期日
STM32F4 PCA9685 Driver For Servo Motor
In this case, period 0.5ms~2.5ms, and maximum angle 180 ,if SetPWNFreq = 50Hz, 1000ms/50 = 20ms
2018年12月20日 星期四
Pulse Oximeter with MAX3010X
在同一波長下針對Hb和HbO2的吸收(extinction coefficient or absorption coefficient)有差異,而如果要求SPo2量測兩個不同波長的吸收就可以求解一個未知數。
因為光對於動脈微血管血液的變化(隨著心率)會有交流訊號,而其他的組織(吸收散射反射)則是直流成分,因此將兩波長反射量變化正規化後的結果作為R-Ration(SPo2為非線性),利用經驗公式A, B係數可得一SPo2曲線,例如660nm/940nm = 1, SPo2 = 85%,例如A - B = 110 - 25 斜率。
具體實現只要動態的將直流成分除去,並且將兩波長光直流水平控制在一範圍(SPo2都有類似PGA的功能),得到的兩波長交流訊號RMS比值即可推算SPo2。
以下Github包含STM32F4 Driver for MAX30100(移植Reference 1.範例),和MAC OS X上的C++ wxWidgets GUI(左下角顯示SPo2)可透過VCP與STM32F4通訊,當然除了此方法使用更多的波長可以使SPo2求解聯立方程更加準確,並且實務上會做更高精度的SPo2曲線的建立以及motion artifact除去等。
因為光對於動脈微血管血液的變化(隨著心率)會有交流訊號,而其他的組織(吸收散射反射)則是直流成分,因此將兩波長反射量變化正規化後的結果作為R-Ration(SPo2為非線性),利用經驗公式A, B係數可得一SPo2曲線,例如660nm/940nm = 1, SPo2 = 85%,例如A - B = 110 - 25 斜率。
具體實現只要動態的將直流成分除去,並且將兩波長光直流水平控制在一範圍(SPo2都有類似PGA的功能),得到的兩波長交流訊號RMS比值即可推算SPo2。
Download :
Demo :
Reference :
1. https://morf.lv/implementing-pulse-oximeter-using-max30100
2. http://www.ti.com/lit/an/slaa274b/slaa274b.pdf
3. http://www.ti.com/lit/ug/tidu542/tidu542.pdf
4. http://sam-koblenski.blogspot.com/2015/11/everyday-dsp-for-programmers-dc-and.html
2018年10月4日 星期四
Continuous Non Invasive Blood Pressure Research Platform (ECG and PPG) Pulse Arrival Time Based
This project is cuffless cNIBP research platform with ECG(two-electrode) and PPG
In cuffless non-invasive blood pressure monitor field, we with the accurate calibration of PAT to BP, beat-to-beat BP can be estimated from PAT. On the basis of the theoretical relationship between PAT and BP and their experimental or empirical relationship, various models that correlate PAT with BP have been established.
PAT and BP with Regression:
In cuffless non-invasive blood pressure monitor field, we with the accurate calibration of PAT to BP, beat-to-beat BP can be estimated from PAT. On the basis of the theoretical relationship between PAT and BP and their experimental or empirical relationship, various models that correlate PAT with BP have been established.
PAT and BP with Regression:
Pulse transit time (PTT) is the time it takes for the pressure or flow wave to propagate between two arterial sites. PTT measured as the time delay between invasive proximal and distal blood pressure or flow, and PTT(propagate time) can be converted to Pulse Wave Velocity(PWV is speed unit).
the most used is the R-wave(QRS Complex) in the electrocardiogram (ECG) and combine pulsemeter(piezo or PPG), leading to the so called pulse arrival time (PAT). PAT is not exactly the PTT, as it includes the time interval between ventricular depolarization and the opening of the aortic valve which is known as pre-ejection period (PEP) and it varies beat-to-beat.
Most efforts have employed the time delay between ECG and finger photoplethysmography (PPG) waveforms as a convenient surrogate of PTT.
However, these conventional pulse arrival time (PAT) measurements include the pre-ejection period (PEP) and the time delay through small, muscular arteries and may thus be an unreliable marker of BP.
Shortcoming is that PAT includes the pre-ejection period (PEP) in addition to PTT. Since the PEP component depends on the electromechanical functioning of the heart, it can change independently of PTT and thus BP.
Because the ECG QRS-Complex is not the starting point for blood to actually enter the radial artery, it is a biopotential to depolarization of the sinus node
This project only for research
Reference :
[1] Continuous Blood Pressure Measurement from Invasive to Unobtrusive: Celebration of 200th Birth Anniversary of Carl Ludwig
[2] Cuff-Less and Continuous Blood Pressure Monitoring: A Methodological Review
2018年9月21日 星期五
Xcode 10.0 update problem of wxWidgets (g++)
ld: warning: /System/Library/Frameworks//...
try dylib to TBD files:
https://github.com/EOSIO/eos/issues/5418
and
http://sd.jtimothyking.com/2018/07/26/stub-file-and-library-file-out-of-sync/
if the problem remains unsolved:
1. sudo mv /Library/Developer/CommandLineTools /Library/Developer/CommandLineTools.old
2. sudo rm -rf /Library/Developer/CommandLineTools.old
3. Download Command Line Tools from AppleDeveloper :https://developer.apple.com/download/more/
4. Double Click *.dmg (e.g. Command_Line_Tools_macOS_10.13_for_Xcode_9.2.dmg) install
5. Rebuild your wxWidgets project with g++
2018年9月9日 星期日
wxNixieClock
wxNixieClock is time sync tool for Nixie Clock project.(Only MAC-OS-X)
g++ -o2 -o wxnixieclock.app wxnixieclock.cpp serialport.cpp connectargsdlg.cpp `wx-config --cxxflags --libs` -m64
1. Pair BT of MAC and Nixie Clock.
2. Open wxNixieClock.app to select tools -> Connect Device -> cu.BT device driver
3. Click SyncTime button
4. Done!
Install wxWidgets dependency in terminal
1. user$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2. brew install wxwidgets
Reference : Nixie Clock
2018年9月7日 星期五
STM32F407-MG996R and MAC OS X GUI tester
STM32F407 with PWM to control MG996R, and GUI tester for MAX OS X
1.
make STM32F407 project, and burn to board.(0.5ms~2.5ms)
2.
build GUI
g++ -o2 -o wxservotester.app wxservotester.cpp serialport.cpp connectargsdlg.cpp `wx-config --cxxflags --libs`
3.
wxservotester.app -> Tools -> ConnectDevice
4.
Test your servo motor!
1.
make STM32F407 project, and burn to board.(0.5ms~2.5ms)
2.
build GUI
g++ -o2 -o wxservotester.app wxservotester.cpp serialport.cpp connectargsdlg.cpp `wx-config --cxxflags --libs`
3.
wxservotester.app -> Tools -> ConnectDevice
4.
Test your servo motor!
2018年7月8日 星期日
Real-Time wxSignalProcess with Serial Port(VCP) for MAC OS X
一個C++ MAC OS X的範例從/dev/tty.* or /dev/cu.* device driver取得Virtual COM Port的資料並且顯示在GUI,Framework用wxWidgets 3.0以及MRPT修改版的wxMathPlot 0.1.2,和修改以前Linux POSIX API的Class組合,多增加ioctl讀取,以及一個STM32F4的DMA+ADC的Example可供測試。
過去同性質不同平台的軟體參考:
2018年4月16日 星期一
2017年8月1日 星期二
Nixie Clock
C1,C2 如果不裝18650電池就用1000uF以上的電容,R15可以選擇5k~18k 1/4w以上的電阻。Github上有IN-12B與IN-14不過只是管子不同,IN-14的有加NEO-6M-0-001不過校時還沒寫,因為DS3231一年誤差一分鐘而已。
2017年3月16日 星期四
2016年10月4日 星期二
2016年9月24日 星期六
Firework Controller V2
中的裝置新版本,因為Android -Bluetooth太短所以改用2.4G RF控制,加進去火焰偵測和人體紅外線,code for Energia MSP430G2XX3由於PCB在中秋前一天才到所以code離預設的完成度不高不過也不打算再改了,而且今年也沒有機會放到煙火XD相關資料在以下
2016年8月18日 星期四
LD7032 0.5" OLED test board
LD7032的測試版上面放了ATMega328與MSP430FR5739,OLED要吃一個15v的電壓與Drive IC吃5v兩個電壓,15v升壓可以參考下面電路。基本上與對岸出的demo board一樣,這東西唯一麻煩的是connector不是普通的FPC而且超難焊很容易融化...插拔幾次後金手指就接觸不良了...,
訂閱:
文章 (Atom)
















-2.png?raw=true)









