SCARA robot arm
 
Notifications
Clear all

SCARA robot arm

43 Posts
4 Users
3 Likes
2,666 Views
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
Topic starter  
Posted by: @bldrgy

I have purchased a Husky Lens and would like to integrate it into a SCARA robot I made. I found the plans from another website and printed it on a 3d printer. I used the code they provided with an interface. 

I am not proficient at code, so my question is how do I code the robot to do a pick and place with a recognized object. Should I use the sample Huskylens code and try to work from that? It’s a little beyond my knowledge right now so any advice is welcomed. 

I have have watched Bill’s video and understand I will need to pull the coordinates from the from the serial monitor. Knowing how to code that and use them is another thing. The item picked will most likely be moving slowly down a conveyor belt. So where should the camera mount, on the robot or stationary above the conveyor. 

Help or suggestions greatly appreciated. 

@bldrgy

Is this the robot arm you built?

scaraRobot

Is that the only task for your expensive robot arm, pick and place an L shaped bracket?

With the camera looking down its view might be blocked by the arm unless it viewed before the arm moves into place.

I will have to review the Husky video to see if there is any way its on board AI can be used.

My own experience is using a webcam and experimenting with my own image recognition software.

 

 


   
Quote
(@bldrgy)
Member
Joined: 2 years ago
Posts: 19
 

Yes that is the one. 


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
Topic starter  

@bldrgy 

Unfortunately I don't have a Huskylens so I don't have any experience using it.

Perhaps @oracid or someone else who has used the Huskylens will chime in?

It appears you can teach it to recognize an object (shape, template) by placing a rectangle around it.

If on a conveyor belt its position relative to the arm would be known given its position reported by Huskylens.

Will it return the orientation (rotation around its center) of the shape as well as position, anyone know?

Why the L shaped brackets?  Just an experiment?

 


   
ReplyQuote
(@bldrgy)
Member
Joined: 2 years ago
Posts: 19
 

@robotbuilder Thanks for input. I’m trying to make a mini product line that would stack the brackets in a certain number. 
Other issues I foresee, is the robot fast enough to either catch it with grippers or try using a suction cup/magnet and try to catch it in the middle of the bracket. 


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
Topic starter  

@bldrgy 

Let me just say if you have actually built this robot arm then I am very impressed.

https://howtomechatronics.com/projects/scara-robot-how-to-build-your-own-arduino-based-robot/

Catching a bracket while the conveyor belt is moving might be tricky. Can you control the conveyor belt speed such as stopping it while the object is lifted off? The arm is not all that fast so I assume you have some control over the conveyor belt speed.

What is the purpose of stacking the brackets? Is this just an experiment or something practical?

How do they get on the conveyor belt in the first place?

An electromagnet may be a way to grab metal brackets off the belt as they pass. Then the rotational orientation of the bracket on the arm might be determined for stacking.

By the way it is possible to attach an image if you want to give some visual idea of your setup by clicking the Attach Files option at the bottom of the post with the paper clip image.

 


   
ReplyQuote
(@bldrgy)
Member
Joined: 2 years ago
Posts: 19
 
Posted by: @robotbuilder

@bldrgy 

Let me just say if you have actually built this robot arm then I am very impressed.

Thanks!

What is the purpose of stacking the brackets? Is this just an experiment or something practical?

It’s kinda both, and experiment that hopefully leads to something practical. The brackets need to be stacked so they can easily be handled to be placed in a package.

How do they get on the conveyor belt in the first place?

That’s a whole neither issue! I guess I’ll figure that out later if I can make the pick and place process work out. I’ve also pondered if the Husky lens could pick them from a random pile. 

An electromagnet may be a way to grab metal brackets off the belt as they pass. Then the rotational orientation of the bracket on the arm might be determined for stacking.

That was my though also. 

 

 


   
ReplyQuote
(@bldrgy)
Member
Joined: 2 years ago
Posts: 19
 

Here is a picture.

DA875DB0 B0FE 42FE 9C56 F62109AFCC64

 


   
robotBuilder reacted
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
Topic starter  

@bldrgy 

A camera could be pointed down ahead of the pick up arm so it would have a clear view. The arm could move into place and grab it at just the right time. It would also be useful if the computer can control the speed of the conveyor belt.

You never indicated the type of L bracket? The easiest to recognize would be the 2d flat L shaped bracket. The other two might be easier for the gripper to pick up (unless a solenoid magnet is used but then how do you orientate it).

To enlarge an image, right click the image and choose Open link in new window.

brackets

It may be possible to align the brackets by pouring them onto a sloping table with an edge on the bottom before dropping them onto the conveyor belt.

Of course there is no competition here between the slow robot arm and a human doing the same job 🙂

 


   
ReplyQuote
(@bldrgy)
Member
Joined: 2 years ago
Posts: 19
 
Posted by: @robotbuilder

@bldrgy 

A camera could be pointed down ahead of the pick up arm so it would have a clear view. The arm could move into place and grab it at just the right time. It would also be useful if the computer can control the speed of the conveyor belt.

Conveyor would be variable speed. I suppose it wouldn’t even need to stop. Missed pickups could be recycled back into the belt. Unless you are thinking to stop the belt each time the camera sees a brackets?

You never indicated the type of L bracket? The easiest to recognize would be the 2d flat L shaped bracket. The other two might be easier for the gripper to pick up (unless a solenoid magnet is used but then how do you orientate it).

Brackets are like the first image but 1.5x1.5x2.5 inches in width. So there could be enough surface to grab it. 

To enlarge an image, right click the image and choose Open link in new window.

brackets

It may be possible to align the brackets by pouring them onto a sloping table with an edge on the bottom before dropping them onto the conveyor belt.

I’ve tried two conveyors on a 90 and a downward slope from one to the other. That was fairly successful. 

Of course there is no competition here between the slow robot arm and a human doing the same job 🙂

Not yet:) I’ve also looked at Delta robots, they are much quicker but the range of motion appears to be a little limited. Thanks for you thoughts, much appreciated. 

 

 


   
ReplyQuote
(@bldrgy)
Member
Joined: 2 years ago
Posts: 19
 

 

8D709267 B3CB 4C22 94CD 0F544AA04252

I think my first step should be to get the lens wired to the Arduino and CNC shield. The Husky lens has 3 wires- power and communication. Would the communication wires go the pins 0 and 1 of the Arduino? 

If I know it’s wired properly and can establish communication between the lens and Arduino, then I can approach trying to code it. I’m going to assume that if communication is established and sent to the serial monitor, that’s how to code the robot to somehow go to that position?


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6910
 

@bldrgy I think you should first start with the Husky Lens tutorial, then think about incorporating that into the arm software. Aren't pins 0 and 1 reserved?

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Oracid
(@oracid)
Member
Joined: 5 years ago
Posts: 18
 

Hi

To day, since I waked up, I challenge this. Hope you appreciate.
I refer to this link, HuskyLens/HUSKYLENSArduino (github.com) and I write a less than 30 lignes code. I hope I have wrote it as simple as possible.

With id=0 you can recognize any things that are already in the HuskyLens memory. If you want to recognize your own thing, you have to learn it before.
The goal here is simply to print the parameters of an OBJECT_RECOGNITION on the Arduino IDE Monitor.

In your Internet Browser, let say that you look for cats. So you can scan hundreds cats pictures with the HuskyLens. It will recognize them very easily. The same for dogs, horses or cows, etc.
Do not hesitate to ask.

// Oracid-HuskyLens-OBJET_RECOGNITION - 18/08/2022 - ref.  https://github.com/HuskyLens/HUSKYLENSArduino 
#include <Wire.h>
#include <HUSKYLENS.h>
HUSKYLENS huskylens;
        
void  setup() {
  Serial.begin(9600);
  Wire.begin();
  while (!huskylens.begin(Wire)) {Serial.print("\n\t Check I2C"); delay(100);}
  huskylens.writeAlgorithm(ALGORITHM_OBJECT_RECOGNITION);
}

void loop() {
  int id=0;
  huskylens.request(id); 
  HUSKYLENSResult result = huskylens.read();
  if (result.command == COMMAND_RETURN_BLOCK){
    Serial.print("\n");
    Serial.print("\t xCenter=");  Serial.print(result.xCenter);
    Serial.print("\t yCenter=");  Serial.print(result.yCenter);
    Serial.print("\t width=");    Serial.print(result.width);
    Serial.print("\t height=");   Serial.print(result.height);
    Serial.print("\t ID=");       Serial.print(result.ID);
  }
  else{
    Serial.print("\n\t Object unknown!");
  }
  delay(1000);
}

 


   
THRandell reacted
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6910
 

@oracid That github library is invalid. 

Screen Shot 2022 08 18 at 10.23.00

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Oracid
(@oracid)
Member
Joined: 5 years ago
Posts: 18
 

@zander 

I don't remember exactly, but I guess I followed the instructions on this page, https://dronebotworkshop.com/huskylens/ which refers to this link, https://github.com/HuskyLens/HUSKYLENSArduino but I'm not sure.

Can you tell me which IDE do you use and how do you get this message.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6910
 

@oracid I am using the normal IDE 1.8.20 When I installed the github download I get the error message. It's simple to fix, just move the code up one level.

Obviously you either did not use the Arduino IDE or you encountered the error and fixed it as well. I have reported it to the maintainers but don't know how long it will take them to respond. For now, just move the source code up one level. See attached pic of correct organization.

Screen Shot 2022 08 18 at 12.22.00

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Page 1 / 3