Pages: [1] 2   Go Down
Author Topic: Is it possible to make Arduino talk without shield  (Read 18198 times)
0 Members and 1 Guest are viewing this topic.
Europe, Estonia
Offline Offline
Full Member
***
Karma: 0
Posts: 208
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi!
I was wondering if it is possible to make Arduino Duemilanove talk (using small speaker) without SpeakJet/VoiceBox shield? I mean just using software + speaker...

Something like this
[media]http://www.youtube.com/watch?v=Eo3hEKAOxeg[/media]

Logged

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 42
Posts: 5612
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes:

http://code.google.com/p/tinkerit/wiki/Cantarino

Quality isn't great, but it does work!

 smiley
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 42
Posts: 5612
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

One other thing, since I noticed you in another thread talking about having a bunch of hardware connected to your Arduino:

Most likely, when using this software synthesizer, you will find that you can't do anything else while it is running; in other words, it likely takes up a lot of CPU cycles, while also consuming a big chunk of memory.

In other words, it turns an ATMega into something like the SpeakJet (which, IIRC, is simply another software synthesizer running on a custom programmed PIC).

 smiley
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Europe, Estonia
Offline Offline
Full Member
***
Karma: 0
Posts: 208
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Wow, thanks a lot cr0sh and Jiggles! Gonna try it out.
Logged

Toronto, Canada
Offline Offline
Full Member
***
Karma: 0
Posts: 144
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I managed to translate Webbot's speech synthesis code and made a simple TTS (text to speech) library. But You can't connect just a speaker to a PWM pin, you need to add a RC filter and an amplifier. I used the schematic below:



Also, the code is big and the speech is retro robot like. You can't do anything else during the speech time, but you can do whatever you like before and after the speech is done.

Here is the lib: TTS.zip After download, create a TTS folder under Arduino-0018\libraries and place all files there. Then, from Arduino you can open the example provided.
« Last Edit: June 24, 2010, 08:24:12 pm by Ro-Bot-X » Logged


Europe, Estonia
Offline Offline
Full Member
***
Karma: 0
Posts: 208
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ro-Bot-X do you happen to have a bigger schematic? Also what components do I exactly need? - as I am a total noob, I need everything to be clearly understandable (got it)

I was trying to test this code by uploading it to my Arduino board. Unfortunately I always got the same error. What is the problem?



I was thinking about doing a talking clock or talking temperature meter (thermometer) or autonomous robot
« Last Edit: June 25, 2010, 04:51:56 am by Fredx » Logged

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 42
Posts: 5612
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Ro-Bot-X: Interesting - what's the memory footprint after the translation?
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Europe, Estonia
Offline Offline
Full Member
***
Karma: 0
Posts: 208
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Following the schematic-s link, found a bigger one:

http://www.tehnorama.ro/wp-content/uploads/2010/06/Arduino-LM386.png

Logged

Toronto, Canada
Offline Offline
Full Member
***
Karma: 0
Posts: 144
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I was trying to test this code by uploading it to my Arduino board. Unfortunately I always got the same error. What is the problem?

The problem is you can't follow directions. I told you in my previous message to make a folder named TTS in the libraries folder under Arduino-0018. Copy all the files there. Perhaps it's not obvious to everyone that there is a sub-folder called examples that has to be copied in the same TTS folder...

Make sure the TTStest.pde is located in the examples\TTStest folder when you run it. You can't have the TTS.h and english.h tabs in your code and also import TTS.h from the library...

@cr0sh: When I compile the example, I get the following code size on a mega328:
Code:
Binary sketch size: 10684 bytes (of a 30720 byte maximum)
Logged


Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 42
Posts: 5612
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well - not exactly tiny, but it still leave 20K or so available, so it isn't too shabby, either, for what it does, I suppose...

 smiley
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Europe, Estonia
Offline Offline
Full Member
***
Karma: 0
Posts: 208
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ro-Bot-X.... shame on me  :-[
I was too hurry that I didn't read all your post.

For now, I got it working. I connected Arduino to my computer speakers and everything works fine. Interesting is that when using VoiceBox Shield... you have to have SpeakJet Chip + TTS256 Text to Speech Chip... but you have both in one....
« Last Edit: June 26, 2010, 10:37:13 am by Fredx » Logged

Europe, Estonia
Offline Offline
Full Member
***
Karma: 0
Posts: 208
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have one more question - is it somehow possible to use the chip from children toy mobile phone? That usually say something like "I LOVE YOU... etc"
Logged

Lancashire, UK
Offline Offline
Edison Member
*
Karma: 9
Posts: 1991
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Possibly, if you have a datasheet for the chip in question.
Logged


Europe, Estonia
Offline Offline
Full Member
***
Karma: 0
Posts: 208
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi again,
I am trying to make the Arduino to say the current temperature.
I have connected temperature sensor LM35 to analog pin 0.

There is something wrong with the red part.

Quote
/*
  The Text To Speech library uses Timer1 to generate the PWM
  output on digital pin 10. The output signal needs to be fed
  to an RC filter then through an amplifier to the speaker.
*/

#include <TTS.h>

// Media pins
#define ledPin 13       // digital pin 13                          
const int pin = 0; // analog pin 0

int tempc = 0;
int tempb = 0;

// Variables
char text [50];
boolean state=0;

TTS text2speech;  // speech output is digital pin 10

void setup() {}

void loop()
{  

// Takes 8 samples and sums up
  for(int i = 0; i < 8; i++)
{
tempc += analogRead(pin);
}

// Makes some calculations
tempc = (5.0 * tempc * 100.0) / (8.0 * 1024.0);
int tempb = tempc + 0.5;

state = !state;
Test_Speech();
}

void Test_Speech()
{
text2speech.setPitch(6); //lower values = higher voice pitch
strcpy(text, tempb);
 text2speech.say(text);

 delay(500);
}


int tempb = tempc + 0.5; gives the temperature numbers, like 23 degrees.
-----
strcpy(text, tempb);
 text2speech.say(text); should say the value.

This works fine:
strcpy(text, "Hello there 1 2 3 4 5");
 text2speech.say(text);

But i want it to say the int tempb value
I think there is a problem with text and integer..
« Last Edit: June 27, 2010, 07:29:52 am by Fredx » Logged

Nottingham, UK
Offline Offline
Jr. Member
**
Karma: 0
Posts: 90
Wait! Don't touch that wire...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The strcpy is bad. You are trying to copy an int to a string. There are int to string conversion functions to use instead.
Logged

Pages: [1] 2   Go Up
Jump to: