Go Down

Topic: robot NOT doable for novice? or should i keep search instruction (Read 4626 times) previous topic - next topic

jamie11


PaulS

Quote
What kind of computer (min. capacity etc...) do i need
The one that you posted this on is probably adequate. The IDE and compiler don't place a lot of demands on the computer.

Quote
and how to do the next steps.
Well, first you make a list of "the next steps". Then, as you write the code, and test it, you check them off. When everything is checked off, you're done.
The art of getting good answers lies in asking good questions.

PaulS

You built a robot arm, but you have no idea what you want it to do?

Have you done ANYTHING with the Arduino before? Building a robot arm, and having an Arduino drive it, is NOT a beginner project.
The art of getting good answers lies in asking good questions.

PaulS

Quote
I just want it to do something "simple" like picking up an object by moving the  arm up/down or left/right.
You need to tell us more about this robot arm. You mention one servo, but you need more than one, since you (should) have more than one joint. You need some kind of gripper mechanism, usually controlled by a servo, too.

The one I have parts for uses 3 stepper motors and a servo to move the arm (3 joints) and open/close the gripper.

What does yours have?

The art of getting good answers lies in asking good questions.

pert

I got a Starter Kit for Arduino 20-013-308
Here's the kit:https://www.sainsmart.com/sainsmart-uno-r3-basic-starter-kit-for-arduino-uno-r3.html

I begin to wonder if DIY robots are NOT doable for novice?
You need to learn the basics before you can do something more advanced like a robot arm. So forget about the arm for now.

* There are 3 "chips" about 2" x 3"
(1 of those 3 chips says "UNO … Digital PWM", another one has # "20-011-953 SainSmart UNO")
Those are not chips those are boards. "Chip" is a term used for an IC (integrated circuit). There are chips on the board but the board should not be called a chip.

The board that says "SainSmart UNO" is an Arduino Uno clone. One of the chips on that board is an ATmega328P microcontroller. This is the chip that you will be programming using the Arduino IDE.

Install the Arduino IDE, plug in your Uno, and start working your way through the relevant examples in the File > Examples > Built-In Examples menu, starting with 01.Basics. Make sure you understand what every line of the example does before moving on to the next example. Make some changes to each example and then check to be sure it did what you expected it to. You can get help by reading the tutorial pages for each example at:
https://www.arduino.cc/en/Tutorial/BuiltInExamples
and the language and library reference pages:
http://www.arduino.cc/en/Reference/HomePage
as well as a search engine.

pert

Thank you. But since the Sainsmart instruction is so long and complicated
The Arduino project has tried to reduce the amount of unnecessary complexity but electronics and programming microcontrollers is an inherently complicated subject. If you're looking for easy and simple you've chosen the wrong project and you should probably just give up now. There is a ton of information available to you, it just takes a little bit of quality time with your favorite search engine to find it. This information is readily available but I'm going to be nice and try to get you started:

  • Install the Arduino IDE following these instructions: https://www.arduino.cc/en/Guide/HomePage
  • Plug the USB cable into the board that says "Sainsmart UNO" on it
  • Plug the USB cable into your computer.
  • Start the Arduino IDE
  • Select the port of your Sainsmart UNO from the Tools > Port menu
  • Tools > Board > Arduino/Genuino Uno
  • File > Examples > 01.Basics > BareMinimum
  • Read through the code line by line and make sure you understand what every line does, using this tutorial page as a guide: https://www.arduino.cc/en/Tutorial/BareMinimum
  • Sketch > Upload - the sketch should be successfully uploaded to your Uno. Does it do what you expect it to do?
  • File > Examples > 01.Basics > Blink
  • Read through the code line by line and make sure you understand what every line does, using this tutorial page:https://www.arduino.cc/en/Tutorial/Blink and the Language Reference page: https://www.arduino.cc/en/Reference/HomePage as a guide.
  • Sketch > Upload - does it do what you expect it to do?
  • Change the Blink sketch to make the LED blink faster, upload, make sure it works as expected.
  • Continue your way through the examples, following the same steps (read, upload, modify, upload). Pay special attention to File > Examples > 02.Digital > BlinkWithoutDelay.


If you run into any problems along the way spend some time searching the internet for information. Many thousands of people have been through this process before you so just about anything you need to know is already documented.

pert

I've downloaded IDE and tested the board by running Blink and it blinked.
Is that all you did? If so, you're nowhere near ready to start on the arm.

But then after hours of searching I haven't found any instructions about assembling all the boards and electronic parts that came with the kit (i have only put the metal parts together to make it look like an arm).
Could you help me with that please (some pictures or instructions please)?
From looking at the webpage for the kit, the only parts that would be potentially useful for building an arm are the Uno, the servo, the stepper motor, and the stepper motor driver. Whether those parts will be used in your project I have no way to know because you haven't provided any information and the webpage for the kit doesn't give any specs. You seem to be under the impression that the random parts you got in this kit will somehow magically be what you need to make a robot arm. So please explain exactly what you're trying to accomplish, how about you help us out with some pictures of your metal parts put together to look like an arm.

From your description of the servo it looks like it's this one:
https://it.aliexpress.com/store/product/wholesale-High-quality-standard-metal-digital-servo-DS3115-15Kg-for-Futaba-JR-rc-Car-helicopter-airplane/1918397_32608875006.html
This has 3 wires, probably with a female dupont style connector:
  • The yellow wire is the signal wire. This will be connected to one of the digital pins on the Arduino. The
  • The red wire is the power supply positive line. Typically you will want to power servos via a separate power supply.
  • The brown wire is the ground. You must connect the ground of the Arduino to the ground of the servo power supply.


As for the stepper motor, I have no way of giving you any information on that without more information on both the motor and the driver. We need to know what the driver chip is, the model number is printed on the chip. We need to know which type of stepper motor it is.

I appreciate your help a lot since i have to go to the library to use the internet.
That makes no sense. You have to get on the internet to use the Arduino forum too.

manor_royal

Have you tried the servo examples here? (Also find them in the IDE: File > Examples > Servo, no Internet required.)

With those you could at least probably get your elbow to elbow. (Don't know if you have a potentiometer or joystick for the Knob example; but you could use Sweep too probably, just not from 0-180 but choose end angles to suit.)

(Not to be funny, but this thread's 2 weeks old tomorrow: you could surely have worked through the IDE examples and the notes with your kit in that time?)

If this was a Civil Engineering forum would there be posts like "I need to build a bridge. Someone send me drawings."

pert

When you post links please use the chain links icon on the toolbar to make them clickable.

Beside the metal parts that i've put together to make it look like an arm and screws/wires, these are included in the kit:
* 1 "Solderless Breadboard" about 2" x 8"
* There are 3 "boards" about 2" x 3"
(one says "CNC SHELD", one says "UNO … Digital PWM", another one looks almost the same but says "Digital PWM 20-011-953 SainSmart UNO")

* 4 tiny "boards" about 1" x 3/4"
* 1 small remote control "Special for MP3"
* The sticker on the box says "Starter Kit for Arduino   20-013-308"

I found some pictures online that look somewhat like my kit:
the electronic parts: http://www.ebay.com/itm/US-Ship-Arduino-CNC-kit-UNO-R3-Shield-4-x-A4988-Drivers-/321991713978
So are you saying that your kit is not the one I linked previously:
https://www.sainsmart.com/sainsmart-uno-r3-basic-starter-kit-for-arduino-uno-r3.html
That's SainSmart SKU 20-013-308. That CNC kit is not going to be very useful with your arm kit because the CNC kit is made for driving stepper motors but the arm is made to use servo motors.

the arm: http://www.ebay.com/itm/New-6DOF-Aluminium-Mechanical-Robotic-Arm-Clamp-Claw-Mount-Robot-Kit-/182210607390?hash=item2a6c99391e:g:3~IAAOSwLF1X9NkZ

Pert, the picture of servo ks-35 18 from your link is the one i have (the link is not in english though).
From what I can see that arm uses at least 5 servos. If you only have one you can see the problem. I don't think you could even assemble the arm without having all the servos. I see the kit says "no base". Without some sort of motor in the base the arm will not be able to rotate so it will be pretty limited in motion.

You also need to make sure that the servos you get are compatible with the kit. They need to fit the mounts and also be strong enough to hold the weight of the arm and the object the arm is holding. The lowest servo will tend to have the most load on it because it's supporting the entire arm and other servos and there will be quite a bit of leverage when the arm is extended outwards. Don't forget you need a sufficient power supply to run the servos. You definitely don't want to power it off the Uno.

Figure out the entire bill of materials (BOM) for your project and get the parts ordered. While you wait you can get to learning the basics with the parts you do have so you'll be able to program the arm to do some cool stuff once you get it finished.

saw one that said "sweep" and had the coding (i guess it makes the arm move in some direction?) but the problem is i don't know how to put those electronic parts together yet. I hope you guys would give me some instruction please.
Read my last reply. I already told you how to wire the servo. It's time for you to take responsibility for your own learning. We're happy to help you here but I'm not going to spoon feed you.

pert

Now we have something to work with! You indicated there was only one servo, the kit inventory indicated there was only one servo, the arm kit doesn't come with any servos so you can see where it would be difficult for us to know what's going on.

the servo's 3 wires have one mutual end with 3 tiny holes so i could only "guess" in order to connect it with the arduino board i would need to use the accompanying tiny wires having 2 pointy ends and which holes exactly on the arduino board i don't know neither
  • Connect the yellow wire on the servo to any of the I/O pins on the Uno. Each servo's yellow wire will be connected to a different I/O pin. Start by just connecting one servo to the pin marked "9".
  • Connect the red wire to the positive wire of a power supply in the range of 4.8-7.2 volts DC that supplies enough current for all the servos. Higher voltage will give your arm more strength and speed.
  • Connect the brown wire of the servo to the negative wire of the power supply and one of the pins on the Uno marked "GND".
  • Plug in the servo power supply
  • Plug in the Uno to your computer
  • File > Examples > Servo > Sweep
  • Tools > Board > Arduino/Genuino Uno
  • Tools > Port > select the port of your Uno
  • Sketch > Upload


You should now see the servo start moving back and forth. You can adjust the sketch to change the range of the sweep. The servo will have a certain maximum and minimum position value it can sweep to that you can determine experimentally. Beyond this range you will hear a grinding noise. Do not exceed this range or you can damage the servo. For more information use these pages as a reference:

https://www.arduino.cc/en/Reference/Servo

https://www.arduino.cc/en/Tutorial/Sweep

You will notice that in the tutorial page they are powering the servo from the Arduino. This is OK for one small servo but trying to power 3 relatively powerful servos attached to an arm from the Arduino is almost certainly going to cause you problems because of electrical noise and/or the power supply of the Uno not providing enough current. You really need the separate power supply for the servos. You may already have an appropriate power supply kicking around or you can often salvage them from electronics junk (often the device breaks or becomes obsolete but the power supply is fine) or buy them cheap at a thrift store.

Once you have one servo working correctly connect the others and test them out. Now it's time to make the arm work. If you look around you may find there is pre-written code for robotic arms available that can be adapted to your needs, I have no experience in that area.

Identification of parts in the pictures:
  • CNC.jpg - this is a CNC shield used to connect stepper motors to your Uno for 3-axis control, this could be used to make a CNC plotter, router, 3D-printer, etc. Shields are made to plug on top of the Uno. This will not be useful for your servo based arm.
  • tiny-board.jpg - this is a stepper driver used to control stepper motors. The picture is blurry but I believe it uses the A4988 driver chip. This will not be useful for your servo based arm.
  • UNO_sainsmart.jpg - this is an Arduino Uno clone. It's a circuit board with an ATmega328P microcontroller and the basic support circuitry for that microcontroller. This is the brains of your arm.
  • UNO.JPG - this is another Arduino Uno clone, just like the SainSmart Uno but made by a different manufacturer. So this part is redundant but it's very nice to have a spare Uno so you can dedicate one to the arm and have another for experimentation or as a replacement if you end up frying the other.

pert

Is there a way for me to use the battery holder (with compartments for 6 x 1.5V batteries which came with my kit) to supply power to the servo
I don't have much knowledge in this area or specs on your servos. Maybe someone else can offer better advice. 6 batteries x 1.5 V/battery = 9 V so you would need to be sure not to exceed the maximum safe voltage for your servos. From what I can understand of the aliexpress page I posted previously the voltage range is 4.8-7.2 V, which makes me think connecting 9 V is not a good idea. You could use a step down converter or voltage regulator to reduce the voltage.

this holder only has one power jack (its 2 wires are soldered at the jack and i really don't have the knowledge or tools to "un-solder" them into pos and neg)
There are probably some female barrel jack adapters you could buy to accomplish this or you might be able to jam some jumper wires into the terminals of the battery pack (though this will likely not be very stable) but if you're planning to continue experimenting with electronics you eventually will need to get the soldering equipment and learn to use it. Breadboards and jumpers are OK for prototyping but will never provide the long-term reliability of soldered connections.

I am confused here because if i use one end of a jumper wire to plug into the brown wire then i would have only one end left to plug into either the power supply or the pin on the Uno marked "GND" but not both? (and also: my battery power supply box has only one jack as described above and no pins)
One way to accomplish this is to connect the GND pin on the Uno, the ground from the servo power supply, and the ground to the servos via the ground rail on your breadboard.

4) is it safe for me to test run the sketch "Sweep" with the servo already attached in the robot arm?
(because i was searching online and saw someone was saying "don't attach the servo to the robot arm when you run the Sweep sketch" without explanation)
The Sweep sketch is going to make the servo move back and forth. You don't want to move past the maximum range of the servo and the robot arm may also impose some range limitations. Running the servo past the maximum range may damage the servo. The Sweep sketch is also going to lead to the arm swinging back and forth, which might not very desirable. Testing with the servo not attached to the arm is the safest approach and will eliminate any issues that could be caused by the load of the weight of the arm. You could start with a reduced sweep range and then experimentally expand this incrementally until you discover the appropriate configuration for your servo and arm.

5) the kit also has a breadboard. Do i need to use it for my robot arm (to do some simple movement like picking up something (bending down then up)?
A breadboard just makes it easy to connect things together. I explained one use for it regarding your ground connection issue above. One thing you need to keep in mind about breadboards is the connections are not always very reliable, especially once they have been used for a while, especially with larger leads that stretch the springs out. It's very easy to prototype and experiment with breadboards but they're really not suitable for long term usage in a final project. You bump the thing and a jumper comes loose and then you have to figure out where it went. The connections get dicey and you have to start wiggling everything around when the arm doesn't work reliably.

pert

OK, I missed that about the rechargeable batteries somehow. That should work at 6 V. I'm not sure what the max current the batteries can put out or what the requirements of the servos are.

manor_royal

Quote
is 7.2V ok for my servo or is it still too high?
The link actually says that the "Tensione di funzionamento" is 4.8-7.2 Volt, so why are you asking that?

If this was a Civil Engineering forum would there be posts like "I need to build a bridge. Someone send me drawings."

Go Up