<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Bajdi.com</title>
	<atom:link href="http://www.bajdi.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bajdi.com</link>
	<description>Breadboards Arduino Joystick DHT22 IR ...</description>
	<lastBuildDate>Sat, 18 May 2013 11:07:48 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Added some leds to my hexapod</title>
		<link>http://www.bajdi.com/added-some-leds-to-my-hexapod/</link>
		<comments>http://www.bajdi.com/added-some-leds-to-my-hexapod/#comments</comments>
		<pubDate>Sat, 18 May 2013 11:07:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Bajdupod 996R]]></category>
		<category><![CDATA[hexapod]]></category>
		<category><![CDATA[LED]]></category>

		<guid isPermaLink="false">http://www.bajdi.com/?p=1090</guid>
		<description><![CDATA[I&#8217;ve added the top chassis plate to my hexapod. I glued 16 blue leds to it and then soldered wires to the leds. The wires are connected to 2 74HC595 shift registers. My hexapod needed some sensors so I mounted 3 small servos to it. One in the bottom plate that sweeps a SRF06 ultrasonic [...]]]></description>
				<content:encoded><![CDATA[<p><iframe width="560" height="315" src="http://www.youtube.com/embed/BIqxbzhHatg" frameborder="0" allowfullscreen></iframe></p>
<p>I&#8217;ve added the top chassis plate to my hexapod. I glued 16 blue leds to it and then soldered wires to the leds. The wires are connected to 2 74HC595 shift registers. My hexapod needed some sensors so I mounted 3 small servos to it. One in the bottom plate that sweeps a SRF06 ultrasonic sensor. On the top plate I mounted a pan/tilt kit with a SR04 ultrasonic sensor and a Rocket brand studios Wiicamera. I glued another 2 blue leds to the pan tilt kit. These are controlled by 2 PWM pins. All the sensors and leds are controlled by the Seeeduino Mega, so a 16MHz 8 bit micro controller is more then fast enough to control a total of 21 servos and some sensors.<br />
I now need to learn my hexapod some tricks based on the sensor input <img src='http://www.bajdi.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Some photos:</p>
<p><div id="attachment_1084" class="wp-caption alignnone" style="width: 630px"><a href="http://www.bajdi.com/wp-content/uploads/2013/05/bajdupod-996r-top.jpg"><img src="http://www.bajdi.com/wp-content/uploads/2013/05/bajdupod-996r-top-1024x682.jpg" alt="Bajdupod 996r top" width="620" height="412" class="size-large wp-image-1084" /></a><p class="wp-caption-text">Bajdupod 996r top</p></div><br />
<div id="attachment_1082" class="wp-caption alignnone" style="width: 630px"><a href="http://www.bajdi.com/wp-content/uploads/2013/05/bajdupod-996r-front.jpg"><img src="http://www.bajdi.com/wp-content/uploads/2013/05/bajdupod-996r-front-1024x682.jpg" alt="Bajdupod 996r front" width="620" height="412" class="size-large wp-image-1082" /></a><p class="wp-caption-text">Bajdupod 996r front</p></div><br />
<div id="attachment_1083" class="wp-caption alignnone" style="width: 630px"><a href="http://www.bajdi.com/wp-content/uploads/2013/05/bajdupod-996r-top-leds.jpg"><img src="http://www.bajdi.com/wp-content/uploads/2013/05/bajdupod-996r-top-leds-1024x682.jpg" alt="Bajdupod 996r in action" width="620" height="412" class="size-large wp-image-1083" /></a><p class="wp-caption-text">Bajdupod 996r in action</p></div><br />
<div id="attachment_1081" class="wp-caption alignnone" style="width: 630px"><a href="http://www.bajdi.com/wp-content/uploads/2013/05/bajdupod-996r-front-leds.jpg"><img src="http://www.bajdi.com/wp-content/uploads/2013/05/bajdupod-996r-front-leds-1024x682.jpg" alt="Bajdupod 996r in action" width="620" height="412" class="size-large wp-image-1081" /></a><p class="wp-caption-text">Bajdupod 996r in action</p></div></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bajdi.com/added-some-leds-to-my-hexapod/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New chassis for my hexapod :)</title>
		<link>http://www.bajdi.com/new-chassis-for-my-hexapod/</link>
		<comments>http://www.bajdi.com/new-chassis-for-my-hexapod/#comments</comments>
		<pubDate>Sun, 28 Apr 2013 20:58:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Bajdupod 996R]]></category>
		<category><![CDATA[hexapod]]></category>

		<guid isPermaLink="false">http://www.bajdi.com/?p=1068</guid>
		<description><![CDATA[Bajdupod 996R: Arduino hexapod from Bajdi on Vimeo. I finally finished the design of my hexapod chassis and had it laser cut this week. I had 3 plates laser cut in acrylic. The original chassis was a bit to small to fit everything. So I designed a bigger chassis and went for 3 decks. This [...]]]></description>
				<content:encoded><![CDATA[<p><iframe src="http://player.vimeo.com/video/64988247" width="600" height="337" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
<p><a href="http://vimeo.com/64988247">Bajdupod 996R: Arduino hexapod</a> from <a href="http://vimeo.com/user10093506">Bajdi</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>I finally finished the design of my hexapod chassis and had it laser cut this week. I had 3 plates laser cut in acrylic. The original chassis was a bit to small to fit everything. So I designed a bigger chassis and went for 3 decks. This gives me enough room for the battery and electronics.  Between the bottom and the middle plate are the Lipo battery, UBEC&#8217;s and power <a href="http://www.bajdi.com/bajdupod-996r-the-saga-continues/servo-board-rev2/" title="servo power board" target="_blank">servo power PCB</a>. Between the middle and the top plate are the Seeeduino Mega and my <a href="http://www.bajdi.com/something-different-a-crash-robot/bajduino-mega-3a-2/" title="Bajduino Mega 3A" target="_blank">Bajduino Mega 3A</a> with the ATmega1284 micro controller. I could run all the code on one micro controller but it&#8217;s more fun to use 2. The 2 micro controllers communicate with each other over hardware serial. The Bajduino Mega 3A has a header for the nRF24L01 module and at the moment it only handles the wireless communication.<br />
<div id="attachment_1066" class="wp-caption alignnone" style="width: 630px"><a href="http://www.bajdi.com/wp-content/uploads/2013/04/bajdupod-996r-chassis1.jpg"><img src="http://www.bajdi.com/wp-content/uploads/2013/04/bajdupod-996r-chassis1-1024x680.jpg" alt="Bajdupod 996R chassis" width="620" height="411" class="size-large wp-image-1066" /></a><p class="wp-caption-text">Bajdupod 996R chassis</p></div><br />
While I took the hexapod apart to fit the new chassis I replaced all the servo horns with metal ones. I also fitted bearings in the bottom plate of the chassis, these hold the legs. As you can see in the video the servos need to be better calibrated so all 6 legs are the same. Sounds simple but it&#8217;s not that easy to get it right.<br />
I have not fitted the top plate yet, that&#8217;s for later. I&#8217;ll also be adding some leds and sensors.</p>
<p>BTW If you&#8217;re wondering what the strange music is in the video, the ice cream van just drove by while I shot the video in the garden <img src='http://www.bajdi.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />     </p>
]]></content:encoded>
			<wfw:commentRss>http://www.bajdi.com/new-chassis-for-my-hexapod/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bluetooth remote control</title>
		<link>http://www.bajdi.com/bluetooth-remote-control/</link>
		<comments>http://www.bajdi.com/bluetooth-remote-control/#comments</comments>
		<pubDate>Sat, 20 Apr 2013 09:14:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Arduino sketches]]></category>
		<category><![CDATA[HC05]]></category>
		<category><![CDATA[robot]]></category>

		<guid isPermaLink="false">http://www.bajdi.com/?p=1058</guid>
		<description><![CDATA[I&#8217;ve bought me a HC05 bluetooth module on Ebay. And I also recently got me a Samsung smartphone. When you trow an Arduino robot in the mix you get the above video The HC05 bluetooth modules seem to be very popular. You can easily find them on Ebay. I bought the module on a small [...]]]></description>
				<content:encoded><![CDATA[<p><iframe src="http://www.youtube.com/embed/8vQK4vmZpy8" height="315" width="560" allowfullscreen="" frameborder="0"></iframe></p>
<p>I&#8217;ve bought me a HC05 bluetooth module on Ebay. And I also recently got me a Samsung smartphone. When you trow an Arduino robot in the mix you get the above video <img src='http://www.bajdi.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The HC05 bluetooth modules seem to be very popular. You can easily find them on Ebay. I bought the module on a small PCB that has a 3.3V voltage regulator. As the HC05 module works at 3.3V. Communicating with the module is very easy. It&#8217;s just plain simple serial, so you don&#8217;t need any special libraries.</p>
<p>I connected the TX/RX signals of the HC05 bluetooth module to an ATmega1284 through a voltage divider. I used a 10K and a 5K6 resistor to drop the voltage from 5V to 3.2V. I just soldered the resistors and some pins to a piece of perfboard. I used an ATmega1284 as it has 2 serial ports, one for uploading sketches and the serial monitor and the other for the bluetooth module. You can of  course connect it to an Arduino with an ATmega328 using the software serial library. It doesn&#8217;t make much difference in the code.</p>
<p>So after connecting the HC05 module to my Bajduino I needed to try it out. I just got myself a new Android smartphone so I started browsing the Android play store for a suitable app. Then I remembered that Rocket Brand Studios sells a small app to control a robot, <a href="https://play.google.com/store/apps/details?id=appinventor.ai_rocketbrand.RocketBotControllerV6" title="Rocketbot robot controller" target="_blank">Rocketbot robot controller</a>. It isn&#8217;t a free app but it costs less then 2€. And I have to say it is a great app for a small price. </p>
<p>After successfully trying out the example sketch from Rocket Brand studios I wrote a simple sketch to control a robot with 2 continuous rotation servos. Here is the sketch:</p>
<pre class="brush: arduino; title: ; notranslate">

// Bluetooth controlled Arduino robot
// http://www.bajdi.com
// HC05 bluetooth module receicing 2 bytes from Android app
// Android app = Rocket Bot Controller (rocketbrandstudios.com)
// 2 continuous rotation servos
// µController = ATmega1284P-PU


#include &lt;Servo.h&gt; 

Servo leftServo;  // create servo object to control a servo
Servo rightServo;  // create servo object to control a servo
int qualifier;
int dataByte;

void setup()

{
  Serial.begin(57600);   // serial monitor
  Serial1.begin(9600);   // HC05 bluetooth module
  leftServo.attach(21);   
  leftServo.write(90);   // stop servo
  rightServo.attach(22);              
  rightServo.write(90);  // stop servo
}

void loop()
{
  if(Serial1.available()&gt;1)
  {
    qualifier=Serial1.read();
    dataByte=Serial1.read();

    Serial.print(&quot;qualifier = &quot;);
    Serial.println(qualifier);
    Serial.print(&quot;dataByte = &quot;);
    Serial.println(dataByte);

    if ( qualifier == 68)
    {
      if (dataByte == 1)
      {
        forward();
      }
      if (dataByte == 2)
      { 
        left();
      }
      if (dataByte == 3) 
      {
        right();
      }
      if (dataByte == 4)
      {
        backward();
      }
      if (dataByte == 5)
      {
        stop();
      }
    }
  }
}

void stop(){
  leftServo.write(90);               // stop
  rightServo.write(90);              // stop
}

void forward(){
  leftServo.write(0);              // go straight forward
  rightServo.write(120);         
}

void backward(){
  leftServo.write(180);                // backward
  rightServo.write(60);             
}

void left(){
  leftServo.write(140);                // go left 
  rightServo.write(100);              
}

void right(){
  leftServo.write(40);              // go right 
  rightServo.write(80);           
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.bajdi.com/bluetooth-remote-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nano undershield revision 2</title>
		<link>http://www.bajdi.com/nano-undershield-revision-2/</link>
		<comments>http://www.bajdi.com/nano-undershield-revision-2/#comments</comments>
		<pubDate>Sun, 14 Apr 2013 13:39:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Bajduino]]></category>
		<category><![CDATA[Nano]]></category>

		<guid isPermaLink="false">http://www.bajdi.com/?p=1049</guid>
		<description><![CDATA[Almost a year ago I designed my first PCB. It was a small 50x50mm PCB that acts as an undershield for an Arduino Nano. I designed it because the Arduino Nano has a tiny 5V voltage regulator. To not overheat the regulator you can not draw more then 200-300mA from it depending on the input [...]]]></description>
				<content:encoded><![CDATA[<div id="attachment_1031" class="wp-caption alignnone" style="width: 630px"><a href="http://www.bajdi.com/wp-content/uploads/2013/04/nano-undershield-rev2.jpg"><img class="size-large wp-image-1031" alt="Nano undershield revision 2" src="http://www.bajdi.com/wp-content/uploads/2013/04/nano-undershield-rev2-1024x682.jpg" width="620" height="412" /></a><p class="wp-caption-text">Nano undershield revision 2</p></div>
<p>Almost a year ago I designed my <a title="Nano undershield" href="http://www.bajdi.com/my-arduino-nano-undershield/" target="_blank">first PCB</a>. It was a small 50x50mm PCB that acts as an undershield for an Arduino Nano. I designed it because the Arduino Nano has a tiny 5V voltage regulator. To not overheat the regulator you can not draw more then 200-300mA from it depending on the input voltage. Since I use Lipo batteries for most of my projects I also needed a regulator to power a couple of small servos. So I thought why not design a shield with a cheap 3A 5V switch mode regulator (LM2576). 3A is more then enough for a couple of servos and some sensors. The added benefit is that the switch mode regulator is much more efficient then a linear regulator. Which is a good thing when you use battery power.<br />
While my first design worked it had a couple of small mistakes. Some of the holes were not big enough and some of the traces were a bit on the thin side. So I decided to make an improved version. In this version the Nano gets its power through the Vin pin. It is connected to the screw terminal through a schottky diode. Next to the Nano there are 3 rows of pins. The row with pins closest to the Nano are connected to the pins on the Nano. The middle row is the 5V, which comes from the 3A regulator. The outer row of pins are the ground pins. These 3 rows of pins make it very easy to connect servos and sensors to the Arduino Nano without have to worry if they get power enough. I&#8217;ve done some testing with the board and even connected 10 little servos to it. The regulator could handle the servos but the 5V line becomes very noisy. It does not effect the Nano though since it doesn&#8217;t get power from the regulator. With a small heatsink like the one in the photo below the regulator is good for about 2A without overheating.</p>
<div id="attachment_1051" class="wp-caption alignnone" style="width: 630px"><a href="http://www.bajdi.com/wp-content/uploads/2013/04/nano-undershield-rev2-2.jpg"><img class="size-large wp-image-1051" alt="Nano undershield rev2" src="http://www.bajdi.com/wp-content/uploads/2013/04/nano-undershield-rev2-2-1024x682.jpg" width="620" height="412" /></a><p class="wp-caption-text">Nano undershield rev2</p></div>
<p><strong>Parts used:</strong></p>
<p>1x PCB made by Seeedstudio<br />
1x Screw terminal with 2 positions 5mm (Tayda Electronics)<br />
1x Capacitor 100µF 50V (Tayda Electronics)<br />
1x LM2576 5V (Tayda Electronics)<br />
1x TO220 heatsink (Tayda Electronics)<br />
1x 100µH 3A inductor (Ebay)<br />
2x Capacitor 1000µF 25V (Ebay)<br />
1x 1N5822 3A diode (Tayda Electronics)<br />
1x 100nF 50V Ceramic capacitor (Tayda Electronics)<br />
1x 1N5818 Schottky diode (Tayda Electronics)<br />
A couple of strips of male and female headers (Tayda Electronics)</p>
<p>I had 10 of these PCB&#8217;s made by Seeedstudio, I wont be needing them all. If you would like to have one sent me an email: info|@|bajdi d|0|t com</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bajdi.com/nano-undershield-revision-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blinking leds with a 74HC595 shift register</title>
		<link>http://www.bajdi.com/blinking-leds-with-a-74hc595-shift-register/</link>
		<comments>http://www.bajdi.com/blinking-leds-with-a-74hc595-shift-register/#comments</comments>
		<pubDate>Sat, 13 Apr 2013 12:11:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Arduino sketches]]></category>
		<category><![CDATA[74HC595]]></category>

		<guid isPermaLink="false">http://www.bajdi.com/?p=1040</guid>
		<description><![CDATA[I needed to take a break from working on my hexapod. So I decided to go back to basics, blinking leds The first Arduino sketch most people try out must be the blink example sketch. It blinks one led, and uses only one pin. If you want to blink lots of leds you might run [...]]]></description>
				<content:encoded><![CDATA[<p>I needed to take a break from working on my hexapod. So I decided to go back to basics, blinking leds <img src='http://www.bajdi.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  The first Arduino sketch most people try out must be the blink example sketch. It blinks one led, and uses only one pin. If you want to blink lots of leds you might run out of pins. You could of course use an Arduino Mega which has a lot of pins. But there are cheaper options. Like the <a href="http://www.google.be/url?sa=t&#038;rct=j&#038;q=&#038;esrc=s&#038;source=web&#038;cd=1&#038;cad=rja&#038;ved=0CDEQFjAA&#038;url=http%3A%2F%2Fwww.nxp.com%2Fdocuments%2Fdata_sheet%2F74HC_HCT595.pdf&#038;ei=W0dpUZ2MCOnQ0QWT6oCwCA&#038;usg=AFQjCNEk769V7UmuntIvV4jbOQaDZtVGhw&#038;sig2=MK31-nJx2LA2fmSsazFPKA&#038;bvm=bv.45175338,d.d2k" title="74HC595 datasheet" target="_blank">74HC595</a> shift register. I bought a dozen from Tayda Electronics, they only cost $0.20 a piece. The 74HC595 is an 8-bit serial-in, serial or parallel-out shift register with output latches.<br />
That description sounds very complex. But a lot of information can be found on the internet about interfacing the 74HC595 with Arduino. The chip needs only needs 3 pins, in return you get 8 outputs. I tried some different sketches that I found online to try and understand how the chip works. The following sites I found the most useful:<br />
<a href="http://learn.adafruit.com/adafruit-arduino-lesson-4-eight-leds/overview" title="Adafruit lesson 4" target="_blank">Adafruit lesson on the 74HC595</a><br />
<a href="http://bildr.org/2011/08/74hc595-breakout-arduino/" title="Bildr 74HC595 tutorial " target="_blank">Bildr 74HC595 tutorial</a><br />
<a href="http://arduino.cc/en/Tutorial/ShiftOut" title="Arduino shiftout function" target="_blank">Arduino shiftout function</a></p>
<p>My goal was to blink 16 leds nightrider style. I used 2 74HC595 shift registers and 16 leds with 220ohm resistors. As I wanted to integrate the code in an other sketch I used the millis function to time the shifting of the leds. This is the result:</p>
<p><iframe width="560" height="315" src="http://www.youtube.com/embed/br0Xh6B_OAI" frameborder="0" allowfullscreen></iframe></p>
<p>This is the code I used:</p>
<pre class="brush: arduino; title: ; notranslate">
// http://www.bajdi.com
// Nightrider effect using 16 leds and 2 74HC595 shift registers

//Pin connected to Pin 12 of 74HC595 (Latch)
int latchPin = 8;
//Pin connected to Pin 11 of 74HC595 (Clock)
int clockPin = 12;
//Pin connected to Pin 14 of 74HC595 (Data)
int dataPin = 11;
//data for LED on. Second shift register will be written first.
int ledOn2[]={
  1,2,4,8,16,32,64,128,0,0,0,0, 0, 0, 0,  0, 0, 0, 0,0,0,0,0,128,64,32,16,8,4,2,1};
int ledOn1[]={
  0,0,0,0, 0, 0, 0,  0,1,2,4,8,16,32,64,128,64,32,16,8,4,2,1,  0, 0, 0, 0,0,0,0,0};
byte nextLed;
unsigned long Timer;

void setup() 
{
  pinMode(latchPin, OUTPUT);
  pinMode(clockPin, OUTPUT);
  pinMode(dataPin, OUTPUT);
}

void loop() 
{
  unsigned long ledMillis = millis();

  if (ledMillis &gt;= Timer){
    Timer = Timer+50;
    nextLed = nextLed +1;
    digitalWrite(latchPin, LOW);
    shiftOut(ledOn2[nextLed]);
    shiftOut(ledOn1[nextLed]);
    //set latchPin to high to lock and send data
    digitalWrite(latchPin, HIGH);

    if (nextLed == 30){ 
      nextLed = 0;
    }
  }
}

void shiftOut(byte dataOut) 
{
  // Shift out 8 bits LSB first,
  // on rising edge of clock
  boolean pinState;
  //clear shift register ready for sending data
  digitalWrite(dataPin, LOW);
  digitalWrite(clockPin, LOW);
  // for each bit in dataOut send out a bit
  for (int i=0; i&lt;=7; i++) 
  {
    //set clockPin to LOW prior to sending bit
    digitalWrite(clockPin, LOW);
    // if the value of DataOut and (logical AND) a bitmask
    // are true, set pinState to 1 (HIGH)
    if ( dataOut &amp; (1&lt;&lt;i) ) 
    {
      pinState = HIGH;
    }
    else 
    {
      pinState = LOW;
    }
    //sets dataPin to HIGH or LOW depending on pinState
    digitalWrite(dataPin, pinState);
    //send bit out on rising edge of clock
    digitalWrite(clockPin, HIGH);
  }

  //stop shifting out data
  digitalWrite(clockPin, LOW);
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.bajdi.com/blinking-leds-with-a-74hc595-shift-register/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bajdupod 996R: the saga continues&#8230;</title>
		<link>http://www.bajdi.com/bajdupod-996r-the-saga-continues/</link>
		<comments>http://www.bajdi.com/bajdupod-996r-the-saga-continues/#comments</comments>
		<pubDate>Sun, 07 Apr 2013 18:51:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Bajdupod 996R]]></category>
		<category><![CDATA[hexapod]]></category>
		<category><![CDATA[robot]]></category>

		<guid isPermaLink="false">http://www.bajdi.com/?p=1018</guid>
		<description><![CDATA[I think I have finally solved all the bugs in my hexapod code, well at least the walking gait part of the code. The servos now move in 15 steps from one position to the other. The time between these steps determines how fast the hexapod walks. I can change the speed with my remote [...]]]></description>
				<content:encoded><![CDATA[<p><iframe width="560" height="315" src="http://www.youtube.com/embed/4z4yBYM1anw" frameborder="0" allowfullscreen></iframe></p>
<p>I think I have finally solved all the bugs in my hexapod code, well at least the walking gait part of the code. The servos now move in 15 steps from one position to the other. The time between these steps determines how fast the hexapod walks. I can change the speed with my remote control. Every walking gait is divided in 4 parts. During each part the servos are moved in 15 steps. I use the millis timer to keep track of the time. My biggest problem was coding the value that the legs should move. While this is a simple subtract function it was very difficult to calculate it at the right moment and making sure that this value didn&#8217;t change when I didn&#8217;t want it. It sounds very simple but I have absolutely no coding background and it took me hours to figure out. Since all the code is based on one timer (millis) you can&#8217;t have any blocking functions. I found out that the RF24 library sometimes caused a hick up in my code. This resulted in the legs going crazy. After that was solved I can finally say that the basic walking gaits are finished.<br />
There are still some other functions that I want to implement. So the coding is far from finished.</p>
<p>As you can see in the video I have removed the bottom plate of the chassis. I removed it so I could measure it. Then I started designing a new chassis in Autocad. This is the latest version:<br />
<div id="attachment_1021" class="wp-caption alignnone" style="width: 630px"><a href="http://www.bajdi.com/wp-content/uploads/2013/04/bajdupod-996r-chassis-rev2.jpg"><img src="http://www.bajdi.com/wp-content/uploads/2013/04/bajdupod-996r-chassis-rev2-1024x457.jpg" alt="Bajdupod 996R chassis rev2" width="620" height="276" class="size-large wp-image-1021" /></a><p class="wp-caption-text">Bajdupod 996R chassis rev2</p></div><br />
It consists of 3 plates, I&#8217;ll have them laser cut from acrylic. The design is far from finished. The bottom plate will hold the 3S Lipo, the power servo PCB and the UBECs. The middle plate will hold the electronics. I will use a Seeeduino Mega to control the servos and probably another micro controller for the rest. The design has mounting holes for all my Bajduino PCB&#8217;s. I haven&#8217;t decided which one I will fit. </p>
<p>My first plan to power the hexapod was to use 2 UBECs. So I had designed a PCB where I could power 18 servos with 2 separate power supplies. Unfortunately the UBECs were not strong enough for my power hungry MG996R servos. So I had to resort to using 3 8A UBECs. I designed a new PCB so I could easily connect the 3 UBECs to the servos and micro controller. This is it:<br />
<div id="attachment_1027" class="wp-caption alignnone" style="width: 630px"><a href="http://www.bajdi.com/wp-content/uploads/2013/04/servo-board-rev2.jpg"><img src="http://www.bajdi.com/wp-content/uploads/2013/04/servo-board-rev2-1024x682.jpg" alt="Servo power board revision 2" width="620" height="412" class="size-large wp-image-1027" /></a><p class="wp-caption-text">Servo power board revision 2</p></div></p>
<p>The 3 8A UBECs are connected to the servo PCB. 18 wires with Dupont connectors connect the Seeeduino Mega with the servo power PCB. I chose the Seeeduino Mega as it is a lot smaller then the standard Arduino Mega. It&#8217;s about the same size as an Arduino Uno.<br />
<div id="attachment_1032" class="wp-caption alignnone" style="width: 630px"><a href="http://www.bajdi.com/wp-content/uploads/2013/04/seeeduino-mega-2560.jpg"><img src="http://www.bajdi.com/wp-content/uploads/2013/04/seeeduino-mega-2560-1024x683.jpg" alt="Seeeduino Mega 2560" width="620" height="413" class="size-large wp-image-1032" /></a><p class="wp-caption-text">Seeeduino Mega 2560</p></div></p>
<p>I have also received my metal servo horns. So I will fit these when I have the new chassis made.<br />
<div id="attachment_1036" class="wp-caption alignnone" style="width: 630px"><a href="http://www.bajdi.com/wp-content/uploads/2013/04/metal-servo-horns.jpg"><img src="http://www.bajdi.com/wp-content/uploads/2013/04/metal-servo-horns-1024x682.jpg" alt="Metal servo horns" width="620" height="412" class="size-large wp-image-1036" /></a><p class="wp-caption-text">Metal servo horns</p></div></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bajdi.com/bajdupod-996r-the-saga-continues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
