Commit 47ecf73e authored by Pierre Korysko's avatar Pierre Korysko
Browse files

Merge branch 'DocsAndLicense' into 'master'

Docs and license

See merge request !19
parents c38cc8b1 4db2b538
......@@ -13,6 +13,13 @@
* Inspired by PositionGaugeServer, also in use at CLEAR.
*/
/*
* This file is part of 4DrobotServer.
* 4DrobotServer is free 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.
* 4DrobotServer 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 4DrobotServer. If not, see <https://www.gnu.org/licenses/>.
*/
#include <Arduino.h>
#include <SPI.h>
......
#ifndef __4DrobotServer_config_h__
#define __4DrobotServer_config_h__
/*
* This file is part of 4DrobotServer.
* 4DrobotServer is free 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.
* 4DrobotServer 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 4DrobotServer. If not, see <https://www.gnu.org/licenses/>.
*/
//Note: This isn't a proper header file, as it contains implementations (variable = value).
// It can therefore only be included in one compilation unit.
// This is OK as long as we stay within Arduino studio and only use .ino files for code,
......
#ifndef __4DrobotServer_globalVars_h__
#define __4DrobotServer_globalVars_h__
/*
* This file is part of 4DrobotServer.
* 4DrobotServer is free 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.
* 4DrobotServer 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 4DrobotServer. If not, see <https://www.gnu.org/licenses/>.
*/
//Note: This isn't a proper header file, as it contains implementations (variable = value).
// It can therefore only be included in one compilation unit.
// This is OK as long as we stay within Arduino studio and only use .ino files for code,
......
/*
* This file is part of 4DrobotServer.
* 4DrobotServer is free 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.
* 4DrobotServer 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 4DrobotServer. If not, see <https://www.gnu.org/licenses/>.
*/
void setup_networkIO() {
//Network setup
Serial.print("Starting networking...\n");
......
# C-robot network protocol
To connect:
use NetCat (nc) on port 23:
nc 192.168.1.31 23
Telnet can work too, however it often tries to negotiate things.
## General rules about input and output:
* Input is treated line by line
* Once booted, TCP clients and Serial is treated identically.
* Input from everyone is buffered separately.
When buffer contains a one or more newlines (`\n` or `\r` or a combination of these),
these lines are processed.
* If an input buffer becomes full, the content's of that buffer is discarded,
as there isn't space for a newline to trigger parsing and draining.
The content of the buffer is NOT inspected, so valid command lines
in the beginning of the buffer may be ignored!
Note: The buffer is protected from overrun.
* Input lines are echoed back to everyone, with a `> ` prepended.
* Results are sent to everyone, with a `< ` prepended.
* Client-specific errors and warnings are sent to a single client/serial,
with a `@ ` prepended.
* When ready for input from a client/Serial, a `$` is sent.
* Everything sent is terminated by a `\n`, including `$`.
## Automatic status messages (tree):
* INFO : Information about robot status
* `BUFFER` (`@` only): Something about *this* input buffer
* `NULL`: The buffer of this connection contained a `\0` before the end.
* `FULL`: The buffer of this connection was full.
* `UNTERMINATED`: The buffer of this connection did not have a `\0` at the end.
This is an internal error and should never happen.
* `RESET`: The buffer was reset, throwing away anything in it that hasn't been acknowledged.
* `CONN`: Something to do with the connection of a client
* `MAKE: <IP> ON #<SLOT>`: A new client connected
* `BREAK: <IP> ON #<SLOT>`: A client disconnected
## Input commands (tree) and responses:
* `HELP`: Print possible commands
* `GET`: Request information about the status of something.
* `TEMP`: Get the temperature sensor data.
Output (including `< `), one line pr. sensor:
* `< TEMP sensorID TEMP C`
\ No newline at end of file
# Readme for the Arduino code
To connect:
use NetCat (nc) on port 23:
nc 192.168.1.31 23
Telnet can work too, however it often tries to negotiate things.
The Arduino code, meant to be edited and uploaded using the standard Arduino IDE, is found here.
The authors of the code have always used a Linux machine for this.
An Arduino MEGA is required due to the I/O and memory requirements of the code.
The code is split into several files.
A user should only need to change the file `4DrobotServer_config.h`; all configuration flags are set there.
This includes things such as axis assignment and orientation, pin configuration, IP/DHCP configuration, and many other things.
Note that to operate safely (without loosing calibration over time) the Arduino should know the stop-to-stop length of the stepper rails.
## General rules about input and output:
The Arduino program is written as a very simple OS, which runs several programs in a round-robin way:
* Communication over Serial and Ethernet
* Control of servos (filter and grabber)
* Control of steppers (X, Y, and Z)
* Readout of thermometers
* Housekeeping
* Input is treated line by line
* Once booted, TCP clients and Serial is treated identically.
* Input from everyone is buffered separately.
When buffer contains a one or more newlines (`\n` or `\r` or a combination of these),
these lines are processed.
* If an input buffer becomes full, the content's of that buffer is discarded,
as there isn't space for a newline to trigger parsing and draining.
The content of the buffer is NOT inspected, so valid command lines
in the beginning of the buffer may be ignored!
Note: The buffer is protected from overrun.
* Input lines are echoed back to everyone, with a `> ` prepended.
* Results are sent to everyone, with a `< ` prepended.
* Client-specific errors and warnings are sent to a single client/serial,
with a `@ ` prepended.
* When ready for input from a client/Serial, a `$` is sent.
* Everything sent is terminated by a `\n`, including `$`.
The programs communicate and keep track of their states using global and persistent variables defined in `4DrobotServer_globalVars.h`.
The stepper control program supports acceleration, allowing for reliable and relatively high-speed operation of the stepper motors.
## Automatic status messages (tree):
* INFO : Information about robot status
* `BUFFER` (`@` only): Something about *this* input buffer
* `NULL`: The buffer of this connection contained a `\0` before the end.
* `FULL`: The buffer of this connection was full.
* `UNTERMINATED`: The buffer of this connection did not have a `\0` at the end.
This is an internal error and should never happen.
* `RESET`: The buffer was reset, throwing away anything in it that hasn't been acknowledged.
* `CONN`: Something to do with the connection of a client
* `MAKE: <IP> ON #<SLOT>`: A new client connected
* `BREAK: <IP> ON #<SLOT>`: A client disconnected
For information about the text-based command protol used, see [Protocol](Protocol.md).
This command protocol is accessible both over Ethernet and USB-serial, supporting concurrent connections from several users.
In general, the `HELP` command is very helpful.
## Input commands (tree) and responses:
* `HELP`: Print possible commands
* `GET`: Request information about the status of something.
* `TEMP`: Get the temperature sensor data.
Output (including `< `), one line pr. sensor:
* `< TEMP sensorID TEMP C`
\ No newline at end of file
Libraries in use, installable through Arduino IDE:
* [Ethernet](https://www.arduino.cc/reference/en/libraries/ethernet/) - used to interface the Ethernet shield
* [Dallas Temperature](https://www.arduino.cc/reference/en/libraries/dallastemperature/) - used to read the thermometers
* [OneWire](https://www.arduino.cc/reference/en/libraries/onewire/) - used by the the Dallas Temperature library
* [Servo](https://www.arduino.cc/reference/en/libraries/servo/) - For controlling servomotors (optional)
* [Adafruit TiCoServo](https://www.arduino.cc/reference/en/libraries/adafruit-ticoservo/) - For controlling servomotiors (optional)
Note that *at least one* of the two servo libraries must be available.
The TiCoServo library is strongly reccomended, as it avoids "jittering" of the servomotors due to the OneWire library disabling interrupts, it might also reduce waveform jitter for the stepper motors.
/*
* This file is part of 4DrobotServer.
* 4DrobotServer is free 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.
* 4DrobotServer 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 4DrobotServer. If not, see <https://www.gnu.org/licenses/>.
*/
void setup_temperatures() {
//Initialize temperature sensors to something nonsensical
for (size_t i=0; i<temp_numSensors; i++) {
......
/*
* This file is part of 4DrobotServer.
* 4DrobotServer is free 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.
* 4DrobotServer 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 4DrobotServer. If not, see <https://www.gnu.org/licenses/>.
*/
void setup_servo() {
//Sanity check grabber config
if (not (grabber_open >= grabber_min && grabber_open <= grabber_max)) {
......
/*
* This file is part of 4DrobotServer.
* 4DrobotServer is free 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.
* 4DrobotServer 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 4DrobotServer. If not, see <https://www.gnu.org/licenses/>.
*/
void setup_stepper() {
// Set pin modes
for (size_t i=0; i<stepper_numAxis; i++) {
......
# Gripper
The gripper claw used for the C-Robot is a 3D printed claw that is used to lift and place the sample holders, and to hold it in place during irradiation.
It is driven by a single servomotor, which is controlled by the Arduino.
![](Grabber_view_small.png)
It is derived from a project hosted at [Cults3D](https://cults3d.com/en/3d-model/gadget/gripper-for-6dof-robot-arm) by [Robolab19](https://cults3d.com/en/users/robolab19/creations).
On the project page, it is described as being license as [CC-BY 3.0](https://creativecommons.org/licenses/by/3.0/), meaning that it is free to use as long as the original author is attributed, and that access to the work is not restricted by legal terms or technological limits.
The original author has worked on the claw in a git repository at [GitHub](https://github.com/RoboLabHub/RobotArm_v1.0), a copy of this repository at version ef02b545051547ed48d7939e2ff3d6d256c5ad98 is provided in the subfolder [RobotArm_v1.0](RobotArm_v1.0/) (downloaded 25/5/2022).
Here, the individual parts of the grabber itself can be found in the subfolder [RobotArm_v1.0/STL/Gripper](RobotArm_v1.0/STL/Gripper/).
This repository is described as being licensed with a [MIT license](RobotArm_v1.0/LICENSE), which is even less restrictive than CC-BY 3.0.
A copy of the merged "overview" STL files provided by Antonio Gilardi are found in the subfolder [Antonio](Antonio/).
![A 3D rendering of the grabber, in perspective mode](Antonio/GRIPPER_OVERVIEW.png)
Post-print modifications to the claw include adding half-cylinders on the gripping tips which interface with divots on the sample holders, so that the grip reproducibility is increased.
The .STL files can be opened using [FreeCAD](https://www.freecadweb.org/).
\ No newline at end of file
# Auto detect text files and perform LF normalization
* text=auto
MIT License
Copyright (c) 2020 RoboLab
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
# RobotArm_v1.0
3D printed 6DOF Robot Arm v1.0 on smart servos (LewanSoul LX-16A)
https://youtu.be/DGtH2U7AEzQ
https://www.thingiverse.com/thing:4223195<br/>
https://www.thingiverse.com/thing:4223431<br/>
https://www.thingiverse.com/thing:4223655<br/>
https://www.thingiverse.com/thing:4223687<br/>
The Robot Arm upgrades for increasing the accuracy and payload:<br/>
https://cults3d.com/en/3d-model/various/upgraded-servo-tooth-wheel-v2-0<br/>
https://cults3d.com/en/3d-model/various/upgrade-for-base-joint<br/>
https://cults3d.com/en/3d-model/various/improved-gripper/<br/>
Some useful links about LewanSoul servos:<br/>
https://www.youtube.com/channel/UCBvl0c_Hg1TkkFkqZp7MYQw<br/>
https://github.com/maximkulkin/lewansoul-lx16a<br/>
http://www.buildlog.net/blog/2017/09/lewansoul-lobot-lx-16a-serial-servo-review/<br/>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment