2017年2月10日 星期五

raspberry multi-wifi setup

Ref :  https://www.raspberrypi.org/forums/viewtopic.php?p=459824


首先先把外接的 usb-dongle 插上去


先看看有沒有抓到

sudo ifconfig





然後參考這一篇

https://www.raspberrypi.org/forums/viewtopic.php?p=459824


vi  這個檔案   /etc/network/interfaces
































wlan0 和 wlan1 都是用   /etc/wpa_supplicant/wpa_supplicant.conf 這個設定檔



接著打開這個檔案

country=GB
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

然後參考這篇文章

Ref : https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md


在下面加入這個設定

network={
    ssid="The_ESSID_from_earlier"
    psk="Your_wifi_password"
}



ssid 和 psk 要換成你自己的


打開wlan0  (第一個wifi... 如果是rpi... 就是內建的wifi)

sudo ifdown wlan0

sudo ifup wlan0


打開wlan1  (第二個wifi)


sudo ifdown wlan1

sudo ifup wlan1








2017年2月9日 星期四

nanodlp 轉接板的線路圖


Ref :  https://www.nanodlp.com/download/schematic.png






從掏寶上買的







左邊的  A2,A1,B1,B2 是接馬達得

             黑綠藍紅

A ->  黑
/A   ->  綠
B   -> 紅
/B   -> 藍


系紛調整
MODE0 MODE1 MODE2 微步分辨率
  低   低  整步
高    低   半步
  高   低  1/4步
高    低   1/8步
低    高   1/16一步
  低   高   1/32一步
  高   高  1/32一步
高  高  高  1/32一步


A/AB/B
藍 


再下面是     power 模組   

MOT_POW  ->   motor - power,  DC : 12~ 24V 

5V            ->    DC 5V in

中間是給shutter用的

PWM   ->  接servo 馬達

SER_POW   ->  是給

=========================================================

install i2c-tools

  1. sudo apt-get install i2c-tools

i2c detect

  1. sudo i2cdetect -y 1







2016年12月23日 星期五

nanodlp 的研究筆記(1)

Ref :  http://www.instructables.com/id/MUVe-3D-DLP/?ALLSTEPS

Ref :  https://drive.google.com/file/d/0B8xCOdl2soS-UDQ1ckE3SEZvVnM/view

 Ref :   https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkwF7_lGhW2Ie14zAgh5I3Tf7VCBzliXE2Jm9gR_qYukHAFVfLjFirjcehQva7CHN75anH_B_4Owo23fc8C0M5zsTYNqJNhkoE7MSCXFVV8kx02IAtvXUdy96TMaDf8FWL9nv5MLmvakE/s1600/dev.png


有兩種方式

1.  直接燒錄官方的img

2.  download Raspbian Lite and wget source code and install it

  • Install Raspbian Lite on SD card. (Probably works with other Linux distributions too)
  • Run the below command on Raspberry Pi Terminal.
  • (wget http://www.nanodlp.com/nanodlp.tar.gz -O - | tar -C /home/pi -xz);cd /home/pi/printer;sudo ./setup.sh



連接你的元件
Wire the HDMI to your projector HDMI, connect the USB from the RAMPS to the Raspberry Pi USB header.   ( 投影機用HDMI接,  RAMPS請用USB 線接)

type the IP address of the printer into your preferred web browser (後面會講到可以用gui的界面)


*SHUTTER NOTES* The shutter is normally attached to the RAMPS in our printer systems but we now have the added option of wiring a servo to the Raspberry Pi. Simply wire the servo to its own 5V power power supply, and run the signal pin of the servo to one of the free GPIO pins on the Pi. Then you can configure the nanoDLP software to use whatever pin you selected. We used GPIO 4/physical pin 7. If you have a low enough amperage servo and a high power Pi power supply, you can take power from pins 4 and 6, 5V and Ground




燒入韌體   https://github.com/mUVe3D/Marlin-mUVe1DLP-Running



點選下載...  打開  Marlin.ino   (如果沒有安裝arduino IDE , 請先下載)





如果要lcd panel enable 的話

韌體要改成這個

https://github.com/MarlinFirmware/Marlin


然後我把  Baudrate 改成  115200 (250000 似乎有問題)

然後把

    #define MOTHERBOARD BOARD_RAMPS_14_EFB

改成這個.....
 #define MOTHERBOARD 33

同時參考

Ref :  http://www.03dp.com/forum.php?mod=viewthread&tid=1826


// #define REPRAP_DISCOUNT_SMART_CONTROLLER

改成

#define REPRAP_DISCOUNT_SMART_CONTROLLER

這樣就可以了



在tools 那邊選擇  Mega 2560


按下 build 和upload  即可....


================================================================


接下來去windows 的 網路





如果有弄成功就會看到   NanoDLP Generic Printer  ...滑鼠點進去..




注意看網址..  因為都是在自己的網段裡面..  所以瀏覽器出現的ip應該是  192.168.1.X

以我的例子來看就是 192.168.1.12...

也可以使用  http://www.advanced-ip-scanner.com/cn/  這個軟體來scan 你的網段裡面rpi 有沒有ip

Machine Setup




首先先來確定  rpi 和    ramps1.4 的protocol  



先使用  putty  連線到   rpi...

預設密碼為

login : pi

pass :  raspberry

登入後,,    type      "ls /dev/tty*"

以筆者的例子



port 變成  ttyACM1



G code 的詳細解釋  http://reprap.org/wiki/G-code




再回到   web browser



這裡根據你剛剛查詢到的結果,  改變後,直接按下Enter 即可

接下來切換到  Terminal




有看到這樣的訊息就對了




代表rpi  和 ramps 控制板溝通ok.





======================================================================

接下來看arduino 控制板


12V的電源接在左下角的綠色接頭



  • Arduino Mega2560 主控板(该套件包含):这是3d打印机的大脑,负责控制整个打印机来完成特定的动作,如打印特定的文件等;
  • RAMPS1.4 (该套件包含):这是上面主控板的拓展板,有它是为了更好的与其它硬件进行连接和控制的,起到过渡桥梁的作用;
  • A4988步进电机驱动板(该套件包含):这是用来连接步进电机的,从而实现主控板对步进电机的控制,实现XYZ及挤出机的动作;


只给ramps1.4供电即可

虽然没有连接加热头和热床,但可以进行简单测试,首先连接12V电源,然后设置加热床和加热头的温度分别为230和110度,此时板子上有两个红色LED会相继点亮,这说明这部分电路正常,关掉即可。然后再右下角输入命令:M106 S255点发送,来打开风扇控制,此时另一盏红色LED会点亮,输入:M107点发送可以关掉。



二極體1N4004是用於RAMPS供電到MEGA,如果你的板子沒有焊接這個二極體,你可以安全的使用最高35V的供電輸入



======================================================================

韌體控制




======================================================================

MKS  V1.4  控制板....





目前DLP只會用到Z 軸..  所以只需要插  Zstepper


Firmware

This section will show you how to get firmware into your controller and run it with basic settings.
Software required: FTDI USB drivers, Arduino IDE, Choice of firmware ( Marlin or Repetier or Sprinter ), Pronterface
1. USB VCP Drivers - MKS Gen uses the newer FT232 USB to UART chip and it needs the updated VCP(virtual com port) drivers from the
manufacturer's website . Download the correct version for your operating system or you can get the executable version for Windows(easier).
Windows Vista/7 may try to do an update to locate the proper drivers but it is recommended to install the FTDI drivers for better performance.
The VCP drivers will install a COM Port on your computer for the MKS Gen, you can check what port number was assigned by going to your device manager and click on Ports(COM & LPT) look for something that says "USB Serial Port(COM3)" where COM3 is you assigned port number(will vary from PC to PC). Remember this number as you will be using it later in configuring other software.

2. Install Arduino IDE - Download and extract the Arduino IDE .

3. Get your firmware - While you can use most firmwares out there, we will use Marlin as an example. Download and extract Marlin or any other forks of the firmware that you prefer/need.
4. Upload firmware - Run the Arduino IDE (arduino.exe).
Select your board - Click on Tools -->Board -->Arduino Mega 2560,
Select your serial port - Click on Tools-->Serial Port-->(select your COM port for the X3 USB, you can check this in Device manager)
On Arduino click File-->Open -- then point to your Marlin Download and select Marlin.pde. With Marlin loaded on the IDE window, click on the tab that says "configuration.h". These are the basic entries that you need to change to get the X3 working.
#define BAUDRATE 250000 //This will work fine for the MKS Gen
#define MOTHERBOARD 33 //33 is for RAMPS which the MKS GEN is compatible with MOTHERBOARD 34 
#define TEMP_SENSOR_0 3 //If you have the NTC 100K  
#define TEMP_SENSOR_1 0 
#define TEMP_SENSOR_2 0 
#define TEMP_SENSOR_BED 3 //If you have the NTC 100K  
These entries are the only ones you need just to get the MKS Gen running. Once you get it to upload you can now test most features of the board. You will need to tweak the settings on the configuration file for your printer.
5. Upload(or compile to test) Marlin - While still on the Arduino window
Click on the Triangle inside the circle to do a test compile, this makes sure that the firmware does not contain errors( you can skip this)
Click on the arrow pointing to the right inside a square frame to upload firmware to the board. If everything goes well you'll see a "Done Uploading" message near the bottom of the Arduino window.



==========================================================

http://marlinfw.org/docs/development/configuration.html#lcd-and-sd-card

LCD Type

Marlin includes support for several controllers. The two most popular controllers supported by Marlin are:
  • REPRAP_DISCOUNT_SMART_CONTROLLER A 20 x 4 character-based LCD controller with click-wheel.
  • REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER A monochrome 128 x 64 pixel-based LCD controller with click-wheel.
See Configuration.h for the full list of supported controllers.


限位開關

R_

EndStop  

#define USE_XMIN_PLUG
#define USE_YMIN_PLUG
#define USE_ZMIN_PLUG
//#define USE_XMAX_PLUG
//#define USE_YMAX_PLUG
#define USE_ZMAX_PLUG

#define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.









2016年3月10日 星期四

123D 的研究筆記1


當123D Design越來越熟悉時,作品複雜度也逐漸的提升,這時會建議讀者,使用123D Design的PC版本,由於PC版是在電腦上安裝執行,處理各項編輯操作也比較順暢,我們可以在123D Design點擊「Download 123D Design」來下載。

Autodesk 123D Design共有三個版本,先前已經介紹過Web的雲端版本,而雲端版本的好處是免安裝,隨時隨地只要有電腦上網就能使用,顯示卡也不避太講究,由於是雲端版本,能夠處理的功能也較有限,對於較複雜的3D模型,處理起來總是卡卡的。

當123D Design越來越熟悉時,作品複雜度也逐漸的提升,這時會建議讀者,使用123D Design的PC版本,由於PC版是在電腦上安裝執行,處理各項編輯操作也比較順暢,我們可以在123D Design點擊「Download 123D Design」來下載。


下載的時候請確認自己適合的版本,本範例中是使用64bit的Windows7。


因為是在電腦中直接安裝,當然也要注意系統需求,作業系統要求Windows7,這邊強烈建議大家安裝64bit的Windows7來搭配,記憶體2G以上應該不是很困難,1.5G的硬碟空間更是小事一樁,Direct3D® 9 or 10也是玩3D遊戲必備的程式,PC版沒有很特殊的需求,居然沒有特別要求要獨立顯示卡,不過筆者建議最好還是有一張獨立顯示卡比較恰當,記憶體也提升到4G以上吧。


安裝完畢後,可以按下「Launch 123D Design」直接開啟程式;或者「Join/Sign In」申請帳號或登入。雖然安裝的是PC版的,但123D Design部分雲端資料庫的功能,還是必須上網才能連結帳號來正常使用,所以不管事Web版還是PC版,申請一個帳號是絕對需要的。

打開123D Design之後,我們可以看到初始的介紹畫面,之後避免一再出現可以將「Don’t show this again」打勾,接著按下「Start a New Project」就可以開啟新的專案了。

比較起Autodesk一般所代理的3D軟體產品,123D Design的介面與操作非常平易近人,非常適合3D剛入門的朋友。123D Design是專為一般大眾族群設計的3D設計及列印軟體,設計完的作品皆可以拿來被3D列印,不需要顧慮檔案的相容性問題,本篇將123D Design分為A-O十七個區塊,為大家介紹123D Design的介面操作,幫助新手能夠快速地瞭解123D Design的基本操作。
比較起Autodesk一般所代理的3D軟體產品,123D Design的介面與操作非常平易近人,非常適合3D剛入門的朋友。123D Design是專為一般大眾族群設計的3D設計及列印軟體,設計完的作品皆可以拿來被3D列印,不需要顧慮檔案的相容性問題,本篇將123D Design分為A-O十七個區塊,為大家介紹123D Design的介面操作,幫助新手能夠快速地瞭解123D Design的基本操作。
畫面的最左上角的A.檔案管理,檔案管理中包括基本的新增、開啟、插入、存檔、輸出之外,還支援了3D列印直接列印的功能。

Open與Insert支援的檔案都是相同的,Open在於一次針對一個檔案或專案開啟,Insert則是支援多個檔案的插入。

Open與Insert的選擇上,123D Design提供了四種模式給玩家們使用,其中My Project、Open from Gallery與Open an Example都需要透過網路才能使用。Open from Gallery是網路上的其他玩家所釋放的免費3D素材;Open an Example則是官方提供的一些免費專案素材,可提供大家製作練習。

如果在沒有網路的狀態下,使用Browse My Computer也可以從自己的電腦中,匯入或開啟3D物件檔案。

Import SVG分為Sketch與Solid兩種,主要是支援向量的線模式SVG檔匯入,並且只支援封閉的線造型,以Sketch匯入會是線架構的呈現;Solid則會將匯入的SVG轉為立體造型。

圖左為Sketch的方式匯入;右邊則是以Solid方式匯入。

儲存檔案Save可以選擇儲存於雲端帳號中(To My Projects)或儲存於自己的電腦中(To My Computer),如果是使用免費帳號,建議儲存在自己的電腦上會比較快。

複製儲存檔案Save a Copy…則是複製儲存檔案,與存檔差不多,方便製作時的備份,同樣也分為雲端帳號(To My Projects)或自己電腦(To My Computer)兩種方式。


轉送Send To…這個功能是傳遞到其他軟體或3D列印代印服務廠商,以便加工製作或成品輸出使用。

例如123D Make這套軟體,它可以將3D檔案轉換成一片片的裁切檔來組合成立體,是非常有趣的軟體應用。

是將製作檔案轉換成DWG檔,這個功能必須付費才能使用。

在輸出3D列印專用的STL檔部分不用擔心,這是免費版就可以使用的。





Reference : http://inplus.tw/123d-design%E5%85%A5%E9%96%803d%E8%A8%AD%E8%A8%88%E5%B0%88%E5%8D%80