Recent

Author Topic: My own robotic arm-some progress  (Read 9157 times)

krolikbest

  • Full Member
  • ***
  • Posts: 246
My own robotic arm-some progress
« on: April 22, 2018, 01:34:47 pm »
Hi,

this thread is for those who are interested in such subjects from the edges ;)

so this is my latest project (not completed, long way ahead). In this project few (will be five) atmega8s are to controll servomotors reading encoders, generating step/dir, checking ranges for servos and are sendig datas to or reading from RPi3 trough i2c. On RPi3 is program written in Lazarus  which is responsible for collecting datas from atmegas, sending next steps, checking errors from atmegas, interact with user. With this you can move servomotors, make a whole move script, set up individual  ranges  for servos etc

Here is the movie, I point out this is very raw material!

https://www.youtube.com/watch?v=xpOWehtW7ns

Martin

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1186
    • Burdjia
Re: My own robotic arm-some progress
« Reply #1 on: April 23, 2018, 08:40:35 pm »
I want to see that robotic arm finished.  ;D
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

krolikbest

  • Full Member
  • ***
  • Posts: 246
Re: My own robotic arm-some progress
« Reply #2 on: April 23, 2018, 09:24:25 pm »
Hi

I want too ;)

krolikbest

  • Full Member
  • ***
  • Posts: 246
Re: My own robotic arm-some progress
« Reply #3 on: May 21, 2018, 02:14:57 pm »
Next step:
https://youtu.be/wCBY1a52TEk

There I haven't done learning algorithm still but it is in some progress. Of course it is written in Lazarus. On RPi 3 there is installed Laz 1.7 and directly there I write and run the main program. Writing it somewhere outside RPi is without a sense because of using wiringPi.
Btw I'm strongly thinking about using rs485 instead of i2c as a connection between RPi and atmegas. It works but....

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: My own robotic arm-some progress
« Reply #4 on: May 21, 2018, 03:31:03 pm »
Some things that struck me during the video:

- there is a lot of moment and shaking (hitting hard blocks?). Or maybe a larger gear for more smooth movement?
- What kind of feedback do you get back from the system?
- If you develop a position (setting coordinates on all controls), how exact is the final position?

I'm still waiting for an order at work to build a robot to insert/remove bottles from a machine, so I keep tabs. From what I see, we use a similar driver module.

krolikbest

  • Full Member
  • ***
  • Posts: 246
Re: My own robotic arm-some progress
« Reply #5 on: May 21, 2018, 05:48:10 pm »
Some things that struck me during the video:

a). there is a lot of moment and shaking (hitting hard blocks?). Or maybe a larger gear for more smooth movement?
b). What kind of feedback do you get back from the system?
c). If you develop a position (setting coordinates on all controls), how exact is the final position?

ad a).  larger gear  surely will help but most important is to make in atmegas slowing down ramp. piece of cake ;)
ad b). encoder's positions after move, few errors which I programmed in atmegas, so still in separate thread RasPi "is talking" with atmegas trough i2c
ad c). goog question, and moreover: reproducibility. Because it is made from wood I do not expect rigidity like from steel but it should be +/-  small difference for a some time of work. The most important is reading encoders correctly. That's point :)

HeavyUser

  • Sr. Member
  • ****
  • Posts: 397
Re: My own robotic arm-some progress
« Reply #6 on: May 21, 2018, 06:23:26 pm »
I'm envious very well done any reading material for us mare mortals about the algorithms required you can propose?

krolikbest

  • Full Member
  • ***
  • Posts: 246
Re: My own robotic arm-some progress
« Reply #7 on: May 21, 2018, 08:48:44 pm »
I would like to try two ways of learning algorithms,
first: moving separately  every servo to some point in space and saving this position for all servos, (in progress -  coded in Lazarus :), should work in two weeks). In this way you could practically do many such points that make a move path.
second: more complicated - IK (inverse kinematics). Possible to make, (i did something similar in Lazarus already) but .... ;)

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: My own robotic arm-some progress
« Reply #8 on: May 21, 2018, 09:28:39 pm »
ad a).  larger gear  surely will help but most important is to make in atmegas slowing down ramp. piece of cake ;)
ad b). encoder's positions after move, few errors which I programmed in atmegas, so still in separate thread RasPi "is talking" with atmegas trough i2c
ad c). goog question, and moreover: reproducibility. Because it is made from wood I do not expect rigidity like from steel but it should be +/-  small difference for a some time of work. The most important is reading encoders correctly. That's point :)

Thanks for your replies. Yes, if you get feedback or are carefully calibrated you can tune on/off to be a curve instead of abrupt.

Probably our robot will be aluminium. and I'll probably using dspice33's (using C or, less likely Mikropascal).If I need more, they'll probably be linked over CAN, with a W5500 ethernet chip to communicate with PC (or RPI for the mobile, demonstration setup)

These (dspic33epxxxMU806/810/814) are the standard chips we use, and they are very suitable for this, with 14 two pin motor peripherals and 16 single pin and two encoders and DSP functionality to do realtime analysis (like FFT), though I have no experience with the DSP part yet. Till now I just use the single pin peripherals as a signal generation for external motor drivers like yours. But till this project most of our motorcontrol was ad-hoc and not design-in, so this will be different.

The robot will be an vertical axis that can turn 90 degrees and on top of this something that can extend (linear actuator?) and some gripping device on the point of that. So it can pick up a bottle from some store area, rotate 90 degrees, extend in the machine, and drop it. Precision is course, 5mm or so. Reliability is more important.

krolikbest

  • Full Member
  • ***
  • Posts: 246
Re: My own robotic arm-some progress
« Reply #9 on: May 21, 2018, 10:41:14 pm »

Thanks for your replies. Yes, if you get feedback or are carefully calibrated you can tune on/off to be a curve instead of abrupt.

Probably our robot will be aluminium. and I'll probably using dspice33's (using C or, less likely Mikropascal).If I need more, they'll probably be linked over CAN, with a W5500 ethernet chip to communicate with PC (or RPI for the mobile, demonstration setup)

These (dspic33epxxxMU806/810/814) are the standard chips we use, and they are very suitable for this, with 14 two pin motor peripherals and 16 single pin and two encoders and DSP functionality to do realtime analysis (like FFT), though I have no experience with the DSP part yet. Till now I just use the single pin peripherals as a signal generation for external motor drivers like yours. But till this project most of our motorcontrol was ad-hoc and not design-in, so this will be different.

The robot will be an vertical axis that can turn 90 degrees and on top of this something that can extend (linear actuator?) and some gripping device on the point of that. So it can pick up a bottle from some store area, rotate 90 degrees, extend in the machine, and drop it. Precision is course, 5mm or so. Reliability is more important.

Aluminium is good choice. Stable, doesn't shake.
I feel I have to learn Mikropascal. Atmegas were programmed in Bascom, but I would like to make step forward and use not only 8-bit uC. Someone have interesting HOW TO BEGIN with Mikropascal?

btw I envy this task.

kupferstecher

  • Hero Member
  • *****
  • Posts: 583
Re: My own robotic arm-some progress
« Reply #10 on: May 22, 2018, 12:59:17 pm »
@krolikbest:
You know you also can use FreePascal to program for AVR and ARM Embedded (e.g. STM32).

http://wiki.freepascal.org/AVR_Programming
http://wiki.freepascal.org/TARGET_Embedded#ARM_Embedded

krolikbest

  • Full Member
  • ***
  • Posts: 246
Re: My own robotic arm-some progress
« Reply #11 on: May 23, 2018, 12:15:26 pm »
thanks for an answer, i've read it but maybe someone has antyhing done with fpc for avr and could share experience ? anyway i'll try and public some simple video "howto".

ccrause

  • Hero Member
  • *****
  • Posts: 845
Re: My own robotic arm-some progress
« Reply #12 on: May 23, 2018, 01:15:50 pm »
thanks for an answer, i've read it but maybe someone has antyhing done with fpc for avr and could share experience ? anyway i'll try and public some simple video "howto".
The AVR support in FPC trunk has come a long way in the last couple of years. Since the support is relatively new there isn't yet a lot of work published.  There is however quite a few tutorials in German on the wiki (use Google translate if required) and also an English basic introduction.

krolikbest

  • Full Member
  • ***
  • Posts: 246
Re: My own robotic arm-some progress
« Reply #13 on: July 04, 2018, 05:04:27 pm »
This is my last progress in robotic arm: https://www.youtube.com/watch?v=2Y7HZ5EpOA0&

btw, during writing a code in Laz 1.7 on Raspberry (OS Raspbian) i had such a case: i put on a form ToolBar with few buttons and separators. Then i put on a form a standard button and after compilation  i got sigsegv. So i removed this additional button from a form and compiled OK. Than I put once again this button and again sigsegv. I put second standard button  on a form and that compiled OK. Odd? In summary i had to get rid of ToolBar . Then never again I've got error.

In windows or ubuntu I do not have such problem with ToolBar.

Martin

eny

  • Hero Member
  • *****
  • Posts: 1634
Re: My own robotic arm-some progress
« Reply #14 on: July 05, 2018, 09:07:02 pm »
Awesome  :D
All posts based on: Win10 (Win64); Lazarus 2.0.10 'stable' (x64) unless specified otherwise...

 

TinyPortal © 2005-2018