www.botdream.com http://www.botdream.com/blog Building a remote controlled robot from an old pc! Wed, 04 Nov 2009 17:31:10 +0000 http://wordpress.org/?v=2.3.3 en Botdream project into ‘00 0000 0110 0011′ mode! (SLEEP assembler instruction) http://www.botdream.com/blog/2009/11/04/botdream-project-into-00-0000-0110-0011-mode-sleep-assembler-instruction/ http://www.botdream.com/blog/2009/11/04/botdream-project-into-00-0000-0110-0011-mode-sleep-assembler-instruction/#comments Wed, 04 Nov 2009 16:53:59 +0000 Nelson Neves http://www.botdream.com/blog/2009/11/04/botdream-project-into-00-0000-0110-0011-mode-sleep-assembler-instruction/ You’ve got it right, Botdream project is now going into Sleep mode (no to say Halt!).

Things are now getting complicated, too much work, no time for family and hobby, some personal life changes occurring, make the botdream robot project far away from his goal, so I’ve decided to re-think on this blog content and maybe start something new from scratch that will have a conclusion! I got a bit lost with some other projects (that were also interesting, here are some examples of what I’ve been doing:

  • Making some tests with PIC 18F4550 to work with a CNC (Interface with the Step Motor driver)
  • Testing Linux Ubuntu OS (only at normal user level)
  • Exploring Debian command line with the SLUG project
  • Getting into Linux Embedded Development for Bifferboard hardware (from March to October 2009):

So things got a bit off-track, a little more into the Linux world that requires some hard work and lots of free time to keep up with the community! No Pics and robot development for quite some time, so that is why I’m re-thinking on my blog content, I guess that I prefer to share something that I can really follow instead off having some old posts that are pretty well explained in some specialized blog!

I will also be moving from webhosting server (hostmonster / bluehost S#cks - they don’t keep up with their promises), still haven’t decided if will mirror the botdream related stuff. Slug stuff will live, slug rocks!

Thanks for all your support, hope to be back soon!

Nelson Neves.

Assembling prototype board with PIC 18F67J50 http://www.botdream.com/blog/2009/02/21/assembling-prototype-board-with-pic-18f67j50/ http://www.botdream.com/blog/2009/02/21/assembling-prototype-board-with-pic-18f67j50/#comments Sat, 21 Feb 2009 17:30:49 +0000 Nelson Neves http://www.botdream.com/blog/2009/02/21/assembling-prototype-board-with-pic-18f67j50/ I have been studying PIC 18F67J50 and have order it to make some tests! Since this pic use a very small package TQFP 64 pin (0.5 mm pitch between pins) it is not possible to just connect some thin wires and connected to the breadboard, so I have ordered this demo board but made a small mistake, it is a 0.8 mm pitch, damn:

Wrong board!

Ok, let’s order a proper demo board, this is the result of my first work with TQFP devices using a 0.3 mm tip on the iron (iron? yes, I did it the old way, after all it was my first time! Thanks to my friend dinix to let me use is lab!):

PIC 18F67J50 Prototype board

Not bad for a first time! Now I can actually run some live tests with it! This is also my first time with the super power-full nano watt pics from the 18F family!

Project status … http://www.botdream.com/blog/2009/02/21/project-status/ http://www.botdream.com/blog/2009/02/21/project-status/#comments Sat, 21 Feb 2009 16:45:18 +0000 Nelson Neves http://www.botdream.com/blog/2009/02/21/project-status/ It has been quite a while since I have last posted about my robot work … well I have been away from this project mainly due to lack of free time, I’ve been trying to develop some commercial projects using microchip pics, trying may way in into the microcontroller world!

From the free time that I’m left from this projects, I have been studying Linux Debian and making lots of tests with my favorite hardware piece, my NAS drive Linksys NSLU2 (aka SLUG) hacked with Debian distro ‘etch’! I have been able to connect a Logitech Quickcam Pro 9000 HD webcam and stream live video (MJPEG - Motion Jpeg) over network from Ethernet, wireless and 3G mobile Internet interface. More on that later has I will make a tutorial on this and post it here (SLUG section)! Also been working with Graham (sunspot.co.uk) on Slug’s I2C channel to control other electronic devices such has I2C digital temperature sensor, PIC 16F690 to control PAN and  TILT servos attached to webcam, etc. (just a teaser, more on that later).

So, with all of this stuff going on, somethings had to be stopped … unfortunately my robot was one of the selected! Sorry guys!

This is not the end, I do want to complete my robot, even with so many nice hardware coming up, it is very tenting to give up on my robot and start with a new platform and redesign the all concept! Let’s see what happens and hope for the best ;)

CCSinfo Manual http://www.botdream.com/blog/2009/02/04/ccsinfo-manual/ http://www.botdream.com/blog/2009/02/04/ccsinfo-manual/#comments Wed, 04 Feb 2009 11:30:57 +0000 Nelson Neves http://www.botdream.com/blog/2009/02/04/ccsinfo-manual/ This may be useful (manual of the compiler that I use):


Extra Lab Tools http://www.botdream.com/blog/2008/05/04/new-lab-tools/ http://www.botdream.com/blog/2008/05/04/new-lab-tools/#comments Sun, 04 May 2008 23:50:12 +0000 Nelson Neves http://www.botdream.com/blog/2008/05/04/new-lab-tools/ Just received an old Laptop (very very old - Intel Pentium II 266Mhz) that was going to the garbage and decided to make something nice with it! Plastics where broken and also required some electronic fixes! I’ve disassembled, removed un-necessary parts and built a new closure from the same material that I used for my robot! Did a really cool job!

I’ve remembered that I could use an extra PC to connect my Digital Oscilloscope (PCS500A) and Function Generator (PCG10A) from Velleman Instruments. These way I can make my electronic tests without having to switch from Linux to Windows OS (yes, I’m finally running Ubuntu Linux on my desktop PC, and whenever digital oscilloscope is required I need to switch it back to Windows due to Velleman win32 software).

Electronic Lab01


Testing PIC 16F690 PWM 4 multiplexed channels http://www.botdream.com/blog/2008/02/02/testing-pic-16f690-pwm-4-multiplexed-channels/ http://www.botdream.com/blog/2008/02/02/testing-pic-16f690-pwm-4-multiplexed-channels/#comments Sat, 02 Feb 2008 08:06:22 +0000 Nelson Neves http://www.botdream.com/blog/2008/02/02/testing-pic-16f690-pwm-4-multiplexed-channels/ I have just acquire this PIC 16F690 due to lack of hardware support from my old PIC 16F628a. Didn’t have I2C Slave by hardware and only 1 PWM (pulse width modulation) module available! I2C Slave by hardware was already tested on my previous post!

I have tested the PWM on this new PIC and found the results to be beyond my expectations! It is also configured with 1 PWM module but with a special capability! This signal will be available in pin RC5/CCP1/P1A and can be multiplexed to 3 other outputs, RC4/C2OUT/P1B, RC3/AN7/P1C and RC2/AN6/P1D. For P1A output the PWM signal will always be present but for P1B, P1C and P1D can be set/reset at any time. In my next example I will configure a PWM pulse with frequency of 500Hz (2ms period) and Duty-Cycle to 25% available to outputs P1A and P1B. From 3 to 3 seconds will switch configuration to activate/deactivate PWM pulse on output P1B.

This will be required to drive my previous module that will control the DC motors (will need to have PWM switching between P1B and P1C - this will invert DC motor direction): http://www.botdream.com/blog/2007/11/01/2nd-h-bridge-circuit-is-now-completed/

For this test I’ve assembled the following circuit:
PWM 2Channels (more…)

Testing Pic code for I2C Master/Slave communication http://www.botdream.com/blog/2008/02/01/testing-pic-code-for-i2c-masterslave-communication-2/ http://www.botdream.com/blog/2008/02/01/testing-pic-code-for-i2c-masterslave-communication-2/#comments Fri, 01 Feb 2008 11:37:40 +0000 Nelson Neves http://www.botdream.com/blog/2008/02/01/testing-pic-code-for-i2c-masterslave-communication-2/ I have now completed my I2C Master/Slave communication test. Quite happy with the results! Before getting started I needed to refresh my memory on I2C protocol, how Master and Slave devices would communicate, how data flow between devices. Found this nice tutorial on the web: http://www.best-microcontroller-projects.com/i2c-tutorial.html

As I previously referred on other posts, the PIC 16F690 will now support I2C protocol by hardware for the slave device, meaning that Interrupt Service Routine will be available, serving I2C Master whenever necessary without the necessity to pool the I2C bus. This also will permit Slave PIC to run other tasks like acquiring data from Analog-to-Digital inputs, control outputs, read inputs, etc, and still server PIC Slave without causing any delay on I2C bus. Unfortunately I2C Master is not supported by hardware for this PIC (I2C Master mode is also supported, please check datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/41262E.pdf page 197 -> 13.13 Master Mode). Not a problem, Master PIC will receive commands from PC (Via RS232 interface - serial communication) that will be stored on buffer to be processed whenever possible!

For the test I’ve used 2 PICs 16F690 @ 4Mhz and 1 RS232 interface for debug. Master PIC will connect to Lab PC by RS232 (COM1) for debugging purpose and to Slave PIC by I2C bus.

PIC I2C Master/Slave communication


New ICD2 (In-Circuit Debugger 2) to program and debug pics! http://www.botdream.com/blog/2008/01/23/new-icd2-in-circuit-debugger-2-to-program-and-debug-pics/ http://www.botdream.com/blog/2008/01/23/new-icd2-in-circuit-debugger-2-to-program-and-debug-pics/#comments Wed, 23 Jan 2008 15:43:52 +0000 Nelson Neves http://www.botdream.com/blog/2008/01/23/new-icd2-in-circuit-debugger-2-to-program-and-debug-pics/ I have now a new USB In-Circuit Debugger ICD2 that will allow me to program PICs much faster than my old LPT (parallel port) one and debug my PICs hardware by using proprietary Microchip protocol. I have made some test programing my old PIC 16F628A and new 16F690. It works fine! Really fast and have less errors while flashing the PIC. Also, this is now integrated with Microchip MPLAB, just need to activate tool, connect and flash! No more switching between different tools!


Will make real time hardware debug as soon as possible! I’m testing my new PIC 16F690 on I2C communications! Slave device supports I2C Hardware protocol. Master device will need to be implemented by software! Will post results as soon as possible.

Testing Pic code for RS232 and I2C Master communication http://www.botdream.com/blog/2007/11/28/testing-pic-code-for-rs232-and-i2c-master-communication/ http://www.botdream.com/blog/2007/11/28/testing-pic-code-for-rs232-and-i2c-master-communication/#comments Thu, 29 Nov 2007 00:33:04 +0000 Nelson Neves http://www.botdream.com/blog/2007/11/28/testing-pic-code-for-rs232-and-i2c-master-communication/ Still haven’t completed I2C Master/Slave communication test, but will move on!

I’m now defining how PC will communicate with PIC Master, how will the Robot computer send commands and receive data to the Master PIC. The Master PIC will them make the interface between PC and Sensors/Modules trough an I2C bus.

I have decided to send commands in the following format (PC to PIC Master - frame data):

<id, type, cmd, data0, data1, data2, data3, data4, data5, data6, data7, data8, data9>

id = device ID number (Slave or Master)
type = defines type of sensor/module {10=DCmotor, 11-Servo, …}
cmd = command
data0 to data1 = additional data

The Master PIC will receive the command from Robot computer (Via RS232) and parse it into a special object that will be sent to sensors/modules trough the I2C channel. After sending the commands in the I2C channel, the Master PIC will wait for the acknowledge of that command from the sensor/module. PIC Master will then read data from sensors/modules and save data into special object. When receiving the last byte from sensors/modules, PIC Master will them compose frame data and send it back to Robot computer. (more…)

Testing Pic code for I2C Master/Slave communication http://www.botdream.com/blog/2007/11/27/testing-pic-code-for-i2c-masterslave-communication/ http://www.botdream.com/blog/2007/11/27/testing-pic-code-for-i2c-masterslave-communication/#comments Tue, 27 Nov 2007 22:34:32 +0000 Nelson Neves http://www.botdream.com/blog/2007/11/27/testing-pic-code-for-i2c-masterslave-communication/ Unfortunately couldn’t test I2C Master/Slave communication between 2 Pic 16F268 due to lack of hardware capabilities! The 16F628 doesn’t have SSP module and so can not support I2C protocol by hardware. I  have tested I2C Master by software when communicating between Pic Master and Dallas DS1721 ‘2-Wire Digital Thermometer and Thermostat’ Slave. It worked fine, but I really need the full capability of I2C Slave by hardware (Interrupt Routine) and at this moment have only emulated the Master side! Also would like to leave my code small and clean! 

I have now found alternative Pic with SPP (I2C by Hardware) support - PIC 16F690 I/P . Still searching for this device on local electronic stores, but no luck yet! Better to order from Internet :) .

While waiting for the new Pics I will try to make some more advanced tests.