Enginering Project Help.

Hey everyone!

First ever post on this forum. My project involves designing a system that will transport an object without manual intervention from a start location to a fixed elevated destination 2m away. The destination location is wirelessly communicated to the system via a specific audio signal. There is 4 different elevated location, each with a unique audio frequency.

I've read through some on the things that an Arduino can be used for, I was just wondering if it would be a good idea to use in this project? I'm thinking, a microphone will detect the audio signal, then based on what frequency it is, the Arduino will run the lift motor for a certain amount of time to get the object to the correct height. Is this possible? Is there an easier way of doing this?

I'm sorry if this is a stupid question.

Massive thank you in advance!

Not necessarily a stupid question, just a bit vague.

It sounds feasible in general although the audio stuff is a little out of my field. You can get DTMF decoders and encoders that might make the data transmission easier.

the Arduino will run the lift motor for a certain amount of time to get the object to the correct height.

Is the object always the same weight? If not then the timing of the lift will vary depending on the weight.


Rob

It's the same object, therefore same weight.

Vague? Sorry.

There's 4 boxes (ranging from 700mm from the surface to 1100 from the surface).

Each box is linked to a specific frequency. For example, if the audio signal produced is 250Hz, then it must put it in box 1. If the frequency is 5000Hz, then the object must be lifted up to the same level as box 2, and so on for the 4 boxes.

The system has to differentiate between the different frequencies and raise the object to the correct height accordingly.

Then assuming the signal is detected and amplified to digital levels (probably easy but as I said not my field) all you have to do is a pulseIn() call to determine the period of the signal and therefore the frequency.

As it seems you have a large freq range and only have to differentiate four levels you don't even have to be very accurate.


Rob

Graynomad:
Then assuming the signal is detected and amplified to digital levels (probably easy but as I said not my field) all you have to do is a pulseIn() call to determine the period of the signal and therefore the frequency.


Rob

Thanks for replying!

Then I can set the lift motor to run for a certain amount of time, based on the period of the signal right?

Sounds about right. It may not be super accurate though, how good does the position have to be.

Are you stuck with this frequency idea because it exists?


Rob

Well, the object is a tennis ball and the hole that it has to be put into is 100mm by 100mm, so, fairly accurate?

The frequency idea is really confusing me at the moment. :frowning:
Somehow this system must differentiate between 4 tones and generate a specific output based on that.

Goertzel's algorithm?

Somehow this system must differentiate between 4 tones and generate a specific output based on that.

That should be simple, let's assume you four "tones" are

1, 2, 4 and 8kHz

the periods are

1000, 500, 250 and 200uS

and the pulse widths are (assuming 50% duty cycle)

500, 250, 125 and 100uS

So you do a pulsIn() and use the returned value to determine which of the above you have.

One way to do it is something like this

x = pulseIn(tone_pin);

if (x < 110)   // pick values mid way between the expected pulse widths
   liftHeight = 1;

else if (x < 200)
   liftHeight = 2;

else if (x < 350)
   liftHeight = 3;

else  liftHeight = 4;

That's a bit ugly but the general idea.

If the frequencies are well chosen you could probably just to an integer divide to get the liftHeight variable.


Rob

Oh wow. Thank you so much!

You have been so helpful. I can't thank you enough.