07.31.08

Pic Development on Ubuntu

Posted in PIC at 11:31 am by philwinder

I am about to try PikLab with SDCC (Both available via Synaptic Package Manager) and an ICD2.  To install the IDC2 I followed this tutorial.  It’s supposed to be for the Pic Kit 2, but its just about the same for the ICD2.  SDCC also requires GPUtils, so install that too.

One problem so far is that you cannot have spaces in the path of the project being used.  Complication will fail and report:

Segmentation fault
+ "/usr/bin/gplink" -I"/usr/bin/../share/sdcc/lib/pic16" -I"/usr/share/sdcc/lib/pic16" -c -m -w -r -o xxxxxxxxxxxxxx
*** Exited with status: 1 ***

07.08.08

Phased array V0.1 Finished :D Doesnt Work :(

Posted in Projects, Electronics, PIC at 9:45 am by philwinder

I have implemented a new microcontroller that has simultaneous sampling and a slightly higher sampling rate. I could then interpolate the data with pretty good results using a simple padding + band pass filtering technique. The higher the SNR the better it worked.
However, I have hit a great big wall. It all boils down to the fact that I have used 2 rows of transducers to make the spacing 1 wavelength.

For the following results, Consider the situation where x is the horizontal plane, y is the vertical plane and z is the distance between the source and the target. If the target is slightly elevated in the y plane, the top and bottommost transducers would receive an echo at different times. Furthermore, due to multipath dispersion I am also receiving further echoes from different y directions. So to counteract this, I would have to scan not only in the x plane, but in the y plane too, and this was accomplished by summing all of the results in the y direction to produce a plot of the targets in the x plane. However, by delaying the signals in the y plane, the x plane in some situations became erroneous. It looks like I am getting some sort of aliasing in the x plane. I think that this is because of instead of having a beam pattern from 4 transducers, I am getting 2 x 2 transducer patterns, so not only do I now have a very very wide beam width, I will have some nasty sidelobes too (since if you just consider the 2 transducers, the spacing is 2 x wavelength.)

On the up side, the hardware works great!

So all around, this was pretty much a disaster, and I am not looking forward to remaking all of the hardware. So for beta 2 I will need:

  • to source some smaller transducers so that I can get 1/2 x wavelength spacing in a linear fashion. Possibly go higher in frequency to get a better z resolution.
  • use a dedicated ADC with 8 transducers, rather than 4. Get something with a faster sampling rate too.
  • remake the hardware :(
  • The hardest thing I see is sourcing the peizoceramics from somewhere. Does anyone know of where I can get any cheaply online? Self enclosed transducers would be ideal, but I would be willing to mess with the naked ceramics myself if I had too…

    05.02.08

    Phased Array Data

    Posted in Projects, Electronics, PIC at 11:13 pm by philwinder

    Got the first incarnation of the Phased array working now. Had a few hiccups along the way, but managed to get most of them sorted. Main problems included not having enough RAM to store a significant amount of data, so I fixed that using a simple compression technique (I say simple, took me ages to get it working!) and using a circular buffer.

    The main problem is that the PIC30F’s can only acquire data sequentially, i.e. not simultaneously. This means that each acquire takes 1Tad to sample, therefore 4 sequential acquires takes 4Tad. This means that the actual sampling speed is Fad/4=50ksps max! Rubbish. So Ive ordered some PIC33f’s to try because they are simultaneous and work up to 1Msps!

    Also need to desolder the power lead for the transmits because they should have their own separate power supply. Not the on board one.

    Finally, some data!

    4 Outputs!Accross TableRoof!

    Errata: Slight cock up, in the second image the pulse labeled reverbaration is not reverbaration.  I think it was a reflection from something about 45 degrees out.  This poses an interesting question, how do I stop signals that are out of phase by exactly 1 cycle adding up to a large number? I will have to consult the literature to figure this one out!

    01.27.07

    More thoughts, keep changing my mind!! - Inked

    Posted in Projects, PIC, Robotics, ZBot at 6:27 pm by philwinder

    Still havent had any time to do anything yet but:
    Ive decided to run multiple IR modules off one 18F pic then:

  • I can have a proper multi-master I2C configuration which means proper interrupts.
  • The IR module will now be smaller/cheaper because of the lack of another pic
  • Could put some extra fuctions on it too, like voltage/current monitoring etc.
  • This does still mean that the I2C routines will have to be written (boaring!) since that was what my motivation was dreading before.
    Also still love the idea of creating a phased array sonar system on it, but that will come later…
    Could look for some code on the net, see if that will help/save a lot of time. Just depends how its been written…

    Phil
    Image of options

    12.11.06

    Status of the ZBot

    Posted in PIC, Robotics, ZBot at 11:02 am by philwinder

    Ive finally had some time to do a little work on this projct.  Being someone that wants everything done right, and to learn, do everything by myself, where it would normally take a weekend to knock some crappy robot together takes a little longer!

    Firstoff, I have treated myself to a Robo Jr Chassis from www.active-robots.com, mainly because of the price.  The only quarm i have with it is that because it uses tiny 5V motors and tiny cogs not particullay securely mounted, it makes a right racket.  Maybe in the future it could be modded to use motors with internal step downs.

    On the code front, I still cant decide what to do with the IR proximity detectors.  I have wasted LOADS of time writing some cool I2C Multi-Master routines so that I can connect devices (the IR’s) to the I2C bus and address them whenever I want.

    The thing is, I still cant decide if its the best idea.  Since I also fancy, instead of using some IR transmitter reciever that I have built, to use one of them sharp distance finders and use that as a combined Proximity detect/range finder.   That would be cool.  I still might want to do it on the I2C bus though to make the comms wiring nice and simple.

    Hence, I have also built a simple proximity detector that literally takes uA’s to run.  This uses a pic to control the most power hungry device on the IR circuit, the TSOP38 blah… reciever.  With it permanently turned on, the curret will be about 800uA.  Which is poo.

    And also, I have done a VERY simple PWM test to test the motors.  Works good.

    Well there we are. Till next time….

    Phil

    11.09.06

    Start of the ZBot

    Posted in Projects, Electronics, PIC, ZBot at 8:55 pm by philwinder

    Basically want to create a cluster of robots using a mesh’ed ad-hoc network. This will be done using zigbee, but the problem is that I havent created any robots before so I will have to go through the motions before I get to the zigbee part.

    So far I have created a primitive IR proximit sensor with some 10F PIC’s. I have a few problems with the PIC’s themselves, for example: If you connect the pic back up to the ICD2 before turning off the main power, the PIC will burn itself out. Secondly, I had a load of problems with trying to program the damn thing, I think it was due to inproper driver installation. (Make sure you preinstall the drivers for the ICD2 FIRST!!)

    Next I am going to start on the actual motor control using some schematic I found on the net.