# Inline Filament Diameter Estimator, Lowcost (InFiDEL) - Firmware
<p xmlns:dct="http://purl.org/dc/terms/" xmlns:vcard="http://www.w3.org/2001/vcard-rdf/3.0#">
<a rel="license"
href="http://creativecommons.org/publicdomain/zero/1.0/">
<img src="https://licensebuttons.net/p/zero/1.0/80x15.png" style="border-style: none;" alt="CC0" />
</a>
Originally created by Thomas Sanladerer
</p>
## Files
| File | Note |
| ------ | ------ |
| calibration.ino | First test firmware by Thomas Sanladerer, it sends the ADC raw value over I2C, insert some drills of known diameters into the sensor and note the ADC value, then put the values into driver.ino and re compile |
| driver.ino | Code for the sensor, it uses a hardcoded table to convert the ADC to Diameter, and sends 2 bytes over I2C -- no analog out |
| host-example.ino | Reads the 2 bytes of diameter over I2C, and displays it over the UART, used to test the sensor |
| Host_ee_prog.ino | Code for the Host Arduino, uses bidirectional communication with the sensor and has a simple UART Console to do the calibration and sensor testing |
| Infidel_release_ee.ino | Firmware for the sensor, table in EEPROM, sets values over I2C |
## Setup and Programming
### Requirements
- Arduino > V1.8.8
- TinyWireS LIbary from https://github.com/nadavmatalon/TinyWireS
- ATtiny85 Board for Arduino from https://github.com/damellis/attiny
- ISP Programmer like Arduino over ISP --> https://www.arduino.cc/en/Tutorial/BuiltInExamples/ArduinoISP
Load the code, wire the ISP program to the ISP port on the sensor and program it.
Remember to set the processor to Attiny85.
Tools --> Processor: Attiny85
Tools --> Clock: Internal 1 MHz
Tools --> Burn bootloader to set the fuses
Sketch --> Upload with Programmer
After programming, the LED should flash two times.
## Wiring to the Host Board
![Alt text](host_to_sensor_arduino.PNG?raw=true "Wire Diagram")
Connect the the sensor to the host board, such as an Arduino Uno or Mega.
Program the Host with Host_ee_prog.ino and start the console with 19200 baudrate.
## Console
On start, the following is shown:
```sh
Infidel Sensor Programmer
Scanning...
I2C device found at address 43
Version: 3.12
Table [ADC] [DIA in um]:
00: 0000 / 3000
01: 0619 / 2090
02: 0702 / 1700
03: 0817 / 1400
04: 1000 / 1000
05: 1023 / 0000
Table [DAC min Uout in uV] [DAC max Uout in uV]:
09: 1344 / 2017
Command Input 0 - val / 1 - RAW val / 2 - Version / 3 - Table / 4 - Set Tabel Val / 5 - Ongoing raw read / 6 - sample Mean ADC Val
Command Input 7 - DAC 0 PWW / 8 - DAC 255 PWM
```
| Commands | Note | Output |
| ------ | ------ | ------ |
| 0 | Read the Diameter value | Diameter [mm]: 2.242 |
| 1 | Read the Diameter + raw ADC Value | Diameter [mm] / [ADC]: 2.242 / RAW: 515 |
| 2 | Read the Version | Version: 1.11 |
| 3 | Read the Diameter Table | Table [idx] [ADC] [DIA in um] |
| 4 | Set the Value in the Table | Input values for Table [IDX],[ADC],[DIA um] like (1,619,2090) |
| 5 | Ongoing reading the ADC raw Value, stop when the command 5 is sent one more time |
| 6 | Read Meanvalue from Sensor (100 Samples), Display Min / Max / Mean / cnt, used it for Calibration | ADC Mean: 704 / Min: 688 / Max: 713 / Cnt: 100 |
| 7 | Set DAC to PWM 0 --> for check Output Voltage at LOW |
| 8 | Set DAC to PWM 255 --> for check Output Voltage at HIGH |
| h | Show the command list |
## Calibration
Start with the bigger shaft of known diameter (e.g., 2 mm), insert it into the sensor and read the raw ADC value with command "6".
Command "6" determines the mean value over 100 measurements and removes the outliers
```sh
ADC Mean: 704 / Min: 688 / Max: 713 / Cnt: 100
```
Note the ADC value and use the command "4".
The console should show:
```sh
Input values for Table [IDX],[ADC],[DIA um] like (1,619,2090)
Input:
```
Input this string: `1,503,2000`
Means, Table Index 1 (Command "3"), ADC Val 503, Diameter 3
Repeat this for the next two Ddiameter (1,7mm, 1,4 mm) and write the values to the sensor.
At the end check the settings with Command "3".
```sh
Table [ADC] [DIA in um]:
00: 0001 / 2999
01: 0617 / 2092
02: 0722 / 1711
03: 0816 / 1401
04: 0999 / 1001
05: 1022 / 0001
```
The values are stored in the EEPROM and will load from the EEPROM at the next power up.
If you program the sensor with a new firmware over the ISP the EEPROM will be erased and the sensor will start with default settings.
## Calibration with Button (Standalone)
Press the Button at Powerup for 3 sec, if the Calibrationmode start the LED flashes 10 times
The sensor sends an analog signal to Pin 5 [OUT].
* Step 1, Led Flash 1 Times
* Insert Drill with 1,4mm
* Wait a short Time, 1-2 sec
* Press the Button for 1 sec
* The Led light for 2 sec, the Sensor is getting 100 Samples from the ADC
* If the messure is Ok the Led flash fast
* Remove the drill an press the Button
* Step 2 Led flashes 2 Times (1,7mm Drill)
* Insert the Drill 1,7mm and repeat Step 1
* Step 3, Led flash 3 times (2mm Drill)
* Insert the Drill with 2mm and repeat Step 1
The Calibration is done
## Analog Output
The sensor sends an analog signal to Pin 5 [OUT].
The range goes from 1.42 VDC to 2.14 VDC .
The voltage is the analog for the diameter: 1.73V is equal to 1.73mm diameter.
## Calibrate the Analog Output
Connect a Multimeter to GND and OUT.
The Analog Output depend on the VCC Voltage, so make the Calibration when the Sensor is connected to the Printerboard
and not to the unstable USB Port.
* Set with the command "7" the PWM to LOW, meassure the Voltage on Analog OUT and note it (like 1,344 V)
* Set with the command "8" the PWM to HIGH, meassure the Voltage on Analog OUT and note it (like 2,017 V)
Set with the command "4" the table Value for Index 9 (Calibration Values for DAC)
IDX 9 then LOW Voltage and the HIGH Voltage --> like: 9,1344,2017
Check the table with command "3".
The Values are stored in the EEPROM for the next Start
## Fault Pin
The fault pin is high when the diameter is bigger than 3mm and smaller than 1.5mm.
This indicates that the sensor is outside of the normal working range.
没有合适的资源?快使用搜索试试~ 我知道了~
带集成位置传感器 的三相电机控制器_PLSQL_代码_相关文件_下载
![preview](https://csdnimg.cn/release/downloadcmsfe/public/img/white-bg.ca8570fa.png)
共69个文件
kicad_mod:9个
ino:5个
rst:4个
![preview-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/scale.ab9e0183.png)
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 173 浏览量
2022-07-13
17:27:59
上传
评论
收藏 10.31MB ZIP 举报
温馨提示
一种廉价但精确的灯丝直径传感器,旨在实时补偿灯丝直径偏差。 InFiDEL 是一种廉价(< 5 美元)的灯丝直径传感器,适用于 FDM 3d 打印机。可以校准传感器以实时提供令人惊讶的精确灯丝直径读数。主要思想是使用传感器在打印时纠正灯丝直径偏差。 准 带校准的闪存板.ino 通过 I2C 连接主机(请参阅提供的 host-example.ino) 插入每个校准钻头轴,并用您自己的测量值替换 driver.ino 中的查找表条目 测量轴的实际直径并填充第二列 使用主机的输出 *1000 填充第一列 最后,填写您的值的 flash driver.ino 集线器现在应该输出准确的直径值 更多详情、使用方法,请下载后细读README.md文件
资源推荐
资源详情
资源评论
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![synapse3](https://img-home.csdnimg.cn/images/20210720083646.png)
收起资源包目录
![package](https://csdnimg.cn/release/downloadcmsfe/public/img/package.f3fc750b.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/ZIP.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
共 69 条
- 1
资源评论
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
![avatar](https://profile-avatar.csdnimg.cn/default.jpg!1)
![avatar-vip](https://csdnimg.cn/release/downloadcmsfe/public/img/user-vip.1c89f3c5.png)
快撑死的鱼
- 粉丝: 1w+
- 资源: 9152
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)