Thank you Gert, I appreciate you taking the time to look into this. I have just copied a fresh version of noobs to my SD card and will follow the instructions at https://www.gertbot.com/pi3.html as you suggest. But I'll have to wait until the television becomes free!
Can you confirm that I should download version 2.6 of all code from the https://www.gertbot.com/updates.html page - this does seems
to be different to the code on the https://www.gertbot.com/download.html page.
Best wishes once again
Richard
- Gert van Loo
- Posts: 2487
- Joined: Tue Aug 02, 2011 7:27 am
- Contact: Website
Re: Gertbot
Yes 2.6 is the latest but I have been asked for 2.8 which I will try to get out this weekend.
I have not done so as I have not had time to update the C or python drivers.
Revision 2.7 has support for servo motors. It does not use the power bridge at all but outputs a
3.3Volt variable pulse width to control servo's. Whilst testing I was surprised to see how few servos
work according to the standard. On many I had to make the pulse width <1ms or >2ms to reach the end positions.
Therefore I had to build-in compensation for that. You set the min & max pulse width.
Then when you tell it to go to the middle position it will work out where that is.
Revision 2.8 has support for ramping up and down on the stepper motor speed
sort of like the brushed motors. The issue was that it has to stop exactly when it has reached its
minimum step speed which required some nice calculations as to when to start ramping down.
(Which in short step sequences maybe half way when it is still ramping up)
So this weekend I plan to release the GUI 2.8 and the code for the board plus the manual
but not yet the C or Python drivers.
I have not done so as I have not had time to update the C or python drivers.
Revision 2.7 has support for servo motors. It does not use the power bridge at all but outputs a
3.3Volt variable pulse width to control servo's. Whilst testing I was surprised to see how few servos
work according to the standard. On many I had to make the pulse width <1ms or >2ms to reach the end positions.
Therefore I had to build-in compensation for that. You set the min & max pulse width.
Then when you tell it to go to the middle position it will work out where that is.
Revision 2.8 has support for ramping up and down on the stepper motor speed
sort of like the brushed motors. The issue was that it has to stop exactly when it has reached its
minimum step speed which required some nice calculations as to when to start ramping down.
(Which in short step sequences maybe half way when it is still ramping up)
So this weekend I plan to release the GUI 2.8 and the code for the board plus the manual
but not yet the C or Python drivers.
Re: Gertbot
Still not working - fresh install, (I think I have) followed your instructions - the gui is OK, but no boards are found 
I do still have wifi (but not bluetooth) and you have mentioned a couple of times that this ought to be disabled, so I think we may still have different configurations. Or could possibly have somehow fried my gertbot - the heartbeat on the board still flashes...
Here are how the gpio pins look, how my config and cmline files look.
If you have any more ideas, I'd be grateful - I would even be happy to package up the boards and send them to you to take a look at if you would be willing? If my gertbot works on your pi3, that would at least give me confidence that it is worth continuing to look at this.
cheers
Rich
ps - I don't know systemctl, but I have also issued
sudo systemctl stop bluetooth.service
but that does not appear to have made any difference either

I do still have wifi (but not bluetooth) and you have mentioned a couple of times that this ought to be disabled, so I think we may still have different configurations. Or could possibly have somehow fried my gertbot - the heartbeat on the board still flashes...
Here are how the gpio pins look, how my config and cmline files look.
Code: Select all
pi@raspberrypi:~/Downloads $ sudo gpio readall
+-----+-----+---------+------+---+---Pi 3---+---+------+---------+-----+-----+
| BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM |
+-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
| | | 3.3v | | | 1 || 2 | | | 5v | | |
| 2 | 8 | SDA.1 | IN | 1 | 3 || 4 | | | 5v | | |
| 3 | 9 | SCL.1 | IN | 1 | 5 || 6 | | | 0v | | |
| 4 | 7 | GPIO. 7 | IN | 1 | 7 || 8 | 1 | ALT0 | TxD | 15 | 14 |
| | | 0v | | | 9 || 10 | 1 | ALT0 | RxD | 16 | 15 |
| 17 | 0 | GPIO. 0 | IN | 0 | 11 || 12 | 0 | IN | GPIO. 1 | 1 | 18 |
| 27 | 2 | GPIO. 2 | IN | 0 | 13 || 14 | | | 0v | | |
| 22 | 3 | GPIO. 3 | IN | 0 | 15 || 16 | 0 | IN | GPIO. 4 | 4 | 23 |
| | | 3.3v | | | 17 || 18 | 0 | IN | GPIO. 5 | 5 | 24 |
| 10 | 12 | MOSI | IN | 0 | 19 || 20 | | | 0v | | |
| 9 | 13 | MISO | IN | 0 | 21 || 22 | 1 | IN | GPIO. 6 | 6 | 25 |
| 11 | 14 | SCLK | IN | 0 | 23 || 24 | 1 | IN | CE0 | 10 | 8 |
| | | 0v | | | 25 || 26 | 1 | IN | CE1 | 11 | 7 |
| 0 | 30 | SDA.0 | IN | 1 | 27 || 28 | 1 | IN | SCL.0 | 31 | 1 |
| 5 | 21 | GPIO.21 | IN | 1 | 29 || 30 | | | 0v | | |
| 6 | 22 | GPIO.22 | IN | 1 | 31 || 32 | 0 | IN | GPIO.26 | 26 | 12 |
| 13 | 23 | GPIO.23 | IN | 0 | 33 || 34 | | | 0v | | |
| 19 | 24 | GPIO.24 | IN | 0 | 35 || 36 | 0 | IN | GPIO.27 | 27 | 16 |
| 26 | 25 | GPIO.25 | IN | 0 | 37 || 38 | 0 | IN | GPIO.28 | 28 | 20 |
| | | 0v | | | 39 || 40 | 0 | IN | GPIO.29 | 29 | 21 |
+-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
| BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM |
+-----+-----+---------+------+---+---Pi 3---+---+------+---------+-----+-----+
pi@raspberrypi:~/Downloads $ file /dev/ttyAMA0
/dev/ttyAMA0: character special (204/64)
pi@raspberrypi:~/Downloads $ more /boot/cmdline.txt
dwc_otg.lpm_enable=0 root=/dev/mmcblk0p7 rootfstype=ext4 elevator=deadline fsck.
repair=yes rootwait splash plymouth.ignore-serial-consoles
pi@raspberrypi:~/Downloads $ tail -2 /boot/config.txt
dtoverlay=pi3-disable-bt
enable_uart=1
cheers
Rich
ps - I don't know systemctl, but I have also issued
sudo systemctl stop bluetooth.service
but that does not appear to have made any difference either
- Gert van Loo
- Posts: 2487
- Joined: Tue Aug 02, 2011 7:27 am
- Contact: Website
Re: Gertbot
First note that I have updated the gertbot webpages several times over the last two days.
There are tested instruction on there: https://www.gertbot.com/pi3.html
domoticom had even more problems (Qt4 libraries where missing) but I manged to help him out and for him it now all works: viewtopic.php?f=45&t=130475
I have to assume from that that the instructions on the gertbot webpage are correct but they
have been tested only with the latest stretch build.
What I learned in the last two days:
1/ Wifi is still working with my gertbot, In fact the picture below has been obtained using VNC connected over WIFI.
2/ Do NOT touch the user settings with the GUI 'to enable the UART interface.: If you have enabled it, disable it again but then you have to edit the /boot/config.txt file again to set enable_uart=1.
I suspect somebody is installing a SW bit-bang driver which is not at all compatible with the actual hardware UART.
===========
I will try tomorrow with an fresh pre-stretch image.
I think you have one of those because on the latest image the whole GUI will not start
due to the missing qt4 libraries.
There are tested instruction on there: https://www.gertbot.com/pi3.html
domoticom had even more problems (Qt4 libraries where missing) but I manged to help him out and for him it now all works: viewtopic.php?f=45&t=130475
I have to assume from that that the instructions on the gertbot webpage are correct but they
have been tested only with the latest stretch build.
What I learned in the last two days:
1/ Wifi is still working with my gertbot, In fact the picture below has been obtained using VNC connected over WIFI.
2/ Do NOT touch the user settings with the GUI 'to enable the UART interface.: If you have enabled it, disable it again but then you have to edit the /boot/config.txt file again to set enable_uart=1.
I suspect somebody is installing a SW bit-bang driver which is not at all compatible with the actual hardware UART.
===========
I will try tomorrow with an fresh pre-stretch image.
I think you have one of those because on the latest image the whole GUI will not start
due to the missing qt4 libraries.
Re: Gertbot
I followed the instructions to add the qt4 libraries - I think I'm as apt-get upgraded as I can be. I'm going to leave it for tonight - I'll try and read more tomorrow
Best wishes
Richard
Best wishes
Richard
- Gert van Loo
- Posts: 2487
- Joined: Tue Aug 02, 2011 7:27 am
- Contact: Website
Re: Gertbot
Downloading the QT4 libraries.
You only need to download the QT4 runtime libraries if you get an error message saying "libQtGui.so.4: cannot open shared object file: No such file or directory"
At the moment this is the case if you use a stretch image. (uname -r gives as output "4.9.41-v7+")
In that case there are instructions here: https://www.gertbot.com/updates.html
If you are running an older jessie image (uname -r gives as output "4.4.50-v7+") then you do NOT need to download the qt4 libraries as they are provided.
Pi-3 UART
In a Pi-3 in both versions to get the UART working the following is needed:
Add to the /boot/config.txt file:
dtoverlay=pi3-disable-bt
enable_uart=1
Remove "console=serial0,115200 console=tty1" from the /boot/cmdline.txt file
Do NOT touch the user settings with the GUI 'to enable the UART interface.
I have tested this yesterday with a stretch build and today with a jessie build.
Both freshly downloaded with no other modifications.
You only need to download the QT4 runtime libraries if you get an error message saying "libQtGui.so.4: cannot open shared object file: No such file or directory"
At the moment this is the case if you use a stretch image. (uname -r gives as output "4.9.41-v7+")
In that case there are instructions here: https://www.gertbot.com/updates.html
If you are running an older jessie image (uname -r gives as output "4.4.50-v7+") then you do NOT need to download the qt4 libraries as they are provided.
Pi-3 UART
In a Pi-3 in both versions to get the UART working the following is needed:
Add to the /boot/config.txt file:
dtoverlay=pi3-disable-bt
enable_uart=1
Remove "console=serial0,115200 console=tty1" from the /boot/cmdline.txt file
Do NOT touch the user settings with the GUI 'to enable the UART interface.
I have tested this yesterday with a stretch build and today with a jessie build.
Both freshly downloaded with no other modifications.
Re: Gertbot
Hi Gert,
just to let you know, I decided to order a re[placement gertbot which arrived this week. I have just wired it up and plugged it into the pi3 and it worked first time - yay! So I think I must have somehow damaged the gertbot I was trying to get working previously. I'm very pleased - we can now crack on with a bit of coding and will hopefully be ready for some piwars in April - although there is still an awful lot to do!
Best wishes,
Richard
just to let you know, I decided to order a re[placement gertbot which arrived this week. I have just wired it up and plugged it into the pi3 and it worked first time - yay! So I think I must have somehow damaged the gertbot I was trying to get working previously. I'm very pleased - we can now crack on with a bit of coding and will hopefully be ready for some piwars in April - although there is still an awful lot to do!
Best wishes,
Richard
- Gert van Loo
- Posts: 2487
- Joined: Tue Aug 02, 2011 7:27 am
- Contact: Website
Re: Gertbot
Great to hear that.
Note that last weekend I did mange to release version 2.8 which supports ramping of the stepper motors.
If you work with motors and motion you will find that slow starting/stopping is not a luxury, it is mandatory.
I found out when I built the 'Toast-e' prototype.
Note that last weekend I did mange to release version 2.8 which supports ramping of the stepper motors.
If you work with motors and motion you will find that slow starting/stopping is not a luxury, it is mandatory.
I found out when I built the 'Toast-e' prototype.
-
- Posts: 2
- Joined: Mon Mar 12, 2018 8:11 am
- Location: Brest, France
Re: Gertbot
Hi, we are currently working on a project using a gertbot 1.1 and 2 DC motors, we did pretty much everything in order to make them work via the Gertbot GUI, and it works.
But now that we are trying to make a c++ program using QT creator to control them, we have a hard time to make it works. We are trying to use the UART headers and programs available at the Gertbot website (C-drivers 2.6, simple rover, etc).
So here is the code we have :
And when we try it, it gets stuck where I put the arrow by telling us there is a "UART WRITE ERRROR!!"
I hope you can help us figuring this out,
Cordially,
Some French students
But now that we are trying to make a c++ program using QT creator to control them, we have a hard time to make it works. We are trying to use the UART headers and programs available at the Gertbot website (C-drivers 2.6, simple rover, etc).
So here is the code we have :
Code: Select all
#include "mainwindow.h"
#include <gertbot_pi_uart.h>
#include <QApplication>
#include "gertbot_defines.h"
//#include "gertbot_serial.cpp"
#include "gertbot_pi_uart.c"
#include "QDebug"
//int find_board(int b,int *ver_ms,int *ver_ls);
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
int ver_ms;
int ver_ls;
int find_board(int b,int *ver_ms,int *ver_ls);
bool uart_opened;
uart_opened=true;
find_board(0,&ver_ms,&ver_ls);
if (w.avance==true) {
qDebug()<<"Avance";
unsigned char Data[5];
Data[0]=0xA0;
Data[1]=CMD_OPMODE;
Data[2]=0x00;
Data[3]=MOT_MODE_BRUSH;
Data[4]=0x50;
write_uart((unsigned char *)Data,5);
qDebug()<<"Avance2";
unsigned char Data2[3];
Data[0]=0xA0;
Data[1]=MOT_MOVE_A;
Data[2]=0x50;
write_uart((unsigned char *)Data2,3);
qDebug()<<"Avance3";
}
return a.exec();
}
int find_board(int b,int *ver_ms,int *ver_ls)
{ unsigned char rx_data[64];
unsigned char tx_data[16];
int try_count,rec_count;
unsigned char board_code;
try_count=0;
// As this is likely the first attempt to communicate
// add plenty of stop codes on both sides of the command
board_code = b<<2;
for (b=0; b<8; b++)
tx_data[b] = CMD_STOP_VAL;
tx_data[b++] = CMD_START_VAL;
tx_data[b++] = CMD_VERSION;
tx_data[b++] = board_code;
for ( ; b<16; b++)
tx_data[b] = CMD_STOP_VAL;
while (try_count<4)
{ // send command & wait for reply
//open_uart();
write_uart(tx_data,16); //<- Stuck here
rec_count = read_uart(rx_data,4);
// Syncing so have have to be strict
// refuse if we do not get perfect data
if (rec_count==4 && rx_data[0]==board_code && rx_data[1]==CMD_VERSION)
{ // assume success
*ver_ms = rx_data[2];
*ver_ls = rx_data[3];
return 1;
}
try_count++;
} // try several times
read_uart(rx_data,16); // Drop any read buffer remainders
return 0;
} // find_board
I hope you can help us figuring this out,
Cordially,
Some French students
- Gert van Loo
- Posts: 2487
- Joined: Tue Aug 02, 2011 7:27 am
- Contact: Website
Re: Gertbot
Why have you:
- Written: uart_opened=true; ?
- Commented out the uart_open() call ?
The first line in the simple rover example main file is:
Which you have not used.
By the way: if you want to use c++ be careful when using the uart drivers as they are written in C.
- Written: uart_opened=true; ?
- Commented out the uart_open() call ?
The first line in the simple rover example main file is:
Code: Select all
// Open serial port to talk to Gertbot
if (!open_connection(0))
return 1;
By the way: if you want to use c++ be careful when using the uart drivers as they are written in C.
-
- Posts: 2
- Joined: Mon Mar 12, 2018 8:11 am
- Location: Brest, France
Re: Gertbot
Well... We don't remember for the uart_opened
As for uart_open(), it was also one of the things that don't work, adding a lot of warnings and errors...
And we were trying to fix one thing at a time... but that doesn't work quite well
ok, It's not like we want to... we have to (or at least try to)... so what needs to be done to correctly use the uart drivers ?
Anyway, let's begin right at the beginning : If you were to choose between c++ and c to communicate with the gertbot, which one you would choose and why ? And if C++ was your only choice, what steps would you do in order to carefully make it work ?
As for uart_open(), it was also one of the things that don't work, adding a lot of warnings and errors...
And we were trying to fix one thing at a time... but that doesn't work quite well
ok, It's not like we want to... we have to (or at least try to)... so what needs to be done to correctly use the uart drivers ?
Anyway, let's begin right at the beginning : If you were to choose between c++ and c to communicate with the gertbot, which one you would choose and why ? And if C++ was your only choice, what steps would you do in order to carefully make it work ?
- Gert van Loo
- Posts: 2487
- Joined: Tue Aug 02, 2011 7:27 am
- Contact: Website
Re: Gertbot
There are two archives with complete source code which you can download which use the gertbot with QT:
Gertbot Debug GUI and DCC example gui.
The latter is the smallest. Both are written for QT4.8 and I understand the Pi now has QT5.
But the code how to interface with the UART is independent from that.
Gertbot Debug GUI and DCC example gui.
The latter is the smallest. Both are written for QT4.8 and I understand the Pi now has QT5.
But the code how to interface with the UART is independent from that.
Re: Gertbot
Just got a PI3 and an a Gertbot running version 2.5
The software connects to the board with the updated instructions for the Pi3, WiFi works fine, bluetooth I don't need. Using it over SSH with X-forwarding.
Question though. I want to use it with a stepper motor - should I upgrade the board to 2.8?
Thanks,
-peter
The software connects to the board with the updated instructions for the Pi3, WiFi works fine, bluetooth I don't need. Using it over SSH with X-forwarding.
Question though. I want to use it with a stepper motor - should I upgrade the board to 2.8?
Thanks,
-peter
- Gert van Loo
- Posts: 2487
- Joined: Tue Aug 02, 2011 7:27 am
- Contact: Website
Re: Gertbot
For stepper motors version 2.8 only offer ramping extra.
But there are some other non-stepper motor features like de-bounce filters on the end switches.
But there are some other non-stepper motor features like de-bounce filters on the end switches.
Re: Gertbot
Hi,
Thanks for the fast reply. I think I will update. On the other hand, why update if not needed, but on the other hand, I want my software to be up to date
(My motor is rated 5.3V, 5.3 Ohm, 1A. I thought running them on 12 V, that would be 2.3 A. Just under the maximum of 2.5 A so that should be allright?)
-peter
Thanks for the fast reply. I think I will update. On the other hand, why update if not needed, but on the other hand, I want my software to be up to date

(My motor is rated 5.3V, 5.3 Ohm, 1A. I thought running them on 12 V, that would be 2.3 A. Just under the maximum of 2.5 A so that should be allright?)
-peter
- Gert van Loo
- Posts: 2487
- Joined: Tue Aug 02, 2011 7:27 am
- Contact: Website
Re: Gertbot
Durian,
I don't think that is a good idea. You are likely to blow up your motor.
Use 8V as that is the minimum voltage the gertbot can run at.
Then add series resistors of 2.7 Ohm, ~3Watt.
I don't think that is a good idea. You are likely to blow up your motor.
Use 8V as that is the minimum voltage the gertbot can run at.
Then add series resistors of 2.7 Ohm, ~3Watt.
Re: Gertbot
Yes, I will try that. (I thought it would be ok because they show torque graphs for 24V in the manual. (this is what you get when you experiment without understanding everything))
-peter
-peter
Re: Gertbot
By the way, is there a compiled version of the 2.8 gui? Only the source code version appears to be downloadable,
-peter
-peter
- Gert van Loo
- Posts: 2487
- Joined: Tue Aug 02, 2011 7:27 am
- Contact: Website
Re: Gertbot
My apologies. There was a typo in the file which made that the link was wrong.
I thought that I had tested downloading each file but I must have missed that one.
It is now in place with more information how to get it running and
how to use a better font.
I thought that I had tested downloading each file but I must have missed that one.
It is now in place with more information how to get it running and
how to use a better font.
Re: Gertbot
Hello,
I am interested in using the Gertbot to drive multiple solenoids. Can I drive 2 solenoids, one off the A pin and the other off the B pin, of each bridge? Is there anything in software looking for current flow through the sense resistor on the low side of the bridge??
Thanks,
Emach
I am interested in using the Gertbot to drive multiple solenoids. Can I drive 2 solenoids, one off the A pin and the other off the B pin, of each bridge? Is there anything in software looking for current flow through the sense resistor on the low side of the bridge??
Thanks,
Emach
- Gert van Loo
- Posts: 2487
- Joined: Tue Aug 02, 2011 7:27 am
- Contact: Website
Re: Gertbot
If you connect a solenoid between A1 and A2 it will drive it.
The same for B1/B2, C1/C2, D1/D2.
But there is no on/off software for that, so you have to use DC motor mode.
Either forward or backwards will activate the solenoid.
But the board has eight half bridges. So it could drive 8 single ended devices like solenoids!
But there is no SW for that mode. (Yet). You have given me something to work on for the next days.
The same for B1/B2, C1/C2, D1/D2.
But there is no on/off software for that, so you have to use DC motor mode.
Either forward or backwards will activate the solenoid.
But the board has eight half bridges. So it could drive 8 single ended devices like solenoids!
But there is no SW for that mode. (Yet). You have given me something to work on for the next days.
Re: Gertbot
Gert,
That would be pretty awesome if you could implement that software feature to run the solenoids single ended.
One other weird request. Can the "end stop" switch inputs statuses be accessed via software? I have a bunch of reed switches to keep track of and if I can do it via the Gertbot that would possibly save me buying a separate micro controller board to serve as an I/O expander.
I am looking to use the Gertbot to drive door lock solenoids for a key organizer / trap.
Thanks,
Emach
That would be pretty awesome if you could implement that software feature to run the solenoids single ended.

One other weird request. Can the "end stop" switch inputs statuses be accessed via software? I have a bunch of reed switches to keep track of and if I can do it via the Gertbot that would possibly save me buying a separate micro controller board to serve as an I/O expander.
I am looking to use the Gertbot to drive door lock solenoids for a key organizer / trap.
Thanks,
Emach
- Gert van Loo
- Posts: 2487
- Joined: Tue Aug 02, 2011 7:27 am
- Contact: Website
Re: Gertbot
It will take some time as I have some other obligations.
As to reading the end-stop switches, that is already supported.
They are just normal inputs thus a 'READ input' command will give you that information.
You can try it with the GUI by first switching to 'board' mode. On the LHS is a Read button.
As to reading the end-stop switches, that is already supported.
They are just normal inputs thus a 'READ input' command will give you that information.
You can try it with the GUI by first switching to 'board' mode. On the LHS is a Read button.
Re: Gertbot
Thanks for the updated link to the 2.8 GUI binary!
-peter
-peter
-
- Posts: 2
- Joined: Sat Apr 14, 2018 6:10 am
Re: Gertbot
First, I would like to thank Mr. van Loo for all his hard work creating, documenting, and maintaining the GertBot.
We've won two robotics competitions and a science fair using it, and it saved us many hours of work. I was wondering whether the GertBot is every going to come back, though. The only US seller had one left in stock, and I just bought it for twice the normal price. UK sellers don't have many either. Are there plans to continue selling GertBot's, or was there never enough demand? Thank you for your time.
