Skip to the content
2 layers20.6 × 28 mmSolenoidStrokeMeasureControlUNIT, the printed circuit board in 3D

SolenoidStrokeMeasureControlUNIT

akita11/SolenoidStrokeMeasureControlUNIT
Size
20.6 × 28 mm
Copper layers
2
Thickness
1.6 mm
Parts
22
Nets
16
Pads
58
Tracks, vias
113, 13
Pours
3
Routed
Yes
KiCad
KiCad 6 (file 20211014)
Created
12 Jun 2024
Updated
19 Jun 2024

Overview

SolenoidStrokeMeasureControlUNIT is an open-source printed circuit board by akita11, from the akita11/SolenoidStrokeMeasureControlUNIT repository on GitHub, published under the MIT licence. It is a 2-layer board of 20.6 × 28 mm with 22 parts on 16 nets, routed with 113 tracks and 13 vias.

It is built around the LM358. Its parts include 12 resistors, 2 connectors, 1 IC, 1 diode and 1 transistor.

Main components

1

README

README.md

SolenoidStokeMeasureControl UNIT

ソレノイドのストローク位置によってインダクタンスが変化し、PWM制御時の電流波形が変化することを利用して、ソレノイドのPWM制御とストローク位置の計測(推定)を同時に行うための回路です。 (基板形状が「M5Stack用VH3.96-4ピンユニット[U020]」と同一のため、そのケースを使うことができます。)

【注意:重要】 実際の制御・計測の動作には、ソレノイドごとに特性の計測を行う必要があり、また特性の個体差、温度特性なども考慮する必要があります。そのため、「これを使ってサンプルプログラムを書き込めば間違いなく動作する(制御ができる)」というものではなく、あくまでもこの原理検証の実験のための回路ということをご理解ください。測定原理やサンプルプログラムはこちらに適宜まとめて更新していきます。

使い方

オレンジ色のコネクタ(VH3.96-4p)に、ソレノイド用の電源とソレノイドを接続します。M5StackのBAVGソケットを使うと、電源は2.1mmプラグ、負荷はスプリング端子で接続できて便利です。

Grove端子の3番("PWM"と表記)にPWM波形を加えてソレノイドをPWM駆動し、その駆動電流が電圧波形としてGrove端子の4番("ADC"と表記)に出力されます。

なおArduinoやM5Stack (Core2/CoreS3)用のサンプルプログラムはこちらにあります(あくまでも参考用のものです)。Measure_...がパラメータ計測用のプログラム、Control...が位置計測(推定)・位置制御用のプログラムです。(ESP32用はM5Stack Core2のPortAに本ボードを接続して使用します)

増幅率の調整

ソレノイドの駆動電流を0.2Ωの抵抗で電圧変換し、それをオペアンプ(非反転増幅回路)で増幅して"ADC"端子に出力しています。その増幅率は、用いるソレノイド・電源電圧からきまる駆動電流にあわせて、適切な範囲に調整する必要があります。"ADC"端子の波形をオシロ等で計測し、用いるマイコンのADCの入力電圧範囲に収まるように増幅率を調整します。増幅率は基板裏面のハンダジャンパJP3/JP4JP5で調整できます。(JP3は初期状態でONになっていますので、OFFにする場合はパターンをカットしてください)

  • JP3/JP4/JP5=ON/OFF/OFF : 101倍
  • JP3/JP4/JP5=ON/ON/OFF : 39倍
  • JP3/JP4/JP5=ON/OFF/ON : 20倍
  • JP3/JP4/JP5=ON/ON/ON : 16倍
  • JP3/JP4/JP5=OFF/OFF/OFF : R1にとりつける抵抗から決まる倍率((R1÷1[kΩ]+1)倍)

測定原理

ソレノイドは電気回路的にはインダクタで、そのインダクタンスはストローク(プランジャ)位置で変化します。そのためON時の充電電流の波形は、ストローク位置で変化します。ただし充電開始時の電流はOFF期間中の放電特性できまるため、ゼロからとは限りません。またPWMのON時間(PWMのデューティー比)によっても波形は変化します。

ソレノイドによっては、ON後の2箇所の時点(例えば100us後と700us後)での電流の差が、PWMのON時間(PWMのデューティー比)ごとにストローク位置に伴って変化するため、与えているPWM ON時間とその電流差から、ストローク位置を計測(推定)することができます。現時点で試した範囲では、TakahaのCBS0730シリーズはこの特性をもっています。(詳細はarXivの論文にまとめてあります)

ただしソレノイドによっては、この電流差がストロークによってほとんど変化しないため、この方法では位置を計測することができません。そのため、複数点の電流の計測値から、予め計測した位置と電流値との差(の総和)が最小となるように反復計算で位置を求めるアルゴリズムを開発中です。まだ安定性や精度の検証は不十分ですが、参考用に上記GitHubにArduinoとESP32用のソースコードをおいてあります(計測データはTakahaのLongStrokeSolenoidのもの)。

Author

Junichi Akita (akita@ifdl.jp, @akita11)

Parts

22
QtyValueFootprintReferences
3TBDResistor_SMD:R_0603_1608MetricR10, R11, R12
2100kResistor_SMD:R_0603_1608MetricR2, R8
21kResistor_SMD:R_0603_1608MetricR5, R7
2SolderJumper_2_OpenJumper:SolderJumper-2_P1.3mm_Open_Pad1.0x1.5mmJP4, JP5
2SolderJumper_3_Bridged12Jumper:SolderJumper-3_P1.3mm_Bridged2Bar12_Pad1.0x1.5mmJP1, JP2
10.2Resistor_SMD:R_1206_3216MetricR6
160kResistor_SMD:R_0603_1608MetricR4
175kResistor_SMD:R_0603_1608MetricR3
1CON_GROVEakita:CON_GROVE_HCN1
1Conn_01x04Connector_JST:JST_VH_S4P-VH_1x04_P3.96mm_HorizontalJ2
1DDiode_SMD:D_SOD-123FD1
1LM358Package_SO:SO-8_5.3x6.2mm_P1.27mmU1
1SolderJumper_2_BridgedJumper:SolderJumper-2_P1.3mm_Bridged_Pad1.0x1.5mmJP3
1TBDResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P2.54mm_VerticalR1
1TBDakita:Potentiometer_Bourns_3223WR9
1TR_NMOS_IRLML6344Package_TO_SOT_SMD:SOT-23Q1

Similar boards

  • 2 layers132.1 × 45.7 mmIPoS, the printed circuit board in 3D

    IPoS

    peterheinrich/InternetOverSpaghetti

    Transmitting IP packages over a pair of spaghetti thus demonstrating how media independent IP really is.

    42 parts342
  • 2 layers68.8 × 53.6 mmZArduino, the printed circuit board in 3D

    ZArduino

    zmaker/arduino_cookbook

    gli sketch del nuovo progetto Arduino Cookbook e dei video di YouTube

    46 parts269
  • 2 layers152 × 88 mmRFBitBangSMT, the printed circuit board in 3D

    RFBitBangSMT

    profdc9/RFBitBanger

    A QRP digital transceiver created from readily available parts for off-the-grid maintenance

    271 parts222
  • 2 layers118 × 103.5 mmEV Charger2, the printed circuit board in 3D

    EV Charger2

    fotherja/EV_Charger

    Arduino Uno Code for EV Charger

    62 parts167MIT
  • 2 layers113 × 62.2 mmFullScope, the printed circuit board in 3D

    FullScope

    tvlad1234/pillScopePlus

    Oscilloscope based around the STM32F401 Black Pill and a color LCD screen

    15 parts165Apache-2.0
  • 2 layers75.2 × 61.1 mmHelios, the printed circuit board in 3D

    Helios

    Grix/helios_dac

    Helios Laser DAC

    102 parts132
  • 2 layers144.1 × 182.2 mmSHVC CPU-01, the printed circuit board in 3D

    SHVC CPU-01

    starlightk7/OpenSFC

    OSHW Reproduction Parts related to the Super Famicom / Super Nintendo game console

    498 parts114CERN-OHL-S-2.0
  • 2 layers100 × 85 mmVNA, the printed circuit board in 3D

    VNA

    profdc9/VNA

    Vector Network Analyzer based on the STM32F103C8T6 bluepill

    178 parts93

Questions

How big is the SolenoidStrokeMeasureControlUNIT PCB?

It measures 20.6 × 28 mm and has 2 copper layers, 1.6 mm thick.

What parts does the SolenoidStrokeMeasureControlUNIT use?

22 parts, built around the LM358. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the SolenoidStrokeMeasureControlUNIT KiCad files?

From the akita11/SolenoidStrokeMeasureControlUNIT repository on GitHub, at the commit this page was made from: the board is SolenoidStrokeMeasureControl_UNIT.kicad_pcb and its schematic SolenoidStrokeMeasureControl_UNIT.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the SolenoidStrokeMeasureControlUNIT design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).