Robô Pick n Place computadorizado

Computerized Pick n Place Robot

The complete Pick and Place Robot is a combination of three subsections

1. Robotic mechanism

2. Hardware driver circuit

3. Controlling software in VC++

Obviously, the main part will be the mechanism that actually forms the body of the robot meaning movable robotic arm that picks up or places any object .

The function of the hardware driver circuit is to drive all three motors and drive all movements of the robot.

Control software is also an important part of this robot because it will take care of all the control actions. The main functions of this section are

Rotate the hand to a specific angle from where the object is to be picked or placed

  • Move your hand up or down to pick up or place the object.
  • Open or close the fist depending on the size of the object

First, let's start with the mechanics

Robotic Mechanism: –

The figure below shows the 3-D view of the mechanism

Computerized Pick n Place Robot

The entire mechanism is made of wooden sheets, only the handles are made of steel. There are so many parts, so let's understand them one by one.

Fixed base: – The fixed base provides complete housing for the drive circuit, AC motor (ACM1) and all connections. It provides the platform to move and rotate the hand.

Swivel wheel: – It provides housing for manual movement and DC gear motor (DCM1). It is a freely rotating platform that rotates the hand in a full 360 degree circle. It is directly coupled to the ACM1 axis.

Moving hand: – It is coupled to the DCM1 with a platform provided on a rotating wheel. It is allowed to move up and down freely up to a maximum of 90 degrees. At the front end of the hand there are two grips, one is fixed (lower) and the other is sliding (upper). The sliding handle can slide back and forth using the second DC gear motor (DCM2). The rear end of the hand provides housing for the DCM2, which is directly coupled to the slide grip. Here the angular (circular) momentum of the motor is converted into linear motion of the slide handle by etching grooves into the wooden slide handle that exactly match the gear teeth.

AC Motor (ACM1): – The function of this motor is to rotate the entire turntable to some specific angle. This motor has an exactly calibrated speed of 2 RPM (revolutions per minute) with an applied voltage of 230 VAC and a frequency of 50 Hz. Thus, we can calibrate the rotation angle very easily

2 revolutions = 2×360 degrees = 720 degrees,

It means that in one minute the engine will rotate 720 degrees. Now, in 1 minute = 60 seconds, the motor rotates 720 degrees, so let's calculate how much it will rotate in 1 second.

Second degree of rotation

60 720

1 720/60 = 12 degrees

Therefore, in 1 second, the motor will rotate exactly 12 degrees. It means if you supply power for 1 second, the motor will rotate only 12 degrees. So you can easily select the steps to rotate the motor, such as 30 degrees (30, 60, 90,…) 45 degrees (45, 90, 135,…)

DC Gear Motor (DCM1): – It is used to move the hand up and down within the limit of an angle of 90 degrees. Built-in gears reduce motor speed to about 5 RPM at 12 VDC. So, calculating the angle of rotation in 1 second

Second degree of rotation

60 5×360 o = 1800 o

1 1800/60 = 30 o

It means if you supply power for 1 second, the motor will only rotate 30 degrees. You can adjust a maximum of 3 steps of 30, 60 and 90 degrees

DC Gear Motor (DCM2): – It is used to open or close the handle to pick up the object. You can increase or decrease the handle opening depending on the size of the object. The built-in gear rotation ratio provides speed of about 10 RPM. Let's calculate the rotation angle again for 1 second

Second degree of rotation

60 10×360 o = 3600 o

1 3600/60 = 60 o

Here the motor will rotate 60 degrees if power is supplied for 1 second. The groves are engraved in such a way that when the motor turns 60 degrees the handle moves about 1-2 cm. So ultimately you can open or close the handle in steps of 1 cm (1, 2, 3…), 2 cm (2, 4, 6…).

Hardware Driver Circuit

Hardware Driver Circuit

The figure in circuit tab 1 shows the driver circuit schematic. It is a single chip circuit and IC UNL2003A is the main component of it. Other components are 25-pin D-type female connector, single C/O relay (RL1, RL2, RL3, RL5) and double C/O relay (RL4, RL6).

Connections: – The outputs of connector D0 to D6 are connected directly to the UNL2003A inputs and the chip outputs are supplied to one of the coil terminals of each relay. The other coil terminal of each relay is connected directly to the 12 V DC supply. The 'common terminal' (C) of RL1 is connected to 230VAC and the 'Normally Open' (N/O) terminal is connected to the 'C' terminal of RL2. Both terminals of RL2 (N/C, N/O) are connected to ACM1. For both relays RL4 and RL6, the alternative N/C and N/O terminals are shorted. One of these pairs is connected to ground and the other pair receives a DC supply of 12 V and 5 V through RL3 and RL5, respectively.

Operation: – The UNL2003A chip consists of 7 Darlington pairs and whenever it receives a logic high at its input it will provide a logic low at its respective output. So whenever you apply high logic through the PC to the chip, it will give a corresponding low output. As the outputs are connected to the relay coil terminals, the relays will be energized due to current passing through the coil. When the relay is energized, its connection changes from N/C to N/O and it will perform some specific task. The table below shows the function of each relay in the circuit.

Retransmission

Its function in the circuit

RL1

To start or stop ACM1 rotation

RL2

To change the direction of the ACM1

RL3

To start or stop DCM1 rotation

RL4

To change the direction of DCM1

RL5

To start or stop DCM2 rotation

RL6

To change the direction of the DCM2

VC++ programs

Software program in VC++

Computerized Pick n Place Robot

The software is written in the VC++ programming language. Here I am considering that you are very familiar with VC++. Therefore, I am not discussing here how the application is created and designed in VC++. Here is the application.

It has 14 different objects

{C}{C}{C}{C}{C}{C} · {C}{C}{C}{C}{C}{C} 7 buttons

{C}{C}{C}{C}{C}{C} · {C}{C}{C}{C}{C}{C} 6 radio buttons

{C}{C}{C}{C}{C}{C} · {C}{C}{C}{C}{C}{C} 1 group box.

The functions and properties of each object are explained in the table below:.

Mr. No.

Object

properties

Function

1

Group box

ID: -IDC_Angle

Provide grouping for all radio buttons

Legend: – Select a rotation angle

two

Option button 1

ID: IDC_RADIO1

Selects the AC motor rotation angle within 30 degrees.

Caption: 30 degrees.

Group Option: Checked

3

Option button 2

ID: IDC_RADIO2

Selects the AC motor rotation angle at 60 degrees.

Caption: 60 degrees.

4

Option button 3

ID: IDC_RADIO3

Selects the AC motor rotation angle at 90 degrees.

Caption: 90 degrees.

5

Option button 4

ID: IDC_RADIO4

Selects the AC motor rotation angle from 120 degrees.

Caption: 120 degrees.

6

Option button 5

ID: IDC_RADIO5

Selects the AC motor rotation angle from 150 degrees.

Caption: 150 degrees.

7

Option button 6

ID: IDC_RADIO7

Selects the AC motor rotation angle from 180 degrees.

Caption: 180 degrees.

8

Button 1

Code: IDC_CL

Rotate the AC motor clockwise

Legend: Rotate clockwise

9

Button 2

ID: IDC_ACLK

Rotate the AC motor counterclockwise

Legend: Rotate counterclockwise

10

Button 3

Code: IDC_UP

Move the robot hand up

Caption: Move hand up

11

Button 4

ID: IDC_DWN

Move the robot hand down

Caption: Move hand down

12

Button 5

ID: IDC_OPN

Open hand grip

Caption: Open Fist

13

Button 6

Code: IDC_CLOS

Close handshake

Caption: Closed Grip

14

Button 7

ID:IDC_XIT

Exit the application

Caption: Exit the program

After going through the design, let's move on to the operation of the program.

Operation: – All option buttons select different rotation angles (from 30 to 180 ° ) for AC motor (ACM1). As we know, if we supply power to ACM1 for 1 second, it will rotate 12 o . So, to rotate in steps of 30 we have to provide supply in multiples of 2.5 seconds. So in effect, all of these radio buttons will select the desired delay (2.5 seconds or 5 seconds, 7.5 seconds… same way) for which the ACM1 will receive AC power.

The Rotate clockwise/counterclockwise button will rotate the ACM1 clockwise/counterclockwise.

{C}{C}{C}{C}{C}{C} · {C}{C}{C}{C}{C}{C} The clockwise button will turn on relay RL1 for the time delay selected by the radio buttons

{C}{C}{C}{C}{C}{C} · {C}{C}{C}{C}{C}{C} The counterclockwise button will turn on two relays RL1 and RL2 at a time, so that ACM1 rotates in the other direction.

The pointer up/down buttons will activate RL3 or RL3 and RL4 together for 0.5 seconds to make the DCM1 rotate clockwise or counterclockwise and move the pointer up or down.

The handle open/close buttons will turn RL5 or RL5 and RL6 together for 0.5 seconds to have the DCM2 rotate clockwise or counterclockwise or move the sliding handle forward or backward to open or close the handle.

One more functionality is added: if someone wants to rotate the ACM1 to any different angle, like 45 degrees, they can do so by moving the mouse by holding down the Left/Right mouse button. The motor will rotate until the mouse moves.

Project source code

Project source code

###


empty CMyroboDlg::OnClk
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);
change (m_angle)
{
case 0:
{
delay = 2500;
to break;
}
case 1:
{
delay = 5000;
to break;
}
case 2:
{
delay = 7500;
to break;
}
case 3:

{
delay = 10000;
to break;
}
case 4:
{
delay = 12500;
to break;
}
case 5:
{
delay = 15,000;
to break;
}
}
UpdateData(FALSE);
_outp(0x0378,0x01);
Sleep(gently);
_outp(0x0378,0x00);
}
empty CMyroboDlg::OnAclk
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);

change (m_angle)
{
case 0:
{
delay = 2500;
to break;

}
case 1:
{
delay = 5000;

to break;
}
case 2:
{
delay = 7500;
to break;
}
case 3:
{
delay = 10000;
to break;
}
case 4:
{
delay = 12500;
to break;
}
case 5:
{
delay = 15,000;
to break;
}
}
UpdateData(FALSE);
_outp(0x0378,0x03);
Sleep(gently);
_outp(0x0378,0x00);

}
empty CMyroboDlg::OnUp
{
// TODO: Add your control notification handler code here
_outp(0x0378,0x08);
Sleep(500);
_outp(0x0378,0x00);
}
empty CMyroboDlg::OnDwn
{

// TODO: Add your control notification handler code here
_outp(0x0378,0x18);
Sleep(500);
_outp(0x0378,0x00);
}
empty CMyroboDlg::OnOpn
{
// TODO: Add your control notification handler code here
_outp(0x0378,0x10);
Sleep(500);
_outp(0x0378,0x00);
}
empty CMyroboDlg::OnClos
{
// TODO: Add your control notification handler code here
_outp(0x0378,0x30);
Sleep(500);
_outp(0x0378,0x00);
}
empty CMyroboDlg::OnXit
{
// TODO: Add your control notification handler code here
In OK ;
}
void CMyroboDlg::OnMouseMove(UINT nFlags, point CPoint)
{
// TODO: Add your message handler code here and/or call default
if((nFlags & MK_LBUTTON) == MK_LBUTTON)
{
_outp(0x0378,0x02);
Sleep(250);
_outp(0x0378,0x00);
}
else if((nFlags & MK_RBUTTON) == MK_RBUTTON)
{
_outp(0x0378,0x06);
Sleep(250);
_outp(0x0378,0x00);
}
CDialog::OnMouseMove(nFlags, dot);
}

###

Circuit diagrams

u02

Related Content

Back to blog

Leave a comment

Please note, comments need to be approved before they are published.