Shop OBEX P1 Docs P2 Docs Learn Events
Mic connects on the Prop BOE — Parallax Forums

Mic connects on the Prop BOE

smithdavidpsmithdavidp Posts: 146
edited 2012-04-24 13:59 in Propeller 1
Yeah.... I know....it's him again.........

I am playing with the Speach_REC_Robot_4_commandsVer2 file for voice controll of the propeller. I am trying to use the onboard mic.

The tags near the Mic are P20 and P21. Am I correct in assuming that P20 is the Audio input and P21 is for the Delta feedback? This is what I put into the code:

'**************************************************************
''* Code that commands a two wheel servo robot by human voice (4 commands)
''* this code based on the following codes:
''* 1. Goertzel Speech Recognition Demo by Phil Pilgrim
''* 2. Control Two Servos by PE Kit Servo Control v1.4
''* 3. ServoContinuesRotation by CRpropellerCode-v2.0
''* Code montage (not copyright) by Nikos Giannakopoulos 2011
''*************************************************************
'' To use this program you need the Parallax Demo Board
'' a robotic platform (chassis with two servos and two wheels )
'' three led (green yellow and red) and five resistors
''***************************************************************************************************
''********************************** the 4 VOICE COMMANDS ******************************************
''* It is IMPORTANT when the robot learns your voice to give the commands with the following order:
''* 1st command:*FORWARD* - 2nd command:*BACKWARD* - 3nd command:*RIGHT* - 4th command:LEFT
''***************************************************************************************************
CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
NBINS = 8 'Number of different frequencies to analyze.
THRESHOLD = 500 'Sound threshold to mark the beginning of an utterance.
TMPLEN = 50 'Length of a word template in samples.
NWORDS = 4'5 'Number of words in the vocabulary.
NEXAMPLES = 1 ' 3 'Number of template examples for each vocabulary word.
INP_PIN = 20 'Audio input pin (can be modified for other boards).
FB_PIN = 21 'Sigma-delta ADC feedback pin (can be modified for other boards).
'
SERVO_COUNT = 2 ' Number of servos to control
servo_ch1 = 14
servo_ch2 = 15

green_led = 9
yellow_led = 10
red_led = 11

The ability to use voice commands is part of my project.

My second question is the aufio output on 26 and 27. Does the VeHo 360 receive audio from both pins or does it only do mono from one of the pins?

Thanks for your time

Comments

  • average joeaverage joe Posts: 795
    edited 2012-04-24 09:18
    Looks like you have the physical connections correct. 20 is audio in, 21 is feedback out. Audio outs are p26 and 27 and can do stereo. You could do mono if you wanted, through one pin *of your choice* or both. It looks like the VeHo has stereo inputs, but don't quote me on that..
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-04-24 09:40
    The Veho has stereo inputs, and they are summed. This implies that you should not use differential mode audio output to the two channels, because the two signals will cancel and you won't hear anything. So, for monaural audio, specify P26 or P27 but not both.

    -Phil
  • smithdavidpsmithdavidp Posts: 146
    edited 2012-04-24 10:33
    The Veho has stereo inputs, and they are summed. This implies that you should not use differential mode audio output to the two channels, because the two signals will cancel and you won't hear anything. So, for monaural audio, specify P26 or P27 but not both.

    -Phil

    Thanks Phil. You just fixed some of my problems with a few of the audio example spin programs. Setting the output to pin 26 only gives me audio. When I set the left as 26 and the right as 27 I had no audio at all. Of course I could have tried stero headphones but I didn't want to have to follow the bot all over the house just to hear what was going on. lol
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2012-04-24 12:09
    When I set the left as 26 and the right as 27 I had no audio at all. Of course I could have tried stero headphones but I didn't want to have to follow the bot all over the house just to hear what was going on. lol

    Just as an FYI, the standard for the stereo plug connector is tip-left, ring-right. Going by the PropBOE schematic, that makes pin 26 right, and pin 27 left.

    Of course, you can always just turn around and then the sound will go into the correct ears. That's what I usually do.

    -- Gordon
  • HShankoHShanko Posts: 402
    edited 2012-04-24 13:09
    But Gordon, that makes for a rather uncomfortable position when sitting and one has to 'turn around'. tee hee.
  • smithdavidpsmithdavidp Posts: 146
    edited 2012-04-24 13:59
    Just as an FYI, the standard for the stereo plug connector is tip-left, ring-right. Going by the PropBOE schematic, that makes pin 26 right, and pin 27 left.

    Of course, you can always just turn around and then the sound will go into the correct ears. That's what I usually do.

    -- Gordon

    ummmmm attached a trailor to the Boe Bot......it won't pull it :-(
Sign In or Register to comment.