User Tools

Site Tools


ci-v_mqtt_stepper

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
ci-v_mqtt_stepper [2020/11/13 01:41]
ok1hra
ci-v_mqtt_stepper [2022/01/04 18:28]
ok1hra [Firmware source]
Line 10: Line 10:
     - CI-V     - CI-V
   - **Configure over USB CLI**   - **Configure over USB CLI**
- 
 ====== Hardware ====== ====== Hardware ======
   * [[https://remoteqth.com/hw/civ-stepper-02.pdf|Schematics rev0.2 .pdf]]   * [[https://remoteqth.com/hw/civ-stepper-02.pdf|Schematics rev0.2 .pdf]]
   * [[https://remoteqth.com/hw/civ-stepper-02-ibom.html|Interactive BOM]]   * [[https://remoteqth.com/hw/civ-stepper-02-ibom.html|Interactive BOM]]
 +=== Known issue === 
 +  - Q1 - bad footprint pinout
 ====== Connect ====== ====== Connect ======
 ===== Endstop ===== ===== Endstop =====
Line 69: Line 69:
   * after first boot login to serial console with default login **pi** and password **raspberry**   * after first boot login to serial console with default login **pi** and password **raspberry**
   * run command and **enable [[https://www.raspberrypi.org/documentation/remote-access/ssh/|SSH]]** <code>sudo raspi-config</code>   * run command and **enable [[https://www.raspberrypi.org/documentation/remote-access/ssh/|SSH]]** <code>sudo raspi-config</code>
-  * run command and write down the shown '''IP address'''{{ip a}}+  * run command and write down the shown **IP address** <code>ip a</code>
   * you can disconnect HDMI monitor and USB keyboard   * you can disconnect HDMI monitor and USB keyboard
   * connect to Raspberry PI from any other PC   * connect to Raspberry PI from any other PC
-    * [windows|https://www.raspberrypi.org/documentation/remote-access/ssh/windows.md] +    * [[https://www.raspberrypi.org/documentation/remote-access/ssh/windows.md|windows]
-    * [Linux|https://www.raspberrypi.org/documentation/remote-access/ssh/unix.md] +    * [[https://www.raspberrypi.org/documentation/remote-access/ssh/unix.md|Linux]
-    * [iOS|https://www.raspberrypi.org/documentation/remote-access/ssh/ios.md] +    * [[https://www.raspberrypi.org/documentation/remote-access/ssh/ios.md|iOS]
-* update system with run command{{sudo apt-get update && sudo apt-get upgrade}} +  * update system with run command <code>sudo apt-get update && sudo apt-get upgrade</code> 
-* install screen fith command {{sudo apt-get install screen}} +  * install screen fith command <code>sudo apt-get install screen</code> 
-* run '''screen'''{{screen /dev/ttyUSB0 115200}} +  * run **screen** <code>screen /dev/ttyUSB0 115200</code> 
-* now after pres ? key show status information and you can '''configure via CLI'''[https://remoteqth.com/img/wiki-civ-stepper-01b.png] +  * now after pres **?** key show status information and you can **configure via CLI** \\{{https://remoteqth.com/img/wiki-civ-stepper-01b.png}} 
-* close screen with '''CTRL+A K''' and confirm '''y''' +  * close screen with **CTRL+A K** and confirm **y** 
-* disconnect from Raspberry PI use command {{exit}} +  * disconnect from Raspberry PI use command <code>exit</code>
- +
-!Firmware +
-For upload firmware you have two possibilities +
-# Download '''source''' from [GitHub|https://github.com/ok1hra/CI-V_stepper] and compile in [Arduino IDE|https://www.arduino.cc/en/Main/Software] +
-## Install [EEPROM library|https://www.arduino.cc/en/Guide/Libraries] +
-# Download '''compiled binary''' from [release page|https://github.com/ok1hra/CI-V_stepper/releases] and upload with some tool +
-## for example [avrdude|http://www.ladyada.net/learn/avr/avrdude.html] or [Xloader|http://xloader.russemotto.com/] for windows+
  
-!! Firmware source +==== Firmware ==== 
-contains some settings which does not available from CLI +For upload firmware you have two possibilities \\ 
-* You can enter '''frequency and uStep directly in to firmware''' without CLI wizard. How to +  - Ordered List ItemDownload **source** from [[https://github.com/ok1hra/CI-V_stepper|Github]] and compile in [[https://www.arduino.cc/en/Main/Software|IDE]
-**Disable preset coment line{{//#define RestoreMemoryFromEeprom}} +  - Install [[https://www.arduino.cc/en/Guide/Libraries|EEPROM library]] 
-**Write frequency and uSteps i to array{{unsigned long StorageFreqToStep[112][2= { +  - Download **compiled binary** from [[https://github.com/ok1hra/CI-V_stepper/releases|release page]] and upload with some tool 
-  {7000000, 0}, +  - for example [[http://www.ladyada.net/learn/avr/avrdude.html|avrdude]] or [[http://xloader.russemotto.com/|Xloader]] for windows
-  {7010000, 500}, +
-  {7020000, 1000}, +
-  {7030000, 1500}, +
-  {7040000, 2000}, +
-  ..}} +
-** Upload firmware +
-** Select BCD input to bank-0 (must be, because only bank-0 saved also frequency, higest bank saved uStep only) +
-** Save frequency/uStep table from RAM to EEPROM with command [sin CLI +
-** Replay edit table, upload and save for any higher bank +
-** After fill EEPROM to your liking, enable command in source file {{#define RestoreMemoryFromEeprom}} +
-** After upload frequency/uStep table will be set by preset selected bankFor more info use command [l] or [e] in CLI. +
-* Time (second number in ms) after which reduce stepper current and save last position to eeprom, if disable endstop{{long CurrentRunTimeout[2= {0,1000};}} +
-* Enable serial debug if uncoment this line{{#define SERIAL_debug}} +
-* CLI baudrate, default is 115200{{const int BAUDRATE0 = 115200;}}+
  
-!MQTT variant +==== Firmware source ==== 
-* need install wiznet ethernet module +contains some settings which does not available from CLI \\ 
-* use another firmware [GitHub|https://github.com/ok1hra/MQTT-stepper] +  * You can enter **frequency and uStep directly in to firmware** without CLI wizard. How to 
-* for setup and control see source code header+    * Disable preset coment line <code>//#define RestoreMemoryFromEeprom</code> 
 +    * Write frequency and uSteps i to array \\ 
 +<code> 
 +unsigned long StorageFreqToStep[112][2] = { 
 +{7000000, 0}, 
 +{7010000, 500}, 
 +{7020000, 1000}, 
 +{7030000, 1500}, 
 +{7040000, 2000}, 
 +..}}</code> 
 +    * Upload firmware 
 +    * Select BCD input to bank-0 (must be, because only bank-0 saved also frequency, higest bank saved uStep only) 
 +    * Save frequency/uStep table from RAM to EEPROM with command [s] in CLI 
 +    * Replay edit table, upload and save for any higher bank 
 +    * After fill EEPROM to your liking, enable command in source file <code>#define RestoreMemoryFromEeprom</code> 
 +    * After upload frequency/uStep table will be set by preset selected bank. For more info use command [l] or [e] in CLI. 
 +  * Time (second number in ms) after which reduce stepper current and save last position to eeprom, if disable endstop <code>long CurrentRunTimeout[2] = {0,1000};</code> 
 +  * Enable serial debug if uncoment this line <code>#define SERIAL_debug</code> 
 +  * CLI baudrate, default is 115200 <code>const int BAUDRATE0 = 115200;</code> 
 +==== MQTT variant ==== 
 +  * need install wiznet ethernet module 
 +  * use another firmware [GitHub|https://github.com/ok1hra/MQTT-stepper] 
 +  * for setup and control see source code header
ci-v_mqtt_stepper.txt · Last modified: 2022/01/04 18:29 by ok1hra