Page 1 of 1

Sound Localization, MC, and Neural Network

Posted: Tue Nov 06, 2007 12:27 am
by tian
Currently I am working on my final project. My final project title is “Design and Implementation of Mobile Robot Sound Tracker Based on Artificial Neural Network”.

I want to make it embedded with battery as the supply.:D

Any idea where should I learn first? Where should I start first?
What PIC type should I use with?
What Neural Network type I work to?
Should I use Fast Fourier Transfom (FFT), Discrete Fourier Transform (DFT), or not use at all?
What is motor type I working with? Is DC Motor is OK?

Posted: Tue Nov 06, 2007 12:38 pm
by Benj
Hello Tian

In answer to your questions.

Start at the beginning. What do you know about microcontrollers. Find some example circuits to design your hardware. Do not base your design on one persons design they may have it wrong. Make a few simple prototypes to make sure that you are designing the hardware correctly. Eg make an LED flash on your own hardware.

The PIC you should be using depends on what you want it to be able to do. First create an I/O count. Then do you need peripherals like I2C, UARTs, PWM or SPI. A 16F877A is a fairly good start as it has a lot of I/O and it is fairly powerful.

For the neural network you may want to reconsider and use a fuzzy logic network. It is easier to program and yields similar results. Use Google to find out more about fuzzy logic. I have also seen some good examples of programming robots using fuzzy logic and PICs online.

If you really must use a neural network then there are also examples for this but balancing the loads and biases may be a bit tricky by trial and error.

No need for a fourier transform unless you want to analyse incoming frequencys. Fuzzy logic routine manages all of the incoming data.

DC motors are OK but I prefare steppers. Basically this is down to you and what you are used to. If you go with a DC motor then try to find a nice H Bridge controller chip to ease the driver stage. Here is another thing to test, DC motors create high frequency noise so make sure your circuit design does not interfere with the microcontroller circuitry. It is sometimes good practise to maintain two distinct ground lines. One for the microcontroller and one for the motor circuitry. They can both come from the same place eg the voltage regulator but keeping them on seperate routes reduces the chance of interferance.

Posted: Wed Nov 21, 2007 12:59 pm
by tian
Hi Benj,

Thank you for good reply.
A 16F877A is a fairly good start as it has a lot of I/O and it is fairly powerful.
I tried program some program with a lot of array.
ex:
float Wh[100];

Wh[] is variable to store weights to MicroController.

After that I tried program it with MicroC for PIC with 16F877, but RAM limited message appear.

How to fix it?

Posted: Wed Nov 21, 2007 2:16 pm
by Benj
Hello

Array data must be in on bank of the PICmicros memory. Most 16F devices have a bank size of 64 bytes so this is the maximum size of array you can create.

Now if you are creating an array of floats then floats are 32 bits or 4 bytes. Therefore you can only create a maximum size array of 12 (64 / 4). You can create multiple arrays of this size and then use some decision logic to decide which array to use.

As a further note you should be able to create neural networks and fuzzy logic control logic using byte variables or Int variables. It is not as straightforward as using floating point numbers but it can be done and it will save a lot of program code space and ram space. It will also run a lot faster. Try googling for some examples.