KIT | KIT-Bibliothek | Impressum | Datenschutz

Modular linear experiment stage

Seiberlich, Mervin ORCID iD icon 1; Falis, Konstantinos; Hernandez Sosa, Gerardo ORCID iD icon 2
1 Lichttechnisches Institut (LTI), Karlsruher Institut für Technologie (KIT)
2 Institut für Mikrostrukturtechnik (IMT), Karlsruher Institut für Technologie (KIT)

Abstract (englisch):

This files contain the design of an modular linear stage for optoelectronic measurements as well as example software for measurements. It is build from open hardware parts (uStepperS and C-Beam Linear Actuator), commercial available parts, a designed shield for the hardware control as well as custom made laser-cut parts. The composition, the designed hardware and software is licenced under a free GPLv3 licence (see bottom of this page).


Zugehörige Institution(en) am KIT Institut für Mikrostrukturtechnik (IMT)
Lichttechnisches Institut (LTI)
Publikationstyp Forschungsdaten
Publikationsdatum 12.12.2023
Erstellungsdatum 01.01.2022 - 01.12.2023
Identifikator DOI: 10.35097/1839
KITopen-ID: 1000165426
Lizenz GPLv3 - GNU General Public License or (at your option) any later version
Externe Relationen Forschungsdaten/Software
Forschungsdaten/Software
Schlagwörter RSE, hardware, modular, optical setup, mechanical setup, lab equipment
Liesmich

Modular linear experiment stage

This files contain the design of an modular linear stage for optoelectronic measurements as well as example software for measurements. It is build from open hardware parts (uStepperS and C-Beam Linear Actuator), commercial available parts, a designed shield for the hardware control as well as custom made laser-cut parts. The composition, the designed hardware and software is licenced under a free GPLv3 licence (see bottom of this page).

Licences of the used components:

  • C-Beam Linear Actuator OpenBuilds®, LLC design work(s) shared Open Source under the CC BY-SA 4.0 License Terms and Conditions
  • uStepperS by ON Development is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

modular_setup

Controle software for the 'uStepper S'

This module is used with the 'uStepper S' and the custom made shield for distance measuring with angle dependancy.

Usage

You can use the setup via the manual rotary encoder switch or via the serial commant (use arduino-GUI and serial window or see python example)

--- Proximity reference setup ------------------------------------

Manual mode:
    Turn the knob to change the distance / angle");
    Click once to change the step size");
    Double-click to change between distance and rotation");
    Press > 1 second to set the distance / angle to 0");

PC mode (via serial):
    Type the distance (mm), speed (mm/s) and angle (°), seperated by a commata");
    E.g. '20.0,40, 15'  means 20.00 mm (v=40mm/s for distance) and 15.00°"

------------------------------------

Somehow there is a bug with my board/software and setting the speed via stepper.setRPM(rpm) inside the code does not work properly. So do not expect the speed to be exact.

Installation

uStepper S

The uStepper is programmed like an arduino bord with the Arduino IDE: https://www.arduino.cc/en/Main.Software

To install the uStepper into the arduino IDE follow: https://github.com/uStepper/uStepperS

Rotary encoder for angle motor

To make the rotary encoder working, you may need to fix the Encoder.h (\Arduino\libraries\Encoder\utility\interrupt_pins) library by adding the PB version of the microcontroller __AVR_ATmega328PB__ to the list:

// Arduino Uno, Duemilanove, Diecimila, LilyPad, Mini, Fio, uStepperS, etc...
#elif defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328PB__) || defined(__AVR_ATmega168__) || defined(__AVR_ATmega8__)
  #define CORE_NUM_INTERRUPT 2
  #define CORE_INT0_PIN  2
  #define CORE_INT1_PIN  3

Interrupts

Also on the uStepperS board the interrupts do not work. A workaround is to use Pin Change Interrupts. They are different than normal Interrupts ("might be a tiny bit slower and not that reliable because of that detection overhead (talking about micro seconds)") but there is an arduino library.
→ seems to work with both motors and rotary encoder at the same time !

Distplay

To get the display running with the uStepperS, we need to change its lib rgb_lcd.h:

There is some wired behavior when using the serial of the uStepperS (ATmega328PB). Plugging the Grove-LCD RGB Backlight display in pins A1 (SDA0) and A2 (!!! this pin is changed [from A0 → A2 on my bord] but SCL0 is still there) the example code works. But pin D7 (SCL1) and D8 (SDA1) are somehow always HIGH which causes problems (not enough pins, strange behavior when uploading code with INX from ULN2003 driver on D7 &D8 ).
To circumvent this behavior the display should be attached to SCL1 /SDA1. This is not possible by default due to missing firmware. Therefore we need to add support for the microcontroller:
Sources:

  1. Go to the folder \Arduino\libraries and copy the folder \Grove_-_LCD_RGBBacklight and rename it to \Grove-_LCD_RGB_Backlight_Serial1
  2. In the Folder \Grove_-_LCD_RGB_Backlight_Serial1 rename the files rgb_lcd.cpp and rgb_lcd.h to rgb_lcd1.cpp and rgb_lcd1.h
  3. Open the file rgb_lcd1.cpp with an text editor and change the lines
    #include <Wire.h> to #include <Wire1.h>
    #include "rgb_lcd.h" to #include "rgb_lcd1.h"
  4. Also add the line extern TwoWire1 Wire1; // insert this line is the modification to include Wire1 (SDA1 / SCL1) .…
  5. Then press ‘Ctrl+h’ to replace all function calls starting with Wire.xxx() with Wire1.xxx()
    ! Make sure to not replace the lines added above a second time
  6. From now on in the arduino code always include #include <Wire1.h> and #include "rgb_lcd1.h"

Design shield for µStepperS

In order to also control a 28BYJ-48 stepper motor (e.g. for angle dependent reflectance measurements) or custom components that need high currents (e.g. high-power LEDs) a large part of the project was to design a shield.

shield

Software: https://www.kicad.org/

Further reading:

💌️ License

Copyright (C) 2022-2023 Mervin Seiberlich and Konstantinos Falis

Authors - Mervin Seiberlich, Konstantinos Falis

The Modular linear experiment stage is free hardware and software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

experiment_evaluation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with experiment_evaluation. If not, see https://www.gnu.org/licenses/.

Art der Forschungsdaten Software
KIT – Die Forschungsuniversität in der Helmholtz-Gemeinschaft
KITopen Landing Page