Go Down

Topic: Creating an IR communicating robot, with servo control and PCM sound. (Read 281 times) previous topic - next topic

BobEast

Good day everyone,
I have been using 3 Uno boards for a while to develop my project. Currently, I have one board driving 3 servos. I have another board that plays PCM sounds to let the user know it agrees or disagrees. Do to the space limitation of the memory, it's short mumbles. I considered using tones, but it sounds to robotic for what I'm doing. Finally, I have a 3rd board that receives IR signals from a remote. It was intended to have it send IR also, but I burned out my IR LED, and still waiting on new ones.

Hopefully, that explains the situation, if not, feel free to ask for more info.

Here is the issue I am having. I would like to combine them all together. In order to have PCM (Pulse Code Modulation) work, it has to change the timers to give you the audio frequency range and the pitch range (If I remember correctly). This requires 2 timers and breaks the PWM on 4 channels. I thought this meant I could still use the uneffected channels for Servo control, and use the effected, unused channels, when it was not playing the audio. I got this understanding from reading the library, I thought that when the audio stopped it set everything back to normal.

I would think IR would also be an issue for broadcasting because you need to not only flash the IR LED for your message, but have it pulse width modulated, to match the IR receiver, other wise it would be ignored. I think there is a library to do this without changing a timer, but it requires some timing code, that could effect normal operations.

I have yet to start using the Mega2560, but I am considering that as an option, because it has more timers. I know there are shields to offer audio playback, and shields to handle servo movement, but to go that route would triple the cost of the project.

I'm hoping someone can shed some light on my issue and hopefully find a solution because I have the project 90% done, and I don't want to scrap it now.

Thanks,
BobEast

Go Up