Bluetooth rotary phone from PTT T65 - Page 1
Forum section: electronics / projects

author: Zipdox
author_rank: Regular Contributor
timestamp: September 25, 2024, 11:42:27 pm
content: I'm turning a PTT T65 into a Bluetooth rotary phone, and I would appreciate it if some people took a look at the schematic and gave me their thoughts.https://easyeda.com/editor#id=7d0350ec43844219912695cec1a0e156

author: Benta
author_rank: Super Contributor
timestamp: September 25, 2024, 11:49:42 pm
content: Ugly and unreadable, won't waste time on it.Learn how to draw schematics. Little boxes around a device or two with labels attached are intellectual laziness. You might just as well post a spreadsheet.Use wires in the future.Are my thoughts OK?

author: Zipdox
author_rank: Regular Contributor
timestamp: September 25, 2024, 11:54:17 pm
content: Quote from: Benta on September 25, 2024, 11:49:42 pmAre you saying I should connect everything with wires rather than labels?

author: thermistor-guy
author_rank: Frequent Contributor
timestamp: September 26, 2024, 12:33:21 am
content: Quote from: Zipdox on September 25, 2024, 11:54:17 pmI haven't reviewed your design, but the schematic style is fine.It helps someone unfamiliar with your project get to grips with it. I can imagine this being presented indesign review meetings.There is a risk, with a label-centric style, you overlook missing connections, but prototype testingwill pick that up.Use anything that helps you think clearly, about what you are doing.

author: Zipdox
author_rank: Regular Contributor
timestamp: September 26, 2024, 12:39:57 am
content: Quote from: thermistor-guy on September 26, 2024, 12:33:21 amEasyEDA throws an error in the net check if you have an unconnected label. It won't save you if you forgot a third connection to a net though.

author: Benta
author_rank: Super Contributor
timestamp: September 26, 2024, 06:32:06 pm
content: Quote from: Zipdox on September 25, 2024, 11:54:17 pmShort answer: yes.Long answer with an example:Let's say you have a circuit with an MCU and three I2C peripherals. Let's try to see how they're connected.To make it easy, let's start with the MCU and the SCK output. What to do?Well, begin in the top left corner and start scanning the schematic for the matching SCK labels. As a new reader of the schematic, you don't know that there are three peripherals. So when you find the first instance of a matching label, the risk is that you stop the search. Error!If you start with one of the peripherals and try to find the Master, same story: begin in the top left corner and start scanning the schematic until you find the label.I could go on, it's inefficient, time-consuming and error-prone.With a wire, you see the connection between the parts immediately, from the branches on the wire it's easy to see how many parts are involved, and you can follow the wire in both directions. Fast, easy and error-free.In short: readable and clear.

author: pcprogrammer
author_rank: Super Contributor
timestamp: September 26, 2024, 06:52:33 pm
content: About the schematic, it can do with some improvements to make it a mix between what Benta is stating and what you made. Connecting everything with wires might make it unreadable too, due to a mishmash of wires. For this busses can be used, but labels work too.But that aside, the capacitors you used on the switches (dial is a switch too) might be a bit high. Maybe run some tests starting with 10nf up to 100nf. The switches might also work better with more current through the contacts, so also experiment with the pullup resistors.Another thing, the bell driver, if you are using the original bell, it depends on how high VCC is, if it will ring. If I'm not mistaken, old phones used about 90V AC for ringing the bell. You can't have your VCC this high, and even half that will be to much for the TPS5430DDAR.But a fun project none the less. Please post some pictures of the old phone and when finished the new insides.Edit: Also look into what the microphone and speaker in the original form need to be driven. It might not work with the modern IC you choose.

author: globoy
author_rank: Frequent Contributor
timestamp: September 26, 2024, 07:24:12 pm
content: I don't know what you're planning to use for the software component but I successfully wrangled Espressif's bluetooth stack to provide telephony services in my weeBell project. I did things a bit differently than you are planning to but just in case you'd like someone else's code to look at:https://github.com/danjulio/weeBell_bluetoothThe hardware my code ran on is at:https://github.com/danjulio/weeBell_hardwareI had to deal with echo cancellation which you shouldn't have to as you're interfacing separately to the handset speaker and microphone.I second pcprogrammer's comment: Make sure your DC input can ring the bell if you haven't already (they will ring, less loudly, on lower voltages). Also make sure the levels into and out of your codec are ok. The codec looks like it wants to drive a 8-16 ohm load. Your old phone speaker might be higher impedance. Fortunately the codec has an amp on the input for the microphone. You might have to adjust that some however.I think you should include a 1uF cap between EN and ground. Espressif recommends (IIRC) a 22 uF + 0.1 uF bypass cap on the input which you more-or-less have with two distributed 10 uF caps on 3V3. If you're running I2C at 400 kHz then I'd lower the values of the I2C pullups to something like 2.2 kohm.Also, I'd recommend to include the ubiquitous 2-transistor auto-programming circuit using DTR# and RTS# from your USB UART (bring them out on H2) so you won't always have to be doing the BOOT/RESET button dance when you load code.

author: Zipdox
author_rank: Regular Contributor
timestamp: September 26, 2024, 08:40:41 pm
content: Quote from: pcprogrammer on September 26, 2024, 06:52:33 pmI'll take it into consideration.Quote from: pcprogrammer on September 26, 2024, 06:52:33 pmI plan to do some debouncing tests with the switches before I finalize the design.Quote from: pcprogrammer on September 26, 2024, 06:52:33 pmThe bell already works with 10V. I tested it with a DRV8833 I had on hand at 12V and it's plenty loud. VCC will be 12V.Quote from: pcprogrammer on September 26, 2024, 06:52:33 pmI also already tested the microphone. It's a carbon microphone. I tested it with a 1k resistor and 3V bias supply. The output signal is pretty strong, so I'm pretty confident that it'll work. As for the speaker, it's 100 ohms, so I might need to look into that. Maybe using the speaker output instead of the mono output is a good idea.Quote from: globoy on September 26, 2024, 07:24:12 pmThank you for the link, I'll definitely look into that. I already did some research regarding Bluetooth capabilities, and saw that many ESP32 variants don't support Bluetooth classic, only Bluetooth LE. So I successfully avoided a possible disaster of HSP/HFP not being possible. As a side note, have you considered using a hybrid transformer instead of echo cancellation in your device?Quote from: globoy on September 26, 2024, 07:24:12 pmYeah I'll look into the datasheet. I might end up using the speaker output rather than the mono output.Quote from: globoy on September 26, 2024, 07:24:12 pmThe reset button and pullup resistor will be right next to the enable pin of the ESP32 module on the PCB, are you sure that's necessary. Espressif doesn't mention this practice in the datasheet either. As for the I2C pullups, I think I'll use 3.3k so I don't add another BOM entry. The line won't be long anyway.Quote from: globoy on September 26, 2024, 07:24:12 pmI don't even know if I have a USB-UART adapter that has those pins. I've been pressing boot and reset on my dev boards for ages anyway, and I'd like to save on board space and number of different components.

author: Benta
author_rank: Super Contributor
timestamp: September 26, 2024, 08:56:51 pm
content: Quote from: pcprogrammer on September 26, 2024, 06:52:33 pmThat's normally not a problem if the parts are placed intelligently.

author: globoy
author_rank: Frequent Contributor
timestamp: September 26, 2024, 09:17:07 pm
content: Quote from: Zipdox on September 26, 2024, 08:40:41 pmThe entire reason echo cancellation came about was because telephone systems starting having significant latency and the hybrid transformers didn't work anymore. Bluetooth/cellular connections have lots of latency... One place you can read about it is athttps://en.wikipedia.org/wiki/Telephone_hybrid. There's also lots of interesting history about the development of EC on the innerwebs if you care. I used a SLIC because it made the audio interface and impedance matching easy and could generate ring voltages for more than one telephone on a 2-wire interface. Plus they're cheap.But hacking an existing phone to get all 4 wires to the handset definitely makes the problem easier.Quote from: Zipdox on September 26, 2024, 08:40:41 pmLook at Espressif's ESP32 design guidelines. They claim EN needs to go high after power stabilizes and recommend a 10k/1uF combo. The 1uF is definitely necessary if using the auto-programming circuit but I think it is a good addition even without it.https://docs.espressif.com/projects/esp-hardware-design-guidelines/en/latest/esp32/esp-hardware-design-guidelines-en-master-esp32.pdf"To ensure the correct power-up and reset timing, it is advised to add an RC delay circuit at the CHIP_PU pin. The recommended setting for the RC delay circuit is usually R = 10 kΩ and C = 1 μF. However, specific parameters should be adjusted based on the characteristics of the actual power supply and the power-up and reset timing of the chip."

author: Zipdox
author_rank: Regular Contributor
timestamp: September 26, 2024, 10:44:40 pm
content: Quote from: Benta on September 26, 2024, 08:56:51 pmI'm perceiving your posts to be slightly hostile/passive-aggressive to be honest. This leads me to be slightly apprehensive about taking your advice. I think pcprogrammer's more nuanced comment is more reasonable.

author: Benta
author_rank: Super Contributor
timestamp: September 26, 2024, 11:36:24 pm
content: Quote from: Zipdox on September 26, 2024, 10:44:40 pmI apologise if they read that way, and admit that my first post comes over like that when rereading it.I'm trying to be helpful. But helpful also means telling someone he/she is going down the wrong path.Drawing schematics is a bit like writing a book: people need to be able to read it. Decades have passed and standards have been decided on how to write good documentation and draw readable schematics, so that people seeing a circuit will be able to understand and read it immediately.I explained in a post how to do a better schematic, I hope that at least was helpful.You need to think about the reader. That applies to both authors and designers.

author: PlainName
author_rank: Super Contributor
timestamp: September 26, 2024, 11:43:45 pm
content: Quote from: Benta on September 26, 2024, 08:56:51 pmI'll just add that using schematic symbols that show pins grouped by functionality, rather the 'same as footprint' used here, helps enormously with schematic wiring.

author: Zipdox
author_rank: Regular Contributor
timestamp: September 26, 2024, 11:48:09 pm
content: Quote from: PlainName on September 26, 2024, 11:43:45 pmSadly I don't think I have that luxury with EasyEDA.

author: Benta
author_rank: Super Contributor
timestamp: September 26, 2024, 11:58:43 pm
content: Why not install KiCAD?

author: PlainName
author_rank: Super Contributor
timestamp: September 27, 2024, 12:02:38 am
content: Quote from: Zipdox on September 26, 2024, 10:44:40 pmHe's not being too diplomatic because the issue you demonstrate is quite common, and getting worse as new designers follow the existing crap examples.How about an example. Attached is something I am working on, so essentially it's just things (mostly!) placed without any editing of the parts yet. There are no pretty boxes saying what each thing does, no labels to scan and try to match to some other label. You may think it now as pretty as yours (obvs! - it's a work in progress, but it still won't be at the end, probably). But you don't need any of that stuff because you can see easily how everything connects, what they do and to what they do it. Nothing hidden, no searching. Things flow from left to right.

author: Zipdox
author_rank: Regular Contributor
timestamp: September 27, 2024, 12:07:44 am
content: Quote from: Benta on September 26, 2024, 11:58:43 pmI do have KiCAD, and I use it for other projects, but I couldn't be asked to make all the custom symbols and footprints in KiCAD.

author: Benta
author_rank: Super Contributor
timestamp: September 27, 2024, 12:15:51 am
content: Quote from: Zipdox on September 27, 2024, 12:07:44 amSeriously? Your EasyEDA thing doesn't have a lot of symbols not available in KiCAD (I didn't find any except for the screw terminals). And making a new symbol takes at most 5 minutes (if it's really complex).

author: Zipdox
author_rank: Regular Contributor
timestamp: September 27, 2024, 01:41:31 am
content: Quote from: Benta on September 27, 2024, 12:15:51 amThere's probably a way to do it but I'm lazy. This is more of a gimmick project.

author: pcprogrammer
author_rank: Super Contributor
timestamp: September 27, 2024, 06:42:14 am
content: Quote from: Zipdox on September 26, 2024, 11:48:09 pmMaking your own symbols in EasyEDA is simple. I do it for most of my projects when I feel the provided ones do not suit my needs.But about the schematic and the use of labels, I do not agree with the others. Yes it is becoming more common and makes it less readable on paper or image. With a PDF though it often is possible to search and the labels become highlighted. Dividing schematics parts in functionality is nothing new. In old schematics it is often done across multiple pages, each labeled with a name indicating what the section is for.Also if it is just a private schematic to be used for making the PCB and not for use in a company, who gives a shit that it is just labels.With proper chosen label names it can be obvious as to where to look for the other side of the connection.In my opinion it is best to think about a careful balance between using wires, busses and labels.As an example close to this project, in the schematic the pullup resistors for the I2C bus are right next to the ESP32 symbol. Here definitely wires should be used instead of having the two extra labels.So conclusion, sure pointing out that a schematic is not super readable and can be improved is ok, but don't be aggressive about it. A single post with some pointers on how to improve will do. Benta's first post indeed comes across as aggressive and is not helpful at all.

author: PlainName
author_rank: Super Contributor
timestamp: September 27, 2024, 10:20:56 am
content: QuoteI do that normally - multi-sheet with inter-sheet connections. But the difference is that there is a top level sheet that shows the connections between sheets so it's easy to both get an overview and see which are connected where. Also, in a sheet there is only one labelled port for a signal (at either far left or far right edge), so there is never the case where you might have more than one port of the same signal on a sheet connecting to different parts.It is not so important on homers and trivial circuits. My first job in this field was drawing multi-sheet A0-size schematics (yes, with a pen), and when you're trying to make sense of that stuff every little helps. I think it's useful, if not important, to get into the swing of it early so that when you get onto the bigger more serious stuff you don't have to learn anew and try to drop ingrained bad habits.Having said that, these are guidelines and sometimes inappropriate (for instance, connector pins are usually numbered sequentially like they are on the physical part). But you need to be wise to them to know when to break them.

author: Benta
author_rank: Super Contributor
timestamp: September 27, 2024, 05:30:21 pm
content: Quote from: pcprogrammer on September 27, 2024, 06:42:14 amIndeed, but then why ask for opinions?My first post was off-tone and I've apologised.

author: pcprogrammer
author_rank: Super Contributor
timestamp: September 27, 2024, 05:47:10 pm
content: Quote from: Benta on September 27, 2024, 05:30:21 pmMaybe because he is not confident enough about his hardware design skills and wanted to verify that the design is correct on chosen parts and values level that is, and not to check if his schematics drawing skills are up to par.

author: tggzzz
author_rank: Super Contributor
timestamp: September 27, 2024, 06:02:35 pm
content: Quote from: Zipdox on September 25, 2024, 11:54:17 pmThat'shighlypreferable.Trying to spot every component connected to, say, an IC's output is a real pain - and there is a high chance of missing one. Doubly so on schematics that aren't "searchable". I've been on the receiving end of such horrors.A "visual map" explicitly showing what is connected to what is a great way of spotting "coherence and cohesion", and spotting where problems might be lurking. (Why isthatgoing overthere?)Plus, using the standard "design patterns" associated with sub-circuit functions greatly helps comprehension - and indicates the authorunderstandshow their circuit works.

author: tggzzz
author_rank: Super Contributor
timestamp: September 27, 2024, 06:04:52 pm
content: Quote from: Benta on September 26, 2024, 08:56:51 pmI think "good taste" is a useful concept in such cases.

author: tggzzz
author_rank: Super Contributor
timestamp: September 27, 2024, 06:07:51 pm
content: Quote from: PlainName on September 27, 2024, 10:20:56 amAh, bliss

author: tggzzz
author_rank: Super Contributor
timestamp: September 27, 2024, 06:10:12 pm
content: Quote from: pcprogrammer on September 27, 2024, 05:47:10 pmQuite possibly, but a poorly drawn schematic makes it difficult to understand and more likely that a reader would miss a subtle but important point, and less likely that a reader will bother to spend their time/energy on somebody else's "problem".

author: Zipdox
author_rank: Regular Contributor
timestamp: September 27, 2024, 10:31:13 pm
content: Quote from: Benta on September 27, 2024, 05:30:21 pmI wanted input about the electrical schematic, not about the style.

author: Benta
author_rank: Super Contributor
timestamp: September 27, 2024, 11:36:47 pm
content: Then I suggest the following:Ask a moderator to lock/kill this thread.Redo from start and ask exactly the right question(s).You have the initiative.

author: tggzzz
author_rank: Super Contributor
timestamp: September 28, 2024, 12:02:21 am
content: Quote from: Zipdox on September 27, 2024, 10:31:13 pmYou asked for, and got, comments on theschematic....Quote from: Zipdox on September 25, 2024, 11:42:27 pmDid you actually want comments on thedesign?A tastefully drawn schematic helps make a design obvious, exposing itsintended operation, strengths, and weaknesses. A poor schematic obfuscates the intention.

author: Zipdox
author_rank: Regular Contributor
timestamp: October 07, 2024, 07:45:40 pm
content: I did some testing with the switches and the rotary dial is rather bouncy, so a 10k resistor with a 1u capacitor was the right call for debouncing in my opinion.

author: Zipdox
author_rank: Regular Contributor
timestamp: October 13, 2024, 09:00:54 pm
content: The PCB designis done. I had to cram everything in the bottom due to the bell occupying the middle. I also put the traces connecting the top and bottom on the bottom layer as the bell's metal might damage the silkscreen. I stitched the GND planes where I thought it made sense to reduce the loop area. I would appreciate some feedback on the design before I order it.