Difference between revisions of "SatNOGS Rotator Controller"

From SatNOGS
(Add an example with stepper motor velocity and accelaration selection)
(Build sequence)
Line 12: Line 12:
 
}}
 
}}
  
== Intro ==
+
==Intro==
 
SatNOGS Rotator Controller refers to the set of electronics designed to operate a SatNOGS Rotator. There have been multiple iterations of the rotator controller design, but the modularity of the approach enables operations between different versions of the controller and the rotator.
 
SatNOGS Rotator Controller refers to the set of electronics designed to operate a SatNOGS Rotator. There have been multiple iterations of the rotator controller design, but the modularity of the approach enables operations between different versions of the controller and the rotator.
 
Since the start of 2016, the rotator controller design is able to facilitate a DC-motors or stepper-motors rotator design. We intend to keep this modularity for the electronics and firmware design to facilitate the variety of build by our community.
 
Since the start of 2016, the rotator controller design is able to facilitate a DC-motors or stepper-motors rotator design. We intend to keep this modularity for the electronics and firmware design to facilitate the variety of build by our community.
  
== Rotator Controller v2 ==
+
==Rotator Controller v2==
 
<gallery>
 
<gallery>
 
Pcb_schema_v2_revC.png
 
Pcb_schema_v2_revC.png
Line 24: Line 24:
 
The PCB are tested in this [https://network.satnogs.org/stations/9/ ground station].  
 
The PCB are tested in this [https://network.satnogs.org/stations/9/ ground station].  
  
=== Features ===
+
===Features===
* It is designed to fit the entire electronics needed to control rotator in Euroboard 80x50 mm.
 
* Main micro-controller is [https://store.arduino.cc/arduino-pro-mini Arduino pro-mini], [https://github.com/sparkfun/Arduino_Pro_Mini_328 SparkFun's Arduino Pro Mini 328] dev-board with ATmega328p.
 
* The modular design includes plug-in either [https://www.pololu.com/product/2133 DRV8825]/[https://www.pololu.com/product/1182 A4988] or [https://www.pololu.com/product/1213/resources DC motor drivers] (MC33926).
 
* The power supply in embed in the same board in contrast with previous version.
 
* Filtered power supply of micro controller.
 
* An I2C multiplexer is used to connect I2C encoders AS5601 (same ID) to get position feedback for each axis.
 
* A temperature sensor TC-74 monitoring the temperature inside the controller box in order to protect them from over-heating.
 
* There are some spare dev-pins in order to connect other peripherals like IMU or an LCD display.
 
* Pins with integrated RC-Low Pass filter for end-stops connection.
 
* Default communication interface is RS-485 but it can also be used as a UART.
 
* Using different paths for digital and power (motors) GND.
 
* Electrolytic capacitor and TVS-diode in PSU input
 
* Flashed either by using UART or ISP header
 
  
=== Build sequence ===
+
*It is designed to fit the entire electronics needed to control rotator in Euroboard 80x50 mm.
* Make sure you have a [[SatNOGS Rotator v3|mechanical assembly]] of the rotator constructed and ready
+
*Main micro-controller is [https://store.arduino.cc/arduino-pro-mini Arduino pro-mini], [https://github.com/sparkfun/Arduino_Pro_Mini_328 SparkFun's Arduino Pro Mini 328] dev-board with ATmega328p.
* Buy the PCB.  [https://oshpark.com OshPark],[https://www.seeedstudio.com/fusion_pcb.html Seeed Fusion][https://www.pcbway.com PCBWay.com], [http://dirtypcbs.com DirtyPCBs.com], [https://www.elecrow.com/ Elecrow] have been used in the past with good results.
+
*The modular design includes plug-in either [https://www.pololu.com/product/2133 DRV8825]/[https://www.pololu.com/product/1182 A4988] or [https://www.pololu.com/product/1213/resources DC motor drivers] (MC33926).
** You can order the v2.2 of the board directly using [https://oshpark.com/shared_projects/w0s8d4OJ this OSHPark link] or [https://dirtypcbs.com/store/designer/details/6933/5904/satnogs-v3-motor-controller-zip this DirtyPCBs link].
+
*The power supply in embed in the same board in contrast with previous version.
** You can order the v1.0 of the rotary encoder board using [https://oshpark.com/shared_projects/I3b8SCci this OSHPark link]
+
*Filtered power supply of micro controller.
** You can order PCB as well as [https://www.seeedstudio.com/prototype-pcb-assembly.html PCB Assembly service] from Seeed Studio
+
*An I2C multiplexer is used to connect I2C encoders AS5601 (same ID) to get position feedback for each axis.
* Get all the necessary components according to BOM from latest tag (or the version that you want to build), [https://gitlab.com/librespacefoundation/satnogs/satnogs-rotator-controller/tags Gitlab Tags]
+
*A temperature sensor TC-74 monitoring the temperature inside the controller box in order to protect them from over-heating.
* Assemble the PCB, by soldering the components
+
*There are some spare dev-pins in order to connect other peripherals like IMU or an LCD display.
* Burn the firmware
+
*Pins with integrated RC-Low Pass filter for end-stops connection.
* Using the wiring diagram, connect the controller to the Rotator
+
*Default communication interface is RS-485 but it can also be used as a UART.
* You are ready! Proceed with testing
+
*Using different paths for digital and power (motors) GND.
 +
*Electrolytic capacitor and TVS-diode in PSU input
 +
*Flashed either by using UART or ISP header
  
 +
===Build sequence===
  
==== Assembly Guide ====
+
*Make sure you have a [[SatNOGS Rotator v3|mechanical assembly]] of the rotator constructed and ready
 +
*Buy the PCB.  [https://oshpark.com OshPark],[https://www.seeedstudio.com/fusion_pcb.html Seeed Fusion][https://www.pcbway.com PCBWay.com], [http://dirtypcbs.com DirtyPCBs.com], [https://www.elecrow.com/ Elecrow], [https://www.makerfabs.com Makerfabs] have been used in the past with good results.
 +
**You can order the v2.2 of the board directly using [https://oshpark.com/shared_projects/w0s8d4OJ this OSHPark link] or [https://dirtypcbs.com/store/designer/details/6933/5904/satnogs-v3-motor-controller-zip this DirtyPCBs link].
 +
**You can order the v1.0 of the rotary encoder board using [https://oshpark.com/shared_projects/I3b8SCci this OSHPark link]
 +
**You can order PCB as well as [https://www.seeedstudio.com/prototype-pcb-assembly.html PCB Assembly service] from Seeed Studio
 +
*Get all the necessary components according to BOM from latest tag (or the version that you want to build), [https://gitlab.com/librespacefoundation/satnogs/satnogs-rotator-controller/tags Gitlab Tags]
 +
*Assemble the PCB, by soldering the components
 +
*Burn the firmware
 +
*Using the wiring diagram, connect the controller to the Rotator
 +
*You are ready! Proceed with testing
 +
 
 +
 
 +
====Assembly Guide====
  
 
[[File:H1000_aluminium_enclosure.png|thumb|center|800x420px|alt=|Rotator Controller - Drill holes]]
 
[[File:H1000_aluminium_enclosure.png|thumb|center|800x420px|alt=|Rotator Controller - Drill holes]]
Line 58: Line 60:
 
[[File:Rotator_controller_sheet2.png|thumb|center|800x420px|alt=|Rotator Controller sheet 2/2]]
 
[[File:Rotator_controller_sheet2.png|thumb|center|800x420px|alt=|Rotator Controller sheet 2/2]]
  
==== Microcontroller ====
+
====Microcontroller====
<gallery mode=packed heights="250px">
+
<gallery mode="packed" heights="250px">
 
Uc.png|Microcontroller
 
Uc.png|Microcontroller
 
Uc_orientation.png|Microcontroller Orientation
 
Uc_orientation.png|Microcontroller Orientation
Line 80: Line 82:
  
 
Some examples,  
 
Some examples,  
* [https://community.libre.space/t/v2-controller-board-magic-smoke/1878 SatNOGS Community]
+
 
* [http://westsideelectronics.com/blew-up-a-cheap-arduino-pro-mini-clone/ West Side Electronics]
+
*[https://community.libre.space/t/v2-controller-board-magic-smoke/1878 SatNOGS Community]
 +
*[http://westsideelectronics.com/blew-up-a-cheap-arduino-pro-mini-clone/ West Side Electronics]
  
 
One Solution is not use clones, use [https://www.sparkfun.com/products/11113# Sparkfun's arduiuno pro-mini 5V@16MHz, ATmega328P].  
 
One Solution is not use clones, use [https://www.sparkfun.com/products/11113# Sparkfun's arduiuno pro-mini 5V@16MHz, ATmega328P].  
Line 90: Line 93:
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! -
+
!-
! QTY.
+
!QTY.
! VCC(V)
+
!VCC(V)
! IDD(mA)
+
!IDD(mA)
! Total(mA)
+
!Total(mA)
 
|-
 
|-
| AS5601
+
|AS5601
| 2
+
|2
| 5
+
|5
| 6.5
+
|6.5
| 13  
+
|13
 
|-
 
|-
| PCA9540B
+
|PCA9540B
| 1
+
|1
| 5
+
|5
| 0.1
+
|0.1
| 0.1
+
|0.1
 
|-
 
|-
| SN65HVD485E
+
|SN65HVD485E
| 1
+
|1
| 5
+
|5
| 2
+
|2
| 2
+
|2
 
|-
 
|-
| TC74
+
|TC74
| 1
+
|1
| 5
+
|5
| 0.35
+
|0.35
| 0.35
+
|0.35
 
|-
 
|-
| arduino pro mini
+
|arduino pro mini
| 1
+
|1
| 5
+
|5
| 20
+
|20
| 20
+
|20
 
|-
 
|-
| MC33926
+
|MC33926
| 2
+
|2
| 5
+
|5
| 0.2
+
|0.2
| 0.4
+
|0.4
 
|-
 
|-
| DRV8825
+
|DRV8825
| 2
+
|2
| 5
+
|5
| 0.1
+
|0.1
| 0.2
+
|0.2
 
|}
 
|}
  
 
The LDO MIC5205 guaranteed 150mA output, for Stepper motors ~35-40mA, for DC motors ~35-40mA.
 
The LDO MIC5205 guaranteed 150mA output, for Stepper motors ~35-40mA, for DC motors ~35-40mA.
  
==== Motor Drivers ====
+
====Motor Drivers====
===== Stepper motor driver =====
+
=====Stepper motor driver=====
 
[[File:Stepper_2.png|thumb|320x240px|Stepper motor driver]]
 
[[File:Stepper_2.png|thumb|320x240px|Stepper motor driver]]
 
[[File:Stepper_1.png|thumb|320x240px|Jumpers]]
 
[[File:Stepper_1.png|thumb|320x240px|Jumpers]]
Line 149: Line 152:
 
For the stepper motor driver 2 options have been tested, [https://www.pololu.com/product/2133 DRV8825] and [https://www.pololu.com/product/1182 A4988].
 
For the stepper motor driver 2 options have been tested, [https://www.pololu.com/product/2133 DRV8825] and [https://www.pololu.com/product/1182 A4988].
 
For both options it is necessary to solder:
 
For both options it is necessary to solder:
* 2 electrolytic capacitors C3, C4 100uF
+
 
* 4 single 0.1" male connectors for U3, U4
+
*2 electrolytic capacitors C3, C4 100uF
* 2 fixed terminal blocks P7, P8, Amphenol-VI0421550000G
+
*4 single 0.1" male connectors for U3, U4
* 6 jumpers to adjust the micro-step, '''default option is Full Step'''
+
*2 fixed terminal blocks P7, P8, Amphenol-VI0421550000G
 +
*6 jumpers to adjust the micro-step, '''default option is Full Step'''
 +
 
 
Note: [https://hackaday.com/2016/08/29/how-accurate-is-microstepping-really/ Guide for microstepping selection]
 
Note: [https://hackaday.com/2016/08/29/how-accurate-is-microstepping-really/ Guide for microstepping selection]
 
{| {{table}}
 
{| {{table}}
| align="center" style="background:#f0f0f0;"|'''JP3/JP6'''
+
| align="center" style="background:#f0f0f0;" |'''JP3/JP6'''
| align="center" style="background:#f0f0f0;"|'''JP2/JP5'''
+
| align="center" style="background:#f0f0f0;" |'''JP2/JP5'''
| align="center" style="background:#f0f0f0;"|'''JP1/JP4'''
+
| align="center" style="background:#f0f0f0;" |'''JP1/JP4'''
| align="center" style="background:#f0f0f0;"|'''Microstep Resolution'''
+
| align="center" style="background:#f0f0f0;" |'''Microstep Resolution'''
 
|-
 
|-
| align="center" style="background:#f0f000;"|'''Low''' || align="center" style="background:#f0f000;"|'''Low''' || align="center" style="background:#f0f000;"|'''Low''' || align="center" style="background:#f0f000;"|'''Full step'''
+
| align="center" style="background:#f0f000;" |'''Low'''|| align="center" style="background:#f0f000;" |'''Low'''|| align="center" style="background:#f0f000;" |'''Low'''|| align="center" style="background:#f0f000;" |'''Full step'''
 
|-
 
|-
| align="center"|'''High''' || align="center"|'''Low''' || align="center"|'''Low''' || align="center"|'''Half step'''
+
| align="center" |'''High'''|| align="center" |'''Low'''|| align="center" |'''Low'''|| align="center" |'''Half step'''
 
|-
 
|-
| align="center"|'''Low''' || align="center"|'''High''' || align="center"|'''Low''' || align="center"|'''1/4 step'''
+
| align="center" |'''Low'''|| align="center" |'''High'''|| align="center" |'''Low'''|| align="center" |'''1/4 step'''
 
|-
 
|-
| align="center"|'''High''' || align="center"|'''High''' || align="center"|'''Low''' || align="center"|'''1/8 step'''
+
| align="center" |'''High'''|| align="center" |'''High'''|| align="center" |'''Low'''|| align="center" |'''1/8 step'''
 
|-
 
|-
| align="center"|'''Low''' || align="center"|'''Low''' || align="center"|'''High''' || align="center"|'''1/16 step'''
+
| align="center" |'''Low'''|| align="center" |'''Low'''|| align="center" |'''High'''|| align="center" |'''1/16 step'''
 
|-
 
|-
| align="center"|'''High''' || align="center"|'''Low''' || align="center"|'''High''' || align="center"|'''1/32 step'''
+
| align="center" |'''High'''|| align="center" |'''Low'''|| align="center" |'''High'''|| align="center" |'''1/32 step'''
 
|-
 
|-
| align="center"|'''Low''' || align="center"|'''High''' || align="center"|'''High''' || align="center"|'''1/32 step'''
+
| align="center" |'''Low'''|| align="center" |'''High'''|| align="center" |'''High'''|| align="center" |'''1/32 step'''
 
|-
 
|-
| align="center"|'''High''' || align="center"|'''High''' || align="center"|'''High''' || align="center"|'''1/32 step'''
+
| align="center" |'''High'''|| align="center" |'''High'''|| align="center" |'''High'''|| align="center" |'''1/32 step'''
 
|-
 
|-
 
|}
 
|}
  
* Do'''NOT''' solder 2 resistors 100k, R4, R7 in default configuration (full step)
+
*Do'''NOT''' solder 2 resistors 100k, R4, R7 in default configuration (full step)
* If you have A4988 for stepper motor drive and you want to use micro stepping, when the MS1 is HIGH
+
*If you have A4988 for stepper motor drive and you want to use micro stepping, when the MS1 is HIGH
 +
 
 
it is necessary to solder R4, R7 according to [https://www.pololu.com/product/1201 A4983 Stepper Motor Driver Carrier, Step (and microstep) size].
 
it is necessary to solder R4, R7 according to [https://www.pololu.com/product/1201 A4983 Stepper Motor Driver Carrier, Step (and microstep) size].
  
Line 186: Line 192:
 
Also it is necessary to update the definitions in [https://gitlab.com/librespacefoundation/satnogs/satnogs-rotator-firmware/blob/master/stepper_motor_controller/stepper_motor_controller.ino firmware], according to microstepping selection.
 
Also it is necessary to update the definitions in [https://gitlab.com/librespacefoundation/satnogs/satnogs-rotator-firmware/blob/master/stepper_motor_controller/stepper_motor_controller.ino firmware], according to microstepping selection.
 
Example:
 
Example:
* Step Angle: 1.8 deg
+
 
* Microstep: 1/8 step
+
*Step Angle: 1.8 deg
* Steps per Revolution: (360/1.8)*8 = 1600
+
*Microstep: 1/8 step
 +
*Steps per Revolution: (360/1.8)*8 = 1600
  
 
That means:
 
That means:
Line 202: Line 209:
  
 
The speed = 300steps/s and acceleration = 100steps/s^2 with
 
The speed = 300steps/s and acceleration = 100steps/s^2 with
* 1.8 deg/step stepper motor
+
 
* full step
+
*1.8 deg/step stepper motor
* gear ratio 54
+
*full step
 +
*gear ratio 54
 +
 
 
means speed = 10deg/s and acceleration = 3.3deg/s^2 according to this [https://gitlab.com/librespacefoundation/satnogs/satnogs-rotator-firmware/blob/master/stepper_motor_controller/stepper_motor_controller.ino#L224 function].  
 
means speed = 10deg/s and acceleration = 3.3deg/s^2 according to this [https://gitlab.com/librespacefoundation/satnogs/satnogs-rotator-firmware/blob/master/stepper_motor_controller/stepper_motor_controller.ino#L224 function].  
  
 
Be careful:
 
Be careful:
* [http://reprap.org/wiki/Pololu_stepper_driver_board adjust the current (current limiting) for stepper motors]  
+
 
* add a heat-sink.
+
*[http://reprap.org/wiki/Pololu_stepper_driver_board adjust the current (current limiting) for stepper motors]
* plug the stepper motor drivers
+
*add a heat-sink.
 +
*plug the stepper motor drivers
  
 
The stepper motor that is used, is [https://www.omc-stepperonline.com/hybrid-stepper-motor/nema-17-bipolar-59ncm-84ozin-2a-42x48mm-4wires-w-1m-cable-and-connector-17hs19-2004s1.html Nema 17 Bipolar 59Ncm],  
 
The stepper motor that is used, is [https://www.omc-stepperonline.com/hybrid-stepper-motor/nema-17-bipolar-59ncm-84ozin-2a-42x48mm-4wires-w-1m-cable-and-connector-17hs19-2004s1.html Nema 17 Bipolar 59Ncm],  
* Size: &#9649;42 x 48 mm
 
* Weight: 390 g
 
* Shaft diameter: 5 mm
 
* Step Angle: 1.8 deg
 
* Nominal speed @ 12V: 720deg/s
 
* Rated Current/phase: 2.0A
 
* Stall torque @ 12V: 0.59Nm
 
  
===== DC motor driver =====
+
*Size: &#9649;42 x 48 mm
 +
*Weight: 390 g
 +
*Shaft diameter: 5 mm
 +
*Step Angle: 1.8 deg
 +
*Nominal speed @ 12V: 720deg/s
 +
*Rated Current/phase: 2.0A
 +
*Stall torque @ 12V: 0.59Nm
 +
 
 +
=====DC motor driver=====
 
[[File:Dc_motor_driver.png|thumb|320x240px|DC motor driver]]
 
[[File:Dc_motor_driver.png|thumb|320x240px|DC motor driver]]
  
 
It is necessary to solder:  
 
It is necessary to solder:  
* Solder U6 with 0.1" female connectors as shown in picture
 
* Solder 2 pads in yellow circle by using ~1mm diameter wire
 
* Solder 2 2-pin 3.5mm terminal blocks for 2 DC motors
 
  
The DC motor controller is [https://www.pololu.com/product/1213 Dual MC33926 Motor Driver Carrier ]
+
*Solder U6 with 0.1" female connectors as shown in picture
 +
*Solder 2 pads in yellow circle by using ~1mm diameter wire
 +
*Solder 2 2-pin 3.5mm terminal blocks for 2 DC motors
 +
 
 +
The DC motor controller is [https://www.pololu.com/product/1213 Dual MC33926 Motor Driver Carrier]
  
* Motor driver: MC33926
+
*Motor driver: MC33926
* Motor channels: 2
+
*Motor channels: 2
* Minimum operating voltage: 5V
+
*Minimum operating voltage: 5V
* Maximum operating voltage: 28V
+
*Maximum operating voltage: 28V
* Operating voltage: 12V
+
*Operating voltage: 12V
* Continuous output current per channel: 2.5A
+
*Continuous output current per channel: 2.5A
* Current sense: 0.525 V/A
+
*Current sense: 0.525 V/A
* Maximum PWM frequency: 20 kHz
+
*Maximum PWM frequency: 20 kHz
* Operating PWM frequency: 3921.5Hz (~4kHz)
+
*Operating PWM frequency: 3921.5Hz (~4kHz)
* Minimum logic voltage: 2.5V
+
*Minimum logic voltage: 2.5V
* Operating logic voltage: 5V
+
*Operating logic voltage: 5V
* Maximum logic voltage: 5.5V
+
*Maximum logic voltage: 5.5V
  
 
The DC motor that we use is [https://www.pololu.com/product/1104 50:1 Metal Gearmotor 37Dx54L mm],  
 
The DC motor that we use is [https://www.pololu.com/product/1104 50:1 Metal Gearmotor 37Dx54L mm],  
* Size: 37D x 54L mm
 
* Weight: 195 g
 
* Shaft diameter: 6 mm
 
* Free-run speed @ 12V: 200 rpm
 
* Free-run current @ 12V: 300 mA
 
* Stall current @ 12V: 5000 mA
 
* Stall torque @ 12V: 1.2Nm
 
  
<br clear="all"/>
+
*Size: 37D x 54L mm
 +
*Weight: 195 g
 +
*Shaft diameter: 6 mm
 +
*Free-run speed @ 12V: 200 rpm
 +
*Free-run current @ 12V: 300 mA
 +
*Stall current @ 12V: 5000 mA
 +
*Stall torque @ 12V: 1.2Nm
 +
 
 +
<br clear="all" />
  
==== Communication ====
+
====Communication====
 
Note: For both options the firmware is the same.
 
Note: For both options the firmware is the same.
===== ''UART'' =====
+
=====''UART''=====
 
[[File:Jumper.png|thumb|320x240px|UART Jumpers]]
 
[[File:Jumper.png|thumb|320x240px|UART Jumpers]]
 
[[File:Rs 485.png|thumb|320x240px|Pin Header]]
 
[[File:Rs 485.png|thumb|320x240px|Pin Header]]
  
 
To use UART:
 
To use UART:
* solder JP7 and JP8
 
* solder pin header 0.1" female connector
 
* not solder C1, U2, R18, R19 R9, R8, R1, D3
 
* A is TX and B is RX
 
  
===== ''RS-485'' =====
+
*solder JP7 and JP8
 +
*solder pin header 0.1" female connector
 +
*not solder C1, U2, R18, R19 R9, R8, R1, D3
 +
*A is TX and B is RX
 +
 
 +
=====''RS-485''=====
 
[[File:RS485_solder.png|thumb|320x240px|RS485]]
 
[[File:RS485_solder.png|thumb|320x240px|RS485]]
 
[[File:Missing_rs485_r19.png|thumb|320x240px|RS485]]
 
[[File:Missing_rs485_r19.png|thumb|320x240px|RS485]]
  
 
To use RS485:
 
To use RS485:
* solder pin header 0.1" female connector
+
 
* solder C1, U2, R18, R19 R9, R8, R1, D3
+
*solder pin header 0.1" female connector
* not solder JP7 and JP8
+
*solder C1, U2, R18, R19 R9, R8, R1, D3
 +
*not solder JP7 and JP8
  
 
If you use PCB without R19 footprint, you can add it in arduino pro-mini UART header.
 
If you use PCB without R19 footprint, you can add it in arduino pro-mini UART header.
  
<br clear="all"/>
+
<br clear="all" />
  
==== Power Supply ====
+
====Power Supply====
 
[[File:Psu.png|thumb|320x240px|Power Supply]]
 
[[File:Psu.png|thumb|320x240px|Power Supply]]
  
Line 291: Line 306:
  
  
<br clear="all"/>
+
<br clear="all" />
  
==== Endstops ====
+
====Endstops====
 
[[File:Endstop_part.png|thumb|320x240px|Endstop Specification]]
 
[[File:Endstop_part.png|thumb|320x240px|Endstop Specification]]
 
[[File:Endstop.jpg|thumb|320x240px|Endstop]]
 
[[File:Endstop.jpg|thumb|320x240px|Endstop]]
Line 303: Line 318:
  
 
Mechanical endstops are connected to
 
Mechanical endstops are connected to
* SW1 and GND for azimuth axis  
+
 
* SW2 and GND for elevation axis
+
*SW1 and GND for azimuth axis
 +
*SW2 and GND for elevation axis
  
  
<br clear="all"/>
+
<br clear="all" />
  
==== Encoders ====
+
====Encoders====
 
Source files: [https://gitlab.com/librespacefoundation/satnogs/satnogs-rotator-controller-encoder satnogs-rotator-controller-encoder - GitLab]
 
Source files: [https://gitlab.com/librespacefoundation/satnogs/satnogs-rotator-controller-encoder satnogs-rotator-controller-encoder - GitLab]
Firmware: [https://gitlab.com/librespacefoundation/satnogs/satnogs-rotator-firmware/blob/master/libraries/as5601.h satnogs-rotator-firmware - GitLab]
+
Firmware: [https://gitlab.com/librespacefoundation/satnogs/satnogs-rotator-firmware/blob/master/libraries/as5601.h satnogs-rotator-firmware - GitLab]
  
 
For stepper motor setup is optional (AS5601 encoder).
 
For stepper motor setup is optional (AS5601 encoder).
Line 322: Line 338:
  
  
<br clear="all"/>
+
<br clear="all" />
  
=== Firmware and Pin Assignments ===
+
===Firmware and Pin Assignments===
  
===== Firmware =====
+
=====Firmware=====
  
 
[https://gitlab.com/librespacefoundation/satnogs/satnogs-rotator-firmware For stepper motors] <br>
 
[https://gitlab.com/librespacefoundation/satnogs/satnogs-rotator-firmware For stepper motors] <br>
[https://gitlab.com/librespacefoundation/satnogs/satnogs-rotator-firmware For DC motors, thanks to ] [https://github.com/ph4as ph4as]
+
[https://gitlab.com/librespacefoundation/satnogs/satnogs-rotator-firmware For DC motors, thanks to] [https://github.com/ph4as ph4as]
  
===== Pins Configuration =====
+
=====Pins Configuration=====
 
This configuration is from the latest release in [https://gitlab.com/librespacefoundation/satnogs/satnogs-rotator-controller/tags Rotator Controller repository]  
 
This configuration is from the latest release in [https://gitlab.com/librespacefoundation/satnogs/satnogs-rotator-controller/tags Rotator Controller repository]  
  
* M1IN1 10, Step or PWM1
+
*M1IN1 10, Step or PWM1
* M1IN2 9, Direction or PWM2
+
*M1IN2 9, Direction or PWM2
* M1SF  7, Status flag
+
*M1SF  7, Status flag
* M1FB  A1, Load measurment
+
*M1FB  A1, Load measurment
  
* M2IN1 11, Step or PWM1
+
*M2IN1 11, Step or PWM1
* M2IN2 3, Direction or PWM2
+
*M2IN2 3, Direction or PWM2
* M2SF  6, Status flag
+
*M2SF  6, Status flag
* M2FB  A0, Load measurment
+
*M2FB  A0, Load measurment
  
* MOTOR_EN 8, Enable/Disable motors
+
*MOTOR_EN 8, Enable/Disable motors
  
* SW1 5, Endstop for axis 1
+
*SW1 5, Endstop for axis 1
* SW2 4, Endstop for axis 2
+
*SW2 4, Endstop for axis 2
  
* RS485_DIR 2, RS485 Half Duplex direction pin
+
*RS485_DIR 2, RS485 Half Duplex direction pin
  
* SDA_PIN 3, Data I2C pin
+
*SDA_PIN 3, Data I2C pin
* SCL_PIN 4, Clock I2C pin
+
*SCL_PIN 4, Clock I2C pin
  
* PIN12 12, Digital output pin
+
*PIN12 12, Digital output pin
* PIN13 13, Digital output pin
+
*PIN13 13, Digital output pin
* A2    A2, Analog input pin
+
*A2    A2, Analog input pin
* A3    A3, Analog input pin
+
*A3    A3, Analog input pin
  
<br clear="all"/>
+
<br clear="all" />
  
=== Pre-Flight Check ===
+
===Pre-Flight Check===
  
 
[[File:Pcb_testing_points.png|thumb|center|800x420px|alt=|Testing Points]]
 
[[File:Pcb_testing_points.png|thumb|center|800x420px|alt=|Testing Points]]
  
* Power your PCB with 48VDC, without plug-in arduino pro-mini and motor drivers, measure with multimeter the voltage in point 1. Expected voltage +12V (reference to GND).
+
*Power your PCB with 48VDC, without plug-in arduino pro-mini and motor drivers, measure with multimeter the voltage in point 1. Expected voltage +12V (reference to GND).
* Plug arduino pro-mini and measure with multimeter the voltage in point 2. Expected voltage +5V (reference to GND).
+
*Plug arduino pro-mini and measure with multimeter the voltage in point 2. Expected voltage +5V (reference to GND).
* Plug motor drivers (for steppermotors ensure the current is adjusted properly)
+
*Plug motor drivers (for steppermotors ensure the current is adjusted properly)
* Connect all peripheral devices like motors, sensors, endstops
+
*Connect all peripheral devices like motors, sensors, endstops
  
 
If the two first steps fail, something is wrong (maybe there is a short circuit) in PCB. Check the connections with a multimeter.
 
If the two first steps fail, something is wrong (maybe there is a short circuit) in PCB. Check the connections with a multimeter.
Line 374: Line 390:
 
Then the board is ready to run the firmware, [https://gitlab.com/librespacefoundation/satnogs/satnogs-rotator-firmware/blob/master/README.md satnogs-rotator-firmware].
 
Then the board is ready to run the firmware, [https://gitlab.com/librespacefoundation/satnogs/satnogs-rotator-firmware/blob/master/README.md satnogs-rotator-firmware].
  
<br clear="all"/>
+
<br clear="all" />
  
=== Troubleshooting hints ===
+
===Troubleshooting hints===
  
 
As soon as the board is powered up or reset, it will auto-home, on first build you can trigger a reset multiple time or move the homing ring to get it "home".
 
As soon as the board is powered up or reset, it will auto-home, on first build you can trigger a reset multiple time or move the homing ring to get it "home".
Line 384: Line 400:
 
Here is some commands (took from [https://gitlab.com/librespacefoundation/satnogs/satnogs-rotator-firmware#easycomm-implemantation]) you can issue in the terminal emulator of your choice to test things:
 
Here is some commands (took from [https://gitlab.com/librespacefoundation/satnogs/satnogs-rotator-firmware#easycomm-implemantation]) you can issue in the terminal emulator of your choice to test things:
  
* '''VE''', it will returns something like "SatNOGS-v2.0"
+
*'''VE''', it will returns something like "SatNOGS-v2.0"
* '''RESET''', move to home position
+
*'''RESET''', move to home position
* '''AZxx''', '''ELxx''', move to specified position (number)
+
*'''AZxx''', '''ELxx''', move to specified position (number)
  
 
Nothing moves ? Look at the status and error register :
 
Nothing moves ? Look at the status and error register :
  
* '''GS''', status register : 1 idle, 2 moving, 4 pointing, 8 error
+
*'''GS''', status register : 1 idle, 2 moving, 4 pointing, 8 error
* '''GE''', error register : 1 no error, 2 sensor, 4 homing, 8 motor, 12 over temperature, 16 watch dog timer interrupt
+
*'''GE''', error register : 1 no error, 2 sensor, 4 homing, 8 motor, 12 over temperature, 16 watch dog timer interrupt
  
 
By example, at first start, you might be in '''GS8''' and '''GE4''' until you get a good homing position for the rotator to start working.
 
By example, at first start, you might be in '''GS8''' and '''GE4''' until you get a good homing position for the rotator to start working.
Line 397: Line 413:
 
If you using an unreleased version of the board (the board that has fuse holder), in [https://community.libre.space/t/stepper-motor-issue/2438/2 community post] you can find pin configuration file.
 
If you using an unreleased version of the board (the board that has fuse holder), in [https://community.libre.space/t/stepper-motor-issue/2438/2 community post] you can find pin configuration file.
  
<br clear="all"/>
+
<br clear="all" />
  
== Rotator Controller v1 ==
+
==Rotator Controller v1==
  
<br clear="all"/>
+
<br clear="all" />

Revision as of 07:49, 28 November 2019

SatNOGS Rotator Controller
SatNOGS Rotator Controller
Information
Type: Rotator Controller for SatNOGS rotator.
Cost: 60-80€
Release Information
Status: Working
Latest Release: [v2.2 -]
Repository: [satnogs-rotator-controller - GitLab

satnogs-rotator-controller-encoder - GitLab]

Documentation: SatNOGS wiki
 


Intro

SatNOGS Rotator Controller refers to the set of electronics designed to operate a SatNOGS Rotator. There have been multiple iterations of the rotator controller design, but the modularity of the approach enables operations between different versions of the controller and the rotator. Since the start of 2016, the rotator controller design is able to facilitate a DC-motors or stepper-motors rotator design. We intend to keep this modularity for the electronics and firmware design to facilitate the variety of build by our community.

Rotator Controller v2

The PCB are tested in this ground station.

Features

  • It is designed to fit the entire electronics needed to control rotator in Euroboard 80x50 mm.
  • Main micro-controller is Arduino pro-mini, SparkFun's Arduino Pro Mini 328 dev-board with ATmega328p.
  • The modular design includes plug-in either DRV8825/A4988 or DC motor drivers (MC33926).
  • The power supply in embed in the same board in contrast with previous version.
  • Filtered power supply of micro controller.
  • An I2C multiplexer is used to connect I2C encoders AS5601 (same ID) to get position feedback for each axis.
  • A temperature sensor TC-74 monitoring the temperature inside the controller box in order to protect them from over-heating.
  • There are some spare dev-pins in order to connect other peripherals like IMU or an LCD display.
  • Pins with integrated RC-Low Pass filter for end-stops connection.
  • Default communication interface is RS-485 but it can also be used as a UART.
  • Using different paths for digital and power (motors) GND.
  • Electrolytic capacitor and TVS-diode in PSU input
  • Flashed either by using UART or ISP header

Build sequence


Assembly Guide

Rotator Controller - Drill holes
Rotator Controller sheet 1/2
Rotator Controller sheet 2/2

Microcontroller

The main micro-controller of the board is arduino pro-mini 5V@16MHz, ATmega328P. The +5V of the controller are produced from arduino pro-mini. Some clones do not use correct parts in LDO, like the original one, with result, when it powers up with +12V, burned.

Some examples,

One Solution is not use clones, use Sparkfun's arduiuno pro-mini 5V@16MHz, ATmega328P. The second solution is to add a LDO, like MIC5205 (maybe in a new revision of v2).

The power consumption in +5V is:

- QTY. VCC(V) IDD(mA) Total(mA)
AS5601 2 5 6.5 13
PCA9540B 1 5 0.1 0.1
SN65HVD485E 1 5 2 2
TC74 1 5 0.35 0.35
arduino pro mini 1 5 20 20
MC33926 2 5 0.2 0.4
DRV8825 2 5 0.1 0.2

The LDO MIC5205 guaranteed 150mA output, for Stepper motors ~35-40mA, for DC motors ~35-40mA.

Motor Drivers

Stepper motor driver
Stepper motor driver
Jumpers
Orientation

For the stepper motor driver 2 options have been tested, DRV8825 and A4988. For both options it is necessary to solder:

  • 2 electrolytic capacitors C3, C4 100uF
  • 4 single 0.1" male connectors for U3, U4
  • 2 fixed terminal blocks P7, P8, Amphenol-VI0421550000G
  • 6 jumpers to adjust the micro-step, default option is Full Step

Note: Guide for microstepping selection

JP3/JP6 JP2/JP5 JP1/JP4 Microstep Resolution
Low Low Low Full step
High Low Low Half step
Low High Low 1/4 step
High High Low 1/8 step
Low Low High 1/16 step
High Low High 1/32 step
Low High High 1/32 step
High High High 1/32 step
  • DoNOT solder 2 resistors 100k, R4, R7 in default configuration (full step)
  • If you have A4988 for stepper motor drive and you want to use micro stepping, when the MS1 is HIGH

it is necessary to solder R4, R7 according to A4983 Stepper Motor Driver Carrier, Step (and microstep) size.

In case of DRV8825, all pins MS1, MS2, MS3 have internal pull-up resistor.

Also it is necessary to update the definitions in firmware, according to microstepping selection. Example:

  • Step Angle: 1.8 deg
  • Microstep: 1/8 step
  • Steps per Revolution: (360/1.8)*8 = 1600

That means:

#define MICROSTEP          8     ///< Set Microstep
#define MAX_SPEED          6400  ///< In steps/s, consider the microstep
#define MAX_ACCELERATION   1600  ///< In steps/s^2, consider the microstep
#define SPR                1600L  ///< Step Per Revolution, consider the microstep

It is necessary to change the maximum speed and acceleration according to new SPR.

An example:

The speed = 300steps/s and acceleration = 100steps/s^2 with

  • 1.8 deg/step stepper motor
  • full step
  • gear ratio 54

means speed = 10deg/s and acceleration = 3.3deg/s^2 according to this function.

Be careful:

The stepper motor that is used, is Nema 17 Bipolar 59Ncm,

  • Size: ▱42 x 48 mm
  • Weight: 390 g
  • Shaft diameter: 5 mm
  • Step Angle: 1.8 deg
  • Nominal speed @ 12V: 720deg/s
  • Rated Current/phase: 2.0A
  • Stall torque @ 12V: 0.59Nm
DC motor driver
DC motor driver

It is necessary to solder:

  • Solder U6 with 0.1" female connectors as shown in picture
  • Solder 2 pads in yellow circle by using ~1mm diameter wire
  • Solder 2 2-pin 3.5mm terminal blocks for 2 DC motors

The DC motor controller is Dual MC33926 Motor Driver Carrier

  • Motor driver: MC33926
  • Motor channels: 2
  • Minimum operating voltage: 5V
  • Maximum operating voltage: 28V
  • Operating voltage: 12V
  • Continuous output current per channel: 2.5A
  • Current sense: 0.525 V/A
  • Maximum PWM frequency: 20 kHz
  • Operating PWM frequency: 3921.5Hz (~4kHz)
  • Minimum logic voltage: 2.5V
  • Operating logic voltage: 5V
  • Maximum logic voltage: 5.5V

The DC motor that we use is 50:1 Metal Gearmotor 37Dx54L mm,

  • Size: 37D x 54L mm
  • Weight: 195 g
  • Shaft diameter: 6 mm
  • Free-run speed @ 12V: 200 rpm
  • Free-run current @ 12V: 300 mA
  • Stall current @ 12V: 5000 mA
  • Stall torque @ 12V: 1.2Nm


Communication

Note: For both options the firmware is the same.

UART
UART Jumpers
Pin Header

To use UART:

  • solder JP7 and JP8
  • solder pin header 0.1" female connector
  • not solder C1, U2, R18, R19 R9, R8, R1, D3
  • A is TX and B is RX
RS-485
RS485
RS485

To use RS485:

  • solder pin header 0.1" female connector
  • solder C1, U2, R18, R19 R9, R8, R1, D3
  • not solder JP7 and JP8

If you use PCB without R19 footprint, you can add it in arduino pro-mini UART header.


Power Supply

Power Supply

Recommended power supply for rotator controller is: 48V @ 1A DC. A good choice is the MEAN WELL LRS-50-48

The switching power supply could get as input voltage, 19-60V DC.
In different input voltages, must be change the components like D4 and F1.
Default PCB components works at 48VDC.



Endstops

Endstop Specification
Endstop

In reference design, mechanical endstops (the P/N SS0505 of endstop is specified in satnogs rotator BOM) , are used.

The controller has the capability to accommodate optical or magnetic endstop which connected to P2 header with silkscreen, SW1, SW2, +5V and GND.

Mechanical endstops are connected to

  • SW1 and GND for azimuth axis
  • SW2 and GND for elevation axis



Encoders

Source files: satnogs-rotator-controller-encoder - GitLab Firmware: satnogs-rotator-firmware - GitLab

For stepper motor setup is optional (AS5601 encoder).

For DC motor setup is necessary.


Rotary Encoder sheet 1/2
Rotary Encoder sheet 2/2



Firmware and Pin Assignments

Firmware

For stepper motors
For DC motors, thanks to ph4as

Pins Configuration

This configuration is from the latest release in Rotator Controller repository

  • M1IN1 10, Step or PWM1
  • M1IN2 9, Direction or PWM2
  • M1SF 7, Status flag
  • M1FB A1, Load measurment
  • M2IN1 11, Step or PWM1
  • M2IN2 3, Direction or PWM2
  • M2SF 6, Status flag
  • M2FB A0, Load measurment
  • MOTOR_EN 8, Enable/Disable motors
  • SW1 5, Endstop for axis 1
  • SW2 4, Endstop for axis 2
  • RS485_DIR 2, RS485 Half Duplex direction pin
  • SDA_PIN 3, Data I2C pin
  • SCL_PIN 4, Clock I2C pin
  • PIN12 12, Digital output pin
  • PIN13 13, Digital output pin
  • A2 A2, Analog input pin
  • A3 A3, Analog input pin


Pre-Flight Check

Testing Points
  • Power your PCB with 48VDC, without plug-in arduino pro-mini and motor drivers, measure with multimeter the voltage in point 1. Expected voltage +12V (reference to GND).
  • Plug arduino pro-mini and measure with multimeter the voltage in point 2. Expected voltage +5V (reference to GND).
  • Plug motor drivers (for steppermotors ensure the current is adjusted properly)
  • Connect all peripheral devices like motors, sensors, endstops

If the two first steps fail, something is wrong (maybe there is a short circuit) in PCB. Check the connections with a multimeter.

Then the board is ready to run the firmware, satnogs-rotator-firmware.


Troubleshooting hints

As soon as the board is powered up or reset, it will auto-home, on first build you can trigger a reset multiple time or move the homing ring to get it "home".

Connecting directly to the Arduino pro-mini you will need to use 19200 bauds and "newline" line ending.

Here is some commands (took from [1]) you can issue in the terminal emulator of your choice to test things:

  • VE, it will returns something like "SatNOGS-v2.0"
  • RESET, move to home position
  • AZxx, ELxx, move to specified position (number)

Nothing moves ? Look at the status and error register :

  • GS, status register : 1 idle, 2 moving, 4 pointing, 8 error
  • GE, error register : 1 no error, 2 sensor, 4 homing, 8 motor, 12 over temperature, 16 watch dog timer interrupt

By example, at first start, you might be in GS8 and GE4 until you get a good homing position for the rotator to start working.

If you using an unreleased version of the board (the board that has fuse holder), in community post you can find pin configuration file.


Rotator Controller v1