Internet Radio Project - Page 1
Forum section: electronics / projects

author: sini6a
author_rank: Contributor
timestamp: January 15, 2024, 07:42:09 pm
content: Hi all!I am new to this forums and electronics in general. This is my second project that I have built from scratch and I was wondering if someone can look at it and give me some commentary if everything looks good/suggest improvements. I was also wondering how the wall charger is negotiating with the supply current or is it just supplying current as much as the integrated charger can hold.The PCB is not yet designed as I want to make sure that this will work before going further into it. I want to apologize to the moderators if I've put this post in wrong sectionBest Regards!

author: wasedadoc
author_rank: Super Contributor
timestamp: January 15, 2024, 07:57:39 pm
content: I have examined that schematic and it does not appear to be an internet radio. I see no part which can connect to ethernet or Wi-Fi.

author: sini6a
author_rank: Contributor
timestamp: January 15, 2024, 08:05:57 pm
content: The MCU used on the second page is STM32WB55CGU6 which is Bluetooth capable. I was thinking I could connect it to WiFi but after you mentioned it I realized I will be able to connect it only to Bluetooth, right?

author: coromonadalix
author_rank: Super Contributor
timestamp: January 15, 2024, 08:29:59 pm
content: i would say bluetooth speaker / audio player

author: sini6a
author_rank: Contributor
timestamp: January 16, 2024, 10:38:38 pm
content: What about this updated one using ESP32 instead for STM?

author: coromonadalix
author_rank: Super Contributor
timestamp: January 16, 2024, 10:58:05 pm
content: sadly same thingif not convinced share the code and well see

author: Ian.M
author_rank: Super Contributor
timestamp: January 17, 2024, 12:25:37 am
content: There's also something hinky with the power section. It appears to use a single cell LiPO charged from USB Vbus (and the USBLC6-2SC6 TVS array means Vbus must be nom. 5V) so when running from battery there is max. 4.1V, min 3.0V available on Vcc. When running from USB power Vcc will be one Schottky diode drop below Vbus, so in most cases less than 5V. The switching regulators for +3.3V and +5V are buck converters.That means the 5V rail will *NEVER* be as high as 5V and the 3.3V rail will start to brownout somewhere around half charge, depending on the minimum drop of its switching regulator.Also there is no battery voltage sensing to the MCU and its got a hard power switch, so it must rely on the LiPO's protection board (if any) for under-voltage cutout. That's not going to be good for the battery long-term.

author: sini6a
author_rank: Contributor
timestamp: January 17, 2024, 07:16:06 pm
content: Hi!Thanks for your feedback, I really appreciate it. I have revised the design and connected the STAT pin from Battery IC to the MCU for further processing of the battery charge. The MCU is only controlling the 5V regulator and can shut it down in case of low power. What should I use to implement such a design with additional protection on the battery except the LiPO integrated protection?If I use dual cell battery then will I be able to charge the battery through 5V VBUS power supply, and is it possible to have such a design with single cell battery?EDIT: According to datasheet of the power regulators used, the input voltage should be between 2.0V and 6.0V which I assumed should work both with VUSB and single cell battery. Here is the link to the datasheet:https://datasheet.lcsc.com/lcsc/2304140030_XI-AN-Aerosemi-Tech-M3406-ADJ_C83224.pdfI am also attaching the revised version of the schematics.

author: Ian.M
author_rank: Super Contributor
timestamp: January 17, 2024, 08:03:07 pm
content: You assume incorrectly.The M3406 you linked is a BUCK converter. That means Vin > Vout. If you give it 2V Vin, it could be used for a 1.5V rail (or any other 0.6V to a little under 2V), but certainly cant produce a higher voltage.If you want to stay with a single cell LiPO, you'd need a boost converter for +5V and a buck-boost (probably SEPIC) for +3.3V.

author: sini6a
author_rank: Contributor
timestamp: January 18, 2024, 10:05:26 pm
content: Hi Ian!Thanks for your feedback. I have updated the design according to your suggestions. Can you please have a short look at itBest Regards

author: Ian.M
author_rank: Super Contributor
timestamp: January 18, 2024, 10:16:46 pm
content: The TX4310B is a flying capacitor voltage doubler with a linear preregulator. That's nice if you only need a few mA at 3.3V but its efficiency will suck at higher currents and its unlikely to be suitable for your MCU.

author: sini6a
author_rank: Contributor
timestamp: January 20, 2024, 05:52:14 pm
content: Thank you for the information. I am learning something new everydayI found Texas Instruments TPS63000 which I am thinking will be good for this application. I am attaching my schematic here again. I was also working on designing the MCU on it's own instead of using an already complete package. The only thing that's left is the antenna which I will design a PCB one.Best Regards

author: Ian.M
author_rank: Super Contributor
timestamp: January 20, 2024, 06:19:37 pm
content: OK, now your power section looks reasonably sane. Study the recommended layouts for the various SMPS ICs before doing your board layout.Good luck with the PCB antenna - if you use a cheap PCB supplier and need well controlled RF impedances, you may need to do a test PCB to characterise the dielectric thickness and permittivity, and obviously need the test equipment to do so.

author: sini6a
author_rank: Contributor
timestamp: January 20, 2024, 07:07:51 pm
content: Hi Ian!Thank you very much for your feedback. This sounds very reasonable to me now when you have explained it!Unfortunately I don't have an advanced equipment except an usual multi meter. There are videos on designing a PCB antenna which I may try and hope it will work. Otherwise I may implement a design with an external RF antenna! I will keep this post alive and update as soon as I proceed further in the design!Thank you once again for all your help!Best Regards

author: sini6a
author_rank: Contributor
timestamp: January 31, 2024, 08:40:10 pm
content: Hello!I have designed the board and ordered a prototype but it doesn't seem to work. I've noticed that I've made a mistake with the DVS protection diodes on the USB input so I desoldered it and connected the D- and D+ directly with a wire. The board is not recognized when I plug it in on one computer with USB 2.0 port and on the other computer I get USB enumeration failed and a lot of errors trying to reset the board etc. I have used multimeter to inspect the voltage on the ESP32 and it seems like I am getting only 3V. Should the voltage drop if the chip is consuming power or could this be the issue. Some advice is appriciated.Here is the routing of the board itself and I am attaching a URL to the GitHub project. I am working on fixing the DVS diodes on the input.https://github.com/sini6a/internet-radio-speakerBest Regards

author: sini6a
author_rank: Contributor
timestamp: February 03, 2024, 02:42:40 pm
content: Anyone? What should I start diagnosing?

author: ace1903
author_rank: Regular Contributor
timestamp: February 04, 2024, 03:09:49 pm
content: Wrong voltage can be symptom of bad layout.What happens when board is powered by battery? Does the voltage stays the same?Can you measure current consumption when board is powered from lab supply(with usb disconnected)?Starting prototyping without JTAG or UART for programming/debugging is bad practice.USB tracks are badly routed but I think that are not that bad to prevent USB from working.More likely crystal is not stable enough with 10pF at 40MHz(have you checked in the datasheet?).Do you have oscilloscope to check for 40MHz signal?Routing high speed USB signal on top of sensitive crystal track is also bad practice.Do you have info about boot rom in C3 variant? Do you know what PID and VID to expect when USB start finally to work?Board that is not recognized can be due to missing USB drivers on PC. Can you read PID and VID when that happens?

author: sini6a
author_rank: Contributor
timestamp: February 04, 2024, 05:23:23 pm
content: Hi!When board is powered by the battery it reads same voltage at the MCU at 3.0V. The readings on the SPI flash is at 2.9V. Unfortunately I don't have an equipment to measure consumption but I will try to visit place with lab equipment to do additional measuring.I will redesign the circuit to include at least JTAG for debugging.The crystal capacitor calculations are based on calculations which resulted in 10pF with 4pF stray capacitance and the crystal itself has 9pF. I have included 100 ohm current limiting resistor too. No oscilloscope either but if I can get one I will do the testing.I am using Linux and reading a messages using dmesg. The board is not enumerated at all so I cannot read any PID or VID.On enable pin of the MCU I have used RC filter with 10k ohm resistor and 100nF capacitor. This is one more thing I suspect and I may have timing issues.

author: ace1903
author_rank: Regular Contributor
timestamp: February 06, 2024, 07:55:09 am
content: Hi,Datasheet mentions:"To improve control performance using a feedforward capacitor in parallel to R1 is recommended."Don' know how critical that is but it is worth checking.Those 2n2 inductors in power supply lines are rated for nominal current?That low values are usually used in RF applications and sometimes are inadequate for power supply filtering where significant steady current is present.I would recommend you to add interface for serial programming and to add several LEDs for debugging in next version.When lacking measurement equipment often is more effective to check power supply issues with simple blinking led test program.USB interface is nice but difficult to debug without proper equipment.

author: sini6a
author_rank: Contributor
timestamp: February 08, 2024, 07:59:15 pm
content: Hi Ace!Yes, I have used inductors rated at 900mA. Unfortunately as you mentioned I don't have the needed equipment so I think I will redesign the whole board and use as much through hole components as possible for easier debugging. I can also put some serial debugging which will make it easier.I really appreciate all your help and I will keep you updated.Best Regards!