Page 6 of 7

Re: Gertbot

Posted: Fri Jun 08, 2018 12:38 pm
by Nardeus2K

First of all, thanks a lot about your quick response. I'm sorry I haven't had much time to either test it or come back to you on my tests.
I must confess I'm still not quite familiar with the parameters speed, ramp and flags, especially the last one, in servo_config(board,channel,speed,ramp,flags,trim_min,trim_max).
Speed and ramp must be specified how so?
As for the rest I'm assured the command lines are well designed.

Thanks a lot for your time.

Re: Gertbot

Posted: Fri Jun 08, 2018 12:54 pm
by Gert van Loo
I am working on an updated manual. There is a delay because I am switching from word to open-office and there are
compatibility issues. I have to do a lot of tedious work and I can stand only so many hours a week with elevated blood pressure!

The new manual states that you should just set the speed and ramp to zero.
Only use them if you find you have some issues with the motion.

Flags does nothing. It is for a feature which is not there yet.

I would appreciate any feedback on the drivers.
If I hear that they work, I can move them from alpha-status to release-status.

Re: Gertbot

Posted: Fri Jun 08, 2018 1:31 pm
by Nardeus2K
Using the following commands, I observe no movement, nor locking of the servo:

tell me if there's any issues with my writing of the lines.

Thanks a lot for your time.

Re: Gertbot

Posted: Thu Jun 14, 2018 9:12 am
by Nardeus2K
To make sure I didn't mess up in my wiring I include here my photo of wiring

Please tell me as soon as you have some time for it if there's anything wrong with my side of things.

Thanks a lot

Re: Gertbot

Posted: Mon Jun 18, 2018 2:34 pm
by Nardeus2K

You do not need to further concern yourself using the servos, I've been told, it's a pointless ordeal using your board trying to control using your pins, as there are some left when plugging in your board. We just set some of the pins to GPIO and use PWM control fromthe GPIO toolbox on Python.

Thanks again for your time, and if I've ever incomodated you with a dumb question I'm sorry.

Re: Gertbot

Posted: Sun Sep 09, 2018 10:55 pm
by cbear92
Hi Gert,

I was hoping to get some advice about the features of the Gertbot? I am looking for some stepper motor control as part of my PhD. Part of that is using a ramped data, which is a list of different frequencies steps that all together represent a particular velocity/accel. profile. Is there a way to feed in this data and have the motor run unninterrupted? Or would this have to be coded to recognise when the current steps have been finished before sending out the next line to be run? If this is the case, would this be limited to the 1 ms read steps timing and what would the deadtime between lines end up being?

I was also wondering if the Gertbot could run lower power stepper motors < 8 V?


Gertbot connect relay to digital input and read state (open, close)

Posted: Tue Nov 06, 2018 7:07 am
by olio
maybe my issue is too simple that I can't find any example for it or I'm blind?.
I would like to connect a closing relay to a digital input channel of the Gertbot and read the state (open or closed). I found already in the manual, that I need to set one of the unused pins of J3 as input, but I can't identify the pins and some lines of python commands would help to set and read the state of the input pin.
I connected already stepper motors with end switches and can control them, which was very nicely documented in the manual and the python example driver. This works perfectly.
Maybe anyone can give me a hint (the J3 pin numbering would already help a lot).
Greetings and thanks in advance!
Oliver the meanwhile I found, that I can simply use some of the free GPIO pins of the Raspberry Pi. That makes it much easier and I might read them directly into my LabVIEW application (the programming frame of my application).

Re: Gertbot

Posted: Tue Nov 06, 2018 4:08 pm
by Gert van Loo
The J3 pinout can be found in the GUI manual page 10.

Alternative is to start the GUI and after connecting press the 'board' button.

Example of using the inputs with Python can be found in the python_2.8a.tgz archive in the test program: routine:
test_inputs (line 627). ... n_2.8a.tgz

Re: Gertbot

Posted: Wed Nov 07, 2018 8:12 am
by olio
Good morning Gert,
thank you for the reply! In fact I didn't take a look into the GUI manual, because I never got this GUI running on my Pi...but I will use this manual as an additional source of information to the user manual of the board.

Yes, I found also the read inputs example in the But I didn't dare to connect anything, because I didn't know, which pins are usable for input and how to connect them.

The remaining free GPIO pins of the raspberry pi are accessible, the internal pull-up or -down resistors can be easily connected without any further external hardware with the channel setting and I can use them directly with LabVIEW.

Anyway I like your board very much and hope they will pass the first field tests, soon. I have currently three of them connected to one Pi for controlling some dosing systems of a "smart" water sampler.

Greetings and have a nice day!

Re: Gertbot

Posted: Sun Dec 02, 2018 6:10 pm
by hapowelldavies
Hello Gert,

I am using two bipolar stepper motors connected to the Gertbot and a RPi 3 unit to control peristaltic pumps and I was wondering if it was possible to incorporate half-stepping and/or micro-stepping into the Gertbot code in order to get smoother transitions between steps especially using microstepping? I have been able to do this using an Adafruit HAT connected to the Pi so I was curious if the same is possible using the Gertbot and if so hwo I would go about gettign this to work?

Thank you in advance for your reply!

Re: Gertbot

Posted: Tue Dec 04, 2018 1:00 pm
by Gert van Loo
No, you can't do half or micro stepping. For that I would have to make major changes to the current software. As the sales of the product has reached its end-phase there is no return in that for me.

Re: Gertbot

Posted: Tue Dec 04, 2018 1:44 pm
by hapowelldavies
Ok that's understandable thank you for your reply. I was also wondering if it is possible to implement a timer in the code such that it starts when the stepper motor begins to rotate and ends when the rotation(s) finishes and calculates the time interval between this? If so how would I go about implementing this?

Re: Gertbot

Posted: Wed Dec 05, 2018 9:21 am
by Gert van Loo
Your question is somewhat confusing. You talk about a timer start & stop but then mention that it "calculates the time interval between this? " which is not what a timer function does.
You might have a look at section 7.25.2 of the manual Revision 2.8.
There is an signal called 'attention' which can be set to indicate that the stepper motors are not running. It goes to pin 22 of the Pi GPIO connector (See section 4.9.2). The signal is updated every millisecond so it is no instantaneous. It is an open collector line shared between cascaded gertbots, so it will indicate that all motors on all cards have stopped when it is high.
I'll be honest, I had forgotten about that function. I have not looked or tested it since the first version of the software so a new revision may have broken the functionality.

Re: Gertbot

Posted: Tue Dec 11, 2018 9:19 pm
by Manne
After a Long time I have reactivated my Gertbot succesfully with a Raspberry Pi 2 Model B and the actual Raspberry Strech Software :D .
Also the Gertbot Firmware upgrade from 2.3 to 2.8 was working well.

Thank you Gert I appreciate that you still support the Gertbot Software, Forum and Internet site.!

Do you have a hint how I can also get the Gui visible using the SSH ?

Kind regards

Re: Gertbot

Posted: Wed Dec 12, 2018 8:16 am
by Gert van Loo
The simplest solution would be to use VNC which, luckily for you, comes ready-packed with the Raspberry-Pi.

Re: Gertbot

Posted: Wed Dec 12, 2018 7:39 pm
by thagrol
Manne wrote:
Tue Dec 11, 2018 9:19 pm
Do you have a hint how I can also get the Gui visible using the SSH ?
I hope Gert won't mind me jumping in...

VNC will give you the entire desktop and needs a full raspbian not just a lite version.

I have had the gertbot gui running remotely on a windows box as follows (not a step by step guide):
  • On the Pi:
    1. Install dependencies for gertbot gui and X11
    2. If you haven't done so already install the gertbot gui
    3. Install any other X/gui apps you might want to run. I suggest the gksu package in case you need to run gui apps as root.
  • On windows:
    1. Install cygwin X (other X servers exist)
    2. Install putty (other ssh programs exist)
    3. Start the cygwin X server. I use multi-window mode but other modes should work.
    4. Launch putty.
    5. In the options list, find "ssh" then "X11" and tick "Enable X11 forwarding"
    6. Start an ssh session to your Pi.
    7. Launch the gertbot gui (or any other X app you need/want)
If your desktop box is running linux with a gui, open a terminal and connect to your Pi via ssh with either the -Y or -X option.

  • There are potential security issues with X11 forwaarding. Under some circumstance it's possible for other users to gain access and run stuff on your display. As always, read the docs and decide if it's worth the risk.
  • I use cygwin X in multi-window mode as I have multiple monitors and it better integrates with that.
  • On windows 10 with cygwin X in multi-window mode gksudo runs best with the "--disable-grab" option.
  • If you want to carry on using the ssh session once the X11 app has started, remember to start as a background job (append &). Or, once it's running switch back to the ssh session, hit <ctrl>-z then "bg<return>" to resume it as a background job.
  • Stuff that needs harware GPU acceleration probably won't work, nor will anything that uses the GPU to write directly to display memeory (e.g. the camera preview)

Re: Gertbot

Posted: Mon Mar 11, 2019 4:15 pm
by hapowelldavies
I have built a system which involves two Gerbots, each connected to two stepper motors. The first Gertbot (with two motors) is directly attached to the PI, with the second Gertbot connected to the first one via a ribbon cable. However the second Gerbot has intermittent issues where I have to change the BOARD number in my code from BOARD = 2 to BOARD = 0 or vice versa. However the first Gertbot stays on BOARD = 3. When running the GUI test bench for the Gertbot, both boards show as connected as BOARD 3 (first one, connected directly to Pi) and BOARD 2 (second one connected via ribbon cable). Why is there is discrepancy which causes the motors connected to the second GB to stop working? How do I fix this? Should add both Gertbots are up-to-date on the 2.8 firmware. Thank you in advance.

Re: Gertbot

Posted: Mon Mar 11, 2019 5:08 pm
by Gert van Loo
Did you set the board ID jumpers?

The use of multiple Gertbots is specified in the advanced manual: ... ed_2.4.pdf
The ID jumper settings are discussed and shown in chapter 2.

Re: Gertbot

Posted: Mon Mar 11, 2019 6:41 pm
by hapowelldavies
Ok so I see the relevant explanation about assigning IDs to the jumpers in the manual. How do I do this in the code though? At the moment I only specify BOARD = 1, 2, 3 etc and CHANNEL = 0, 2 etc. Where do I specify ID and what’s the syntax for this? Thank you!

Re: Gertbot

Posted: Wed Mar 13, 2019 4:49 pm
by Gert van Loo
The jumpers set the board id. Thus after you set the jumpers you can address the board using that number.

The fact that you saw the board jumping from one ID to another had probanly to do with the fact that you had two boards with the same ID. I never tried or tested that.

Re: Gertbot

Posted: Wed Mar 13, 2019 8:37 pm
by hapowelldavies
I see. But how do I set the jumpers? I've attached the two Gertbots via a ribbon cable. How do I know what the ID for each board is then based on the jumpers? How does one call the board ID in the code? I'm quite confused about this!

Re: Gertbot

Posted: Thu Mar 14, 2019 6:40 pm
by Gert van Loo
Follow the image in the advanced manual chapter 2 to set the two board ID's you want.
Any board ID is OK as long as they are not the same.
To check if you have set the board ID's correctly you can start the gertbot GUI .
When you connect the GUI will show you which board ID's it has found.

Then in the code use those board ID's to talk to that board:

Every command which talks to a specific board has a 'board' parameter:

def set_endstop ( board,channel,stop_A,stop_B) :
def set_endstop2 ( board,channel,stop_A,stop_B,filt_A,filt_B) :
def set_short( board,channel,short) :
def set_shorthot( board,channel,short) :
def set_brush_ramps( board,channel,ramp_up,ramp_down,ramp_halt) :
def move_brushed( board,channel,direction) :
def pwm_brushed( board,channel,freq,dc) :
def move_stepper( board,channel,steps) :
def stop_stepper( board,channel,mode) :
def freq_stepper( board,channel,freq) :
def read_error_status( board):
def error_string(error_number):
def get_motor_config( board,mot) :
def get_motor_status( board,mot) :
def get_motor_missed( board,mot) :
def send_dcc_mess( board,channel,data) :
def dcc_config( board,channel,repeat,preamble,dc) :
def ramp_stepper( board,channel,start_stop,ramprate) :
def set_pin_mode( board,pin,mode) :
def set_allpins_mode( board,modes) :
def set_output_pin_state( board,output) :
def activate_opendrain( board,drain0,drain1) :
def set_dac( board,dac,val) :
def read_adc( board,adc) :
def read_inputs( board) :
def get_io_setup(brd) :
def set_baudrate(baud) :
def quad_on( board,channel,on,position,rev):
def quad_read( board,channel) :
def quad_goto( board,channel,position,duty_cycle):
def quad_limit( board,channel,max_on,min_on,slow_on,maxp,minp,slow_dist,slow_dc) :

Re: Gertbot

Posted: Fri Nov 15, 2019 4:49 pm
by basbiker
I just have received my gertbot, but " I want to use it NOW" does not work.
First: what kind of version of Python is used? Suppose version 2.x ???
git clone git:://<TODO> gives error : SyntaxError: invalid syntax , both in Python 2 and 3.
I downloaded Gertbot Debug GUI (.tgz), unpacked it, so I've a directory with gertbot files. But how to start the GUI ??
Does the Gertbot work with a Pi4 as well??
Any change microstepping will be supported in the future, I need it.
Already bought a adafruit motor stepper HAT, but a lot of problems as well, hoped the GERTbot would be simpler and straight forward.

Re: Gertbot

Posted: Fri Nov 15, 2019 6:40 pm
by Gert van Loo
First: what kind of version of Python is used? Suppose version 2.x ???
The webpage where you download the driver from ( says:

Python (.tgz) Rev 2.8 drivers for Python 3 plus the testbench.
The testbench can be used as example as it contains a call to every gertbot python routine.

I downloaded Gertbot Debug GUI (.tgz), unpacked it, so I've a directory with gertbot files. But how to start the GUI ??
That contains the GUI source code. If you look a bit further down on that page you find:
  • Executables
    • Raspberry-Pi
      Gertbot Debug GUI (.tgz) Gertbot debug GUI rev2.8, QT4 executable.
      The Jessie version no longer has the QT4 libraries. To install those use:
      sudo apt-get install libqtgui4

Any change microstepping will be supported in the future, I need it.
No. If you read/scan/search the manual you will find that microstepping is not mentioned. Also there will not be microstepping in the future as the underlying hardware does not support that.

Re: Gertbot

Posted: Thu Nov 21, 2019 2:23 pm
by basbiker
Hi Gert, thanks for our answers.
I decided to use a steppermotor with gearbox now, so I don't need the microstepping anymore.
I managed to start the Gui now, but it does not find my board.
Do I need to install libqtgui4 for this too?
I do need to install the Gui from Python 2, right?
I use a Pi 4 , can this be the problem?