-->

مشروع مفتوح المصدر روبوت كلب




السلام عليكم و رحمة الله

اولا ملاحظة : من يجد نقاط بيع دارة arduino بالجزائر يتصل بي و يضع تعليق اسفل الموضوع

اهدي هذا الموضوع للاستاذ رضوان
مدونة كل الكتب 
اولا هذا العمل من صنع هاوي صيني و هو روبوت كلب يحس باقتراب جسم له و يتجنب العوائق كما يقفز و يسير بشكل عادي و ليكن بعلمكم ان المشروع للبيع بصيغة PDF لكني استطعت ان ارتبه و اجلبه لكم مجانا و اريد مقابل ذلك دعوة اذا استفدتم طبعا على الاقل دعوة صادقة لانني تعبت بترتيب المصدر و وضعه كموضوع 


يبدو بالوهلة الاولى مستحيل ان تصنع مثله لكن وفر الامكانيات و تابع 







الأدوات المطلوبة:

- #1 Phillips screwdriver.
- Small (2.4mm or 3/32 inch) flat head screwdriver.
- Long nose pliers

القطع المطلوبة :

(متوفر عبر الإنترنت من جميع أنحاء العالم DAGU المتاجر التي تبيع المنتجات)

- QuadBot chassis kit.
- Pan / tilt kit.
- IR compound eye.
- Magician robot controller.
- Pack of jumper wires (male to male and female to female).
- 1x 1N5400 3A rectifier diode
- 4x small servo extension cables 100mm (4 inch).
- 2x 25mm (1 inch) brass hex spacers with suitable mounting screws.
- Small cable ties and two larger cable ties to hold the battery holder.


Quote:
ملاحظة: روبوت يعمل بشكل أفضل مع 7.4V 2300mAh بطارية كما هو ولكن يمكن أيضا العمل مع 6X بطاريات AA NiMh مع 3X2 حامل البطارية. هناك شكلان من نموذج التعليمات البرمجية اعتمادا على البطارية التي تستخدمها. الفرق الوحيد هو أن بطاريات NiMh هي أثقل بحيث يحتاج الروبوت لتحقيق التوازن بين شفرة مختلفة على رجليه الخلفيتين .



Center your servos

The QuadBot chassis kit includes 8x miniature servos and the Pan/Tilt kit includes 2 miniature servos. These servos have clear cases so you should be able to see through them well enough to check that they are centered.

When the servo is centered it can physically turn the same amount in each direction (approximately 90 degrees). Before you begin assembly check that all 10 of your servos are centered. This will save you time in later steps. Once the robot is assembled, the center position of each servo can be refined in the software if required.





Attach the foam rubber feet

Instructions are included with the QuadBot chassis and can also be downloaded from my DAGU product support site . I will go through them in detail here.

There are 8 identical leg segments included in the kit. Select 4 of them and attach foam rubber feet using the 3 x 12mm panhead screws. There are only 4 of these screws and they are the largest so they are easy to find.

NOTE:
Self tapping screws have a course thread and tapered tip that can drill into soft materials like plastic and wood.

Pan head screws have an extra large head. This is the equivalent of using a seperate washer and screw. The pan head screws in this kit are also self tapping screws.

Machine screws have a fine thread and are designed to screw into machined parts where a thread is already present.



Mount servo horns on the thigh segments


A servo horn is a piece of plastic that fits onto the output shaft of the servo and allows you to attach control rods or other devices using self tapping screws.

Take the 4 unused leg segments and fit servo horns as shown in the photo below using 2 x 6mm self tapping screws. There are are only 8 of these. Use two for each servo horn.




Attach your thigh segment to your legs

Once you have mounted the servo horns on the thigh segments they can be attached to your knee servos using 4 of the 8 supplied 2 x 8mm pan head screws. With your knee servo centered the thighs should be at 90 degrees to the leg segment with the foam rubber foot.





Left and Right legs

So far all of your legs should look identical. Now we will seperate them into left and right legs. The only difference between a left leg and a right leg is the way in which the thigh servo is mounted.

Mount you thigh servos as shown in the photo using the 2 x 8mm self tapping screws. Note the difference in the position of the output shaft in the left leg thigh servos compared to the right leg thigh servos. They are mirror imaged.


Attach your legs to the mounting plate

The mounting plate of the QuadBot chassis is the laser cut acrylic panel that you mount all your parts on. Mount your left and right legs as shown in the photo.

NOTE: the rounded end is the rear of your robot. The hole in the center of the rear is where you will mount your tail.











Fit mounting spacers to pan servo.

The brass hex spacers used to mount the pan / tilt kit require a 3mm screw but the miniature servo housing has a hole designed for a 2mm screw. Previously I have tried using a 3mm drill bit but it bites into the plastic which can break the servo mounts and it can accidently dig into the servo cable.

Since the hole only needs to be opened by a small amount I found it was easier and safer to use my phillips head screwdriver to ream out the holes on each side. Do not press to hard, you only need to ream out each side of the hole by a small amount so that the 3mm screw can be inserted without too much force.

Once you have the 3mm screw in all the way, continue turning the screw a few times so that the screw thread can drill out the hole a bit more. You can now easily fit your 25mm (1 inch) brass hex spacers. Use your pliers if necessary to hold the brass spacers when tightening the screws. Do not overtighten otherwise you will crack the servo mounts.




Attach the pan servo to the pan bracket

The pan / tilt kit comes with two large brackets. Each bracket has a different hole pattern on it to suit many different sensors. Look at the photo below and make sure you attach the correct bracket to the pan servo as the compound eye cannot be mounted if you use the wrong bracket.

The assembly instructions for the pan / tilt kit are included in the kit. They can also be downloaded from my product support site . Use 2 x 6mm pan head servos to mount the bracket to the round servo horn and another 2 x 6mm pan head to mount the servo horn onto the pan servo as shown.




Attach the tilt servo locating bracket

The tilt servo locating bracket doesn't actually hold the tilt servo in place. It's main purpose is to prevent the tilt servo from twisting while allowing some play so the servo can self center.

This bracket is mounted using two 3 x 6mm machine thread screws and two 3mm nuts. Leave these nuts slightly loose at this stage so that the bracket can move forwards and backwards slightly. We will tighten them once the servo is aligned




Attach the servo horn to the tilt bracket

Use two 2 x 6mm pan head screws to attach a round servo horn to the tilt bracket. Use holes that will allow the center hole of the servo horn to align with the bracket as shown without allowing too much play if the screws come loose.







Align the tilt servo

Use a 2.3 x 12mm screw to align your tilt servo. The servo will be a firm fit in the tilt servo locating bracket. Adjust the position so that the servo alignes with the pan bracket and allow room for spacer washers and a servo horn. Once everything is aligned you can tighten the 3mm screws holding the tilt servo locating bracket so that it wont move.
















Inserting the spacer washers

There are some spacer washers that must be inserted so that the tilt assembly can rotate smoothly. The easiest way I know to insert these spacer washers is to lie the pan / tilt assembly on it's side with the tilt bracket at about 40 degrees when the tilt servo is centered as shown in the first photo.

Stack your spacer washers neatly and insert them as best you can with your hand or long nose pliers as shown in the second photo.

Use a plastic cable tie to gently push the washers into position as shown in the third photo. Once the holes line up it's easy to insert your 2.3 x 10mm screw through the brackets and washers into the servo output shaft.

Tighten all the way being careful not to overtighten and then back off 1/4 of a turn. The tilt bracket should be able to tilt up and down fairly easily. Loosen the screw a little more if required.

Do the same on the other side with the 3 x 10mm machine screw and nylon nut on the other side.
NOTE: The nylon nut should be slightly loose so that the tilt assembly can move easily.


















Mount the eye

The IR compound eye is a simple sensor that measures ambient light and reflected IR light from an object. The eye has seven connectors. Vcc (+5V) and Ground for power. The ENable pin turns the IR LEDs on or off and then there are 4 analog outputs for up, down, left and right.

Attach the four mounting spacers on the tilt bracket as shown in the first photo. Make sure the 3mm nuts are tight.

Connect 80mm female to female jumper wires to the eye as shown in the second photo. I've used red for Vcc (+5V), black for ground (0V), orange for the enable pin and white for the 4 analog outputs.

Because 80mm is not long enough I have then attached 80mm male to male jumper wires. This gives me 160mm female to male jumper wires as shown in the third photo.

By runing the wires under the tilt bracket and then over the tilt servo as shown I find the head can move freely in any direction without pulling on the wires.












Mount the head onto the body

Use two 3 x 10mm pan head machine screws to mount the head. Notice the holes used in the first photo. The servo is mounted slightly toone side so that the pan servo's output shaft is centered rather than the servo body. The pan servo is mounted a reasonable distance back to improve the ballance of the robot and to help protect the pan servo if the robot runs into a wall.










Mount your batteries

This robot works best with a small LiPo battery (7.4V, 2300mAH) but rechargeable AA NiMh batteries are more common and easier to recharge so we will use 6x AA NiMh batteries for these instructions. Do not use alkaline batteries, the voltage is too high and they cannot put out enough current to drive the servos. This will cause your processor to continually reset. Use good quality batteries with at least 2000mAH capacity.

2 x 3 cell battery holders are fairly common and are small enough to fit between the legs of the robot. Place some tape on the ends of the wires before you starts so that they can't short out before you are ready to connect them and then install 6x fully charged batteries.

Cable tie your battery holder to the center of the mounting plate with your wires on the right hand side. Make sure all legs can move inward about 45 degrees without hitting it.Do not make the cable ties too tight ! You should be able to just slide the battery holder sideways out of the cable ties when it is time to recharge the batteries.











Mount the Magician robot controller

Attach the four supplied brass spacers to the corners of the controller PCB. Now mount the board on the chassis with the power connection on the right hand side and the analog pins closest to the head as shown in the second photo.




















Wire up the head

Connect your pan servo to A4 and your tilt servo to A5 with the white signal wire towards the female header. The software reconfigures these pins as servo outputs.

Fit small black and red female to female jumper wires to Vcc and ground as shown in the photo. These will provide power for the infrared compound eye. Check the third photo if your not certain where to connect something or download the manual from my support site . Connect the red and black power wires from the eye.

The motor control circuitry connects to the processor via 4 jumpers. remove the jumpers on D8 and D10. Leave the jumpers on D7 and D9. This allows us to use D8 to control the IR LEDs on the eye. D10 might be used to control a small speaker or LED. The left motor control circuit is still connected and can be used to drive a small shaker motor to make the tail wag.

Connect your orange jumper wire to D8 and connect your 4 analog outputs from your eye.
A0 is up.
A1 is left.
A2 is down.
A3 is right.


هذه الصورة بحجم اخر انقر هنا لعرض الصورة بالشكل الصحيح ابعاد الصورة هي 1024x772.



Power configuration

The power configuration for this robot is slightly unusual.

10 miniature servos combined can draw more than 3amps when the robot is running around. This is far more than the Magician's regulator can handle. The magician board does allow you to power up to 8 servos directly from the battery but the servos are rated at 6V and the battery is 7.2V!

To solve these problems, the pan and tilt servos which are not heavily loaded are run from analog pins 4 and 5. These pins have been converted to servo outputs in the software and have power supplied by the 5V regulator (normally used for sensors). This leaves the 8 leg servos to be powered directly from the battery.

What we do here is to use diodes to drop the voltage to a safe level. Most silicon diodes have a forward voltage drop of about 0.6V regardless of the current. The Magician controller already has a 3A diode in series with the battery to protect against accidently connecting the power around the wrong way.

This diode will drop the voltage by about 0.6V. By adding a second diode in place of the jumper that selects the servo power we effectively have two 3A diodes in series with the battery that is reducing the voltage to the servos by a total of 1.2V. Our leg servos are now getting the 6V they are rated for.

The leads on a 3A diode are slightly thicker that a male header pin. bend the leads close to the body of the diode as shown and fit two small female to female jimper wires. they will be a tight fit but this is good as it ensures a good electrical connection. Fit a red wire to the anode and a black wire to the cathode.

Now remove the servo power selection jumper and fit the diode instead. Attach the red wire to VBAT and the black wire to the center pin. The servos will now receive power through this diode. If you accidentally connect the diode the wrong way around then the servos will not get power but no damage will be done.

NOTE: If you want your robot to stand on it's hind legs with NiMh batteries then you may need to leave the diode out and use the original jumper. This will give your servos 6.6V and more power. You will increase your risk of damaging the servos slightly if you do this.







Step 20
Connect the leg servos

Start by fitting the servo extension cables to the front leg servos. Now plug in your leg servos.

D2 - Rear left hip
D3 - Rear left knee
D4 - Front left hip
D5 - Front left knee
D6 - Front right knee
D11 - Front right hip
D12 - Rear right knee
D13 - Rear right hip

Make sure your white / orange control wire is closest to the female header.






Connect your batteries.

Make sure the power switch is in the off position and then remove the tape from your black (- negative) wire. strip the wire back, twist the strands together and then bend it over before inserting into the screw terminal as shown in the photo. This will help to ensure a good connection. Now remove the tape on the red wire (+ positive) and do the same.












Add a tail

Perhaps the easiest way to make a tail is to use a short length of spiral wrap. If you don't have spiral wrap then you can make some by feeding a drinking straw through a pencil sharpener. The pencil sharpener will probably need a new blade as it has to be sharp.

Plug one end with some hotglue or putty. Then use a self tapping screw to mount it at the back of the chassis as shown in the second photo. If you can get hold of a small shaker motor from an old mobile phone then mount it on the tail and connect it to the left motor output. The sample code will shake the tail harder as your hand gets closer.

برنامج الاردوينو 










هذه الصورة بحجم اخر انقر هنا لعرض الصورة بالشكل الصحيح ابعاد الصورة هي 1024x576.



طبعا البورتات المستعملة ليست السريال كوم التقليدية بل منفد USB 

يمكنك تحميل السورس 
Installing the software

To install the sample code you must first have the Arduino IDE version 18 or later running on your computer. Download here .

The Magician controller uses the CP2102 interface IC. Depending on your OS you may need to install drivers. You can download the USB drivers as well as the QuadBot Puppy program from my support site .

Once you have the Arduino IDE running, you can open the program. Make sure you have the version suited to the batteries you are using so that the robot will be able to stand on it's hind legs. You will see that the code has a constants tab and an IO pins tab.

The constants tab stores values such as the center positions of servos. This makes it quick and easy to fine tune your code. The IOpins tab is like a map for your wiring. It tells you which device is connected to what pin.

Go to the tools menu and select your board type. The Magician controller is compatible with "Arduino NG or older /w ATmega8"

Now plug in your USB cable. After a few seconds your computer should detect the USB interface of the Magician controller. Go back to the tools menu and select your USB virtual serial port.

Press the reset button on the controller and upload the program
Quote:
ممنوع النقل دون ذكر جالب الموضوعhttp://allkutub.blogspot.com/ و ايضا ذكر DZV.EXE@GMAIL.COM
اخيرا هذا شكله و هو يحس باقتراب يدك كما يتجنب الاجسام و يركض كالكلب و كل شيء امامكم فقط قليلا من التركيز كما يمكن ان تستفيدو منه باشياء اخرى تخصكم و تطورون منه .

تعليقات ديسكس
جميع الحقوق محفوظة ل SOFT XYZ