Go Down

Topic: Intercom using two old dial telephones (Read 2333 times) previous topic - next topic

bakegoodz

Thanks for directing me to the right board support, now it compiles. Talk works fine, but I can't get ring to work. I rechecked schematics, traces, soldering. I could have missed something, but I hear the relays switch like they are supposed to. It may be that your design is not compatible with phones from the United States that used 90v 60Hz AC to make them ring.

6v6gt

#16
Jan 18, 2020, 11:02 am Last Edit: Jan 18, 2020, 12:43 pm by 6v6gt
Thanks for directing me to the right board support, now it compiles. Talk works fine, but I can't get ring to work. I rechecked schematics, traces, soldering. I could have missed something, but I hear the relays switch like they are supposed to. It may be that your design is not compatible with phones from the United States that used 90v 60Hz AC to make them ring.
I've tested this only with European phones. These old phones were usually designed to work under very sub-optimal conditions so, anyway, I'd have expected some tolerance and also that you would have heard at least some attempt to ring. The design of this circuit is restricted to an absolute max of 36 volts because of the specification of the L293 H bridge.

Anyway, that you are hearing the relays clicking is a good sign, especially if the clicking follows the pulse sequence described below.
Assuming you have built the circuit exactly according to the design, it should perform as follows. If you have made any changes to the design, describe these briefly for now and later you may have to post a schematic.

Phone A and B are initially on hook
- A goes off hook
- Led D1 switches on momentarily to indicate the MCU has woken up-
- Led (either D12 or D13 lights) to indicate the respective phone is now off hook
- Phone B starts ringing. Here, the relay will click on and off during the ringing to enable the standard UK ring signal ( 700mS on, 300mS off, 700ms on, 3300mS off, all repeated)
- Phone B goes off hook (is answered). Led D13 lights.
- At the end of the conversation, both phones go back on hook. Leds D12 and D13 go out and, a few seconds later, Led D1 blinks to show the MCU is entering sleep mode.

If you hear the relay clicking as described above, the problem is likely to be with the L293 or its connections.

With any testing, you have to be careful that nothing you connect across the phone terminals looks like an off hook which will then stop the ringing.

Test 1 is to disconnect phone B and connect 2 leds back to back (that is one reversed against the other) and put a 0.1uF (100nF) capacitor in series with the pair. Put this small circuit in place of phone B. If these leds both flicker during a ring attempt when phone A is off hook, then AC is getting to the phone terminal on the circuit board. The value of the capacitor is too not critical but with higher values, a series resistor (say 1k) would be good. The purpose of the capacitor is to block DC and must be non polarised.

If nothing is getting through, then check on the L293 during a ring attempt:

1. That 5 volts is applied to pin 16
2. That 24 volts is applied to pin 8
3. That pin 1 (enable)  is brought high during the active period of the ring burst
4. That pins 2 and 7 are alternating in opposite phases High / Low, again during only the active phase of the ring burst. This may be difficult to measure, but with a digital multimeter, I guess you'll see 2.5 volts to ground because the duty cycle is 50%. With the meter on AC, you may even see 5 volts between the two pins.

I hope that gets you further but, anyway, describe what you see.






bakegoodz

#17
Jan 18, 2020, 10:10 pm Last Edit: Jan 20, 2020, 11:24 pm by bakegoodz
Thanks for the trouble shooting steps, I'll work on that.
I case someone is interested, my modifications are publicly available. I've attached SCH and PCB, but everything is also available at: https://easyeda.com/sebby/phonesystem
Don't need a login to access. If you click on Open in Editor then the main drop down(folder icon) has exports of Schematic, Gerber, and BOM. You can even do a Save As and fork the project, but that would require creating a free account.

6v6gt

#18
Jan 19, 2020, 12:02 am Last Edit: Jan 19, 2020, 12:57 am by 6v6gt
Ok. You may well have done a better job of the PCB than I did. It looks quite compact. Since you are not switching the 24 volt supply, there may be some further scope for optimizing the sense circuit.
You've changed at least the ATtiny84 pin which controls the EN1 pin of the H-bridge. Have you also updated the sketch to reflect this change?
If you've also updated the sketch, post that here also.

bakegoodz

Yes, I had changed the sketch to reflect my change. It's now attached it to the last post. I changed to a 24v trigger on the relay to simplify the PCB wiring. I studied the data sheet of the 2N3904 transistor and I couldn't find a problem with changing the collector and emitter voltage to 24v. I looked to maybe change the voltage on the sense circuit too, but I'm unsure in selecting the right resistors to divide the voltage correctly to the microprocessor. When I get some time, I'll monitor the serial and try to find the problem in my design.

TriB

#20
Jan 21, 2020, 11:27 am Last Edit: Jan 21, 2020, 11:29 am by TriB Reason: Inserted link
I just have rescued an old dial plate phone from being trashed!
My idea is not to connect two phones, but using a controller, which plays mp3´s to the speaker.

The phone might stay untouched and I want to create a "box" which contains all the necessary stuff.
A button to let it ring and the controller with an SD card to randomly play stuff, when the phone is picked up.

This thread is a really good startingpoint to get used to this topic! I´d possibly ask several questions in the future :)

Just found this one:
Turn an old rotary phone into a MP3 player

bakegoodz

Are you trying to get tone dialing to work? There is another project that does that and it's documented well, but it requires creating an Element14 account to see it. There is also a Youtube Video
I didn't go with it because it costs more in parts than this project and the phone wiring in my house is all linked together anyways.

6v6gt

@bakegoodz
I had a quick look at your version of the sketch. I see you have stripped out some code related to sleep. Although sleep mode is irrelevant to you since you are not powering from batteries, I would suggest you leave that code as original until you get something to work. This is because the code should be harmless and changes to it may disturb the logic. Of course, once it is working, then start stripping it out while checking if anything breaks while doing so.
The changes you have made to support a different pin assignment must, however, stay.

You should be able also to adapt the sketch to support a 60Hz ring tone if required. Here is the code part (corrected) :

Code: [Select]

// You may have to experiment with the ring frequency to get optimal performance from the phones.
const uint32_t HALF_WAVE_PERIOD = 15 ;  // 25mS = 20Hz ; 20ms = 25Hz ; 15mS = 33.3 Hz ; 10ms = 50Hz ; 8ms = 60Hz

Go Up