Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 8 of 8

Thread: Teensy 4.0 Audio Guestbook - No mode change based on handset switch

  1. #1
    Junior Member
    Join Date
    Mar 2023
    Posts
    5

    Teensy 4.0 Audio Guestbook - No mode change based on handset switch

    Hey all,

    Been following the audio guestbook tutorial here

    using this github code

    I have figured out which wires run to the handset switch and connected them directly to the G and 0 pins on the teensy board as suggested.

    I open the serial monitor and I have zero change in status.
    It was "sort of" working recently when the switch wires and wires to teensy were on the main board but we were seeing some kind of interference so I bypassed the board and connected the wires directly. Checking the wires with a meter, I am still seeing a change in resistance, but zero change in the Serial Monitor.

    Plugging the teensy into my computer, the handset beeps when it comes online but will not respond after that.

    Any suggestions? I've browsed the forum here but so far have been unable to find my answer.

    Thanks!

  2. #2
    Senior Member PaulS's Avatar
    Join Date
    Apr 2015
    Location
    Netherlands
    Posts
    1,029
    Quote Originally Posted by schweermo View Post
    I open the serial monitor and I have zero change in status.
    It was "sort of" working recently when the switch wires and wires to teensy were on the main board but we were seeing some kind of interference so I bypassed the board and connected the wires directly. Checking the wires with a meter, I am still seeing a change in resistance, but zero change in the Serial Monitor
    A few checks first:
    1. Are you indeed using the exact same code as on Github: https://github.com/playfultechnology...-guestbook.ino?
    2. Is the wiring exactly like this picture? I suspect not since you are talking about a "main board".
    3. Does the Serial monitor show "Serial set up correctly"? This is about the first thing that happens in the code and should be visble in the serial monitor.
    4. What do you mean by "Checking the wires with a meter, I am still seeing a change in resistance"? If you measure the resistance of a wire I expect it to be stable, otherwise the wire is not connected/soldered correctly.

    Can you upload detailed photo's of your setup? It's bit guessing what is going now.

    Paul

  3. #3
    Junior Member
    Join Date
    Mar 2023
    Posts
    5
    1. Yes, I am using the exact code posted on the github link.
    2. My wiring is identitcal to the photo minus the playback button, i have no desire for the playback button so have not added it. Sorry, when I said "main board" I was referring to the board within the phone, though mine is more of a block (425b). As of right now, the only wires I have running to the block in the phone are ground wires. For the Tip & Mic, I have run directly from teensy components to the handset.
    3. My Serial Monitor shows "SD card correctly installed" as the first line, I've attached a screencap of the output.
    4. In the video, he uses a multi-meter to identify which wires/terminals are from the handset switch. I've got those identified and the meter responds as expected when connected to those wires while pressing/releasing the handset switch.

    A few photos below.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	serial monitor..png 
Views:	1 
Size:	8.4 KB 
ID:	30595   Click image for larger version. 

Name:	20230312_135748.jpg 
Views:	8 
Size:	124.6 KB 
ID:	30596  

    Click image for larger version. 

Name:	20230312_135805.jpg 
Views:	8 
Size:	130.8 KB 
ID:	30597  

  4. #4
    Senior Member PaulS's Avatar
    Join Date
    Apr 2015
    Location
    Netherlands
    Posts
    1,029
    Thanks for the info.
    So apparently the code in void setup() is completely run since we see the message "Mode switched to: Ready".
    The next message that is expected to show is "Handset lifted". That can only happen when the handset switch is activated and Teensy pin 0 is pulled to ground.
    Can you check with your multimeter whether the voltage at pin 0 is pulled up to 3V3 with the handset on the phone and pulled to ground when the handset is lifted?

    Paul

  5. #5
    Junior Member
    Join Date
    Mar 2023
    Posts
    5
    I'm not sure I understand where the leads from my meter should be, and in what mode. I assume one lead on pin 0, where should I place the other?

    Thanks for your help, Paul.

  6. #6
    Senior Member PaulS's Avatar
    Join Date
    Apr 2015
    Location
    Netherlands
    Posts
    1,029
    Put your multimeter in DC voltage measurement mode and connect the negative lead to pin GND and the positive lead to pin 0. With the headset on the hook you should measure ~3.3Vdc since pin 0 is pulled-up. When you lift the headset from the hook, the voltage should go to ~0Vdc.
    If it doesn't, check whether one side of the switch is connected to GND and the other side is connected to pin 0.

    Could you upload some more pictures? Preferably an overview photo and a close-up photo of the Teensy and audio adapter board with visible wiring.

    Paul

  7. #7
    Junior Member
    Join Date
    Mar 2023
    Posts
    5
    Click image for larger version. 

Name:	20230319_153130.jpg 
Views:	4 
Size:	77.6 KB 
ID:	30657Click image for larger version. 

Name:	20230319_153051.jpg 
Views:	4 
Size:	72.5 KB 
ID:	30658Click image for larger version. 

Name:	20230319_153103.jpg 
Views:	4 
Size:	67.2 KB 
ID:	30659Click image for larger version. 

Name:	20230319_153113.jpg 
Views:	3 
Size:	80.5 KB 
ID:	30660

    I've followed your direction to test with a multimeter and my results are...unpredictable.

    The first time I try it, I see the change from ~3.3 to 0...the 2nd and 3rd time and every time beyond that, a change the handset switch position does not affect the readings on the meter and the changes seem to be more random. I know that the 2 wires from the switch to GND and 0 pins are very close together. Would this result be because those wires are touching? I have looked at it and included a photo taken with a macro lens but I can't tell if they're c onnecting or not...?

    Click image for larger version. 

Name:	20230311_161330.jpg 
Views:	4 
Size:	39.6 KB 
ID:	30662Click image for larger version. 

Name:	20230311_161321.jpg 
Views:	2 
Size:	40.8 KB 
ID:	30664

  8. #8
    Senior Member PaulS's Avatar
    Join Date
    Apr 2015
    Location
    Netherlands
    Posts
    1,029
    Difficult to say what exactly is going on. But I suspect the switch is the culprit. Looking at the different corrosion spots, I can imagine that the internal contacts of the hook-switch may be affected as well, resulting in the undesirable behavior you see.
    Next step would be to disassemble the switch (if possible) and getting it to operate as intended. 'Open' [very high resistance] when the handset is on the hook and 'closed' [very low resistance] when the handset is lifted. You should use your multimeter in resistance measurement mode and connect it to the pins of the switch [without the Teensy attached].

    Paul

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •