Week 13

In 9th week and 11th week, I did the stepper motor and circuit board which was gauging the light. And in this week, I combined them : resetting programming and adding the A4988 motor control panel. Added the light in front of the linear stage, the circuit board received signals for lights, the stage parts would follow the intensity of the light to move back or forwards (the intensity of the light was higher, the stage parts would fall back, conversely, the intensity of the light was lower, it would move forwards). As a result, the A4988 motor control panel and programming that photocell could receive the intensity of the light to be consistent, it would not being too dark or too bright.
在第9周及第11周,我分別做了步進馬達滑軌組與量測光亮度的電路板。本周我結合此兩項作品:重新編寫程式及加入A4988馬達控制板。在滑軌組前端加上燈光照明,電路板接收到測量光度器發出的訊號時,滑塊會依照光的強弱,使得馬達後退或前進,(光強度過高時滑塊後退;光強度不足時前進),如此一來,新加入的A4988馬達控制板及程式,可使光敏電阻接收到的光源之亮度保持一致,不會造成太暗或太亮的情況。

Searching for Attiny45(pin), in 9th week, used PB0 as PWM of LED to output PB5 as analog input. PB1 to 4 could get used on stepper motor for output control.
查詢Attiny45接腳(pin),在第九周已經用了PB0當LED的PWM輸出;PB5為類比輸入。剩餘PB1~4可做步進馬達輸出控制。


Searching for A4988 chip features (micro-stepping driver), it has built-in converter and many multiple stepping mode. Just import a pulse that can make the motor makes a signal, we do not need to process phase order, high-frequency control or complex formula.
Following the step: connect the power of motor, stepper motor, circuit board, RESET, STEP, DIR and ENABLE. STEP is as for PB1(pin); DIR as PB2(pin); ENABLE as PB4(pin).
查詢A4988晶片功能,其為微步馬達驅動器,具有內置轉換器及多種步進模式,驅動能力可達 35V±2A,只要輸入一個脈衝即可驅動馬達產生微步訊號,無須處理相位順序、高頻率控制或複雜的程式。
依其指示接上馬達電源、步進馬達、電路板電源、RESET、STEP、DIR及ENABLE。其中STEP使用PB1腳位(pin);DIR使用PB2腳位;ENABLE使用PB4腳位。


Using Arduino IDE to program and burn.
使用Arduino IDE 進行編程與燒錄。


With circuit board sticks together fixedly on stage parts, using flashlight to test machine movement, there was a movie about testing:
將電路板黏著固定於滑塊,並以手電筒測試機器動作情形,測試影片如下:


Troubleshooting:

  • The distance of stage parts : programming that must be written in instruction in the maximum value and the minimum value of distance. In order to avoid stage parts hit back machine, or go forwards over the screw and not to move.
    滑軌組運動的距離極限。編寫程式時需加入前後極限(距離之最大值及最小值的指令),必避免滑塊後退撞到裝置,或前進超出螺桿而不動作。
  • It needs stable power supply for Attiny 45 and A4988 circuit board. When voltage is unstable, stepper motor will be vibrating; it might be stopped or not to make the movement.
    Attiny 45及A4988電路板需穩定供電。電壓不穩時步進馬達動作時會抖動;動一下就停止;或不動作。(可能會停止或是終止動作)
  • Tools:

  • Arduino IDE
  • File:

  • attiny45_stepping.ino
    • Fab Academy

      The Fab Academy is a Digital Fabrication Program directed by Neil Gershenfeld of MIT's Center For Bits and Atoms and based on MIT's rapid prototyping course, MAS 863: How to Make (Almost) Anything. The Fab Academy began as an outreach project from the CBA, and has since spread to Fab Labsaround the world. The program provides advanced digital fabrication instruction for students through an unique, hands-on curriculum and access to technological tools and resources.
    • Fablab Tainan

      Fab Lab Tainan was founded at Dec. 2013 at Tainan, Taiwan. It is the first Fab Lab at Southern Taiwan. Supported by Tainan City Government, this Lab hope could open for local citizen. The background photo of web page is the roundabout in front of Tainan train station.
    • Who Am I

      I'm Jia-Hao Chang from Fablab Tainan.I'm senior staff of Association of Digital Culture, Taiwan (ADCT).In this years, I have participated the project of digital curriculum.My career is to empower people employing digital manufacturing technology or tools toimprove their problem.