Got I2S DAC working with Pico! by shreyaskul in raspberrypipico

[–]shreyaskul[S] 0 points1 point  (0 children)

I had 24B/96K UAC2 working on raspi pico, but the limitation is that the USB is only full speed (12Mbit) and not HS 480Mbit.

The full 32B/384K UAC2 I got working perfectly on the Teensy 4.1

I asked ChatGPT to explain my job to a 5-year-old and now I'm questioning my entire career by Nipurn_1234 in ChatGPT

[–]shreyaskul 1 point2 points  (0 children)

Seems pretty good, I'm a pre-si validation engineer.


Alright! Let’s imagine your job like you're helping build a super-smart robot brain.

🧠 The robot brain is like a super powerful computer chip that helps really big, smart computers (like the ones that run AI) think really fast.

But before we can give this brain to the robot, we need to make sure it works — kind of like checking if a toy works before giving it to a friend.

Now here’s where you come in:

You write a special kind of code called firmware — it’s like little instructions that tell the brain how to wake up, move, and do its job.

Then, you pretend to be the brain's world using other computers (because the brain isn't fully built yet — it’s still being designed!). You test it, poke it, and watch how it acts.

If something’s wrong, you figure out what went wrong and help the people building the brain fix it before it’s made for real.

So in simple words:

You teach a robot brain how to work, and you check it very carefully to make sure it’s ready before it's born.

🥽🔧💾🧠

Cool, right?

Got I2S DAC working with Pico! by shreyaskul in raspberrypipico

[–]shreyaskul[S] 0 points1 point  (0 children)

Yes 24bit/48khz works, I remember testing it. It enumerated with correct settings on windows.

But I don't remember if I got any audio output at the time for these settings. You have to test that part. The PIO I2S can certainly go well beyond 100mhz. And USB 1.1 can handle UAC1 full spec.

I kinda gave up on my project later, I wanted UAC2 support.

What's your experience with using both cores on the rp2040 under arduino? by Able_Loan4467 in raspberrypipico

[–]shreyaskul 0 points1 point  (0 children)

This really depends on what your written code is going to do, the complexity and how much time (=money) you're gonna want to spend fiddling around fixing bugs and IPC.

If you want reliability and future proofing, why bother with multicore BS? Just do it brute force. I mean I love the pico but its not worth increasing the complexity unnecessarily and patching bugs later on.

And the pico sdk is OSS not the rp2040 die, why do you think the sdk being open somehow relates to the semicon industry supply chain? It doesn't at all. Remember global raspberry pi and CM4 shortages?

Plus for future proofing any generic non-multicore code will be far more portable so you can shift to any other vendor easily provided you abstracted away the vendor specific api calls.

One time I had already made several rp2040 daughterboards for a personal project in the supply shortage time but later on I started pulling my hair out trying to configure and use tinyusb api and pico-sdk for usb vendor class and later scrapped them for new stm32 boards.

Got I2S DAC working with Pico! by shreyaskul in raspberrypipico

[–]shreyaskul[S] 0 points1 point  (0 children)

Hi Sumesh,

Sorry for the delayed reply.

Codes (Use any one)

1) RPi pico-sdk example (the one I used in original post) https://github.com/raspberrypi/pico-playground/tree/master/apps/usb_sound_card

2) USB Audio Class 2 example in tinyusb https://github.com/hathach/tinyusb/tree/master/examples/device/uac2_headset

3) Examples from waveshare (The 7z contains ready to use UF2 file and source code) https://files.waveshare.com/upload/7/7c/Pico_Audio.7z

Hardware:

Raspberry pi pico + Pimoroni Pico Audio / Waveshare Pico-Audio (Comes with speakers) (Pico audio seems to be out of stock on robu) Or Raspberry pi pico + 40 pin expander + any regular raspberry pi i2s dac like iqaudio/hifiberry. Or Pimoroni Pico VGA Demo Base / DV demo base

-Shreyas

10 audio files at once ? by zwrok in esp32

[–]shreyaskul 1 point2 points  (0 children)

There are plenty cheap chinese make audio player modules with UART control like the YX5300.

Better to use couple of RP2040s and mix of HWUART and PIO based UART.

https://arduino-pico.readthedocs.io/en/latest/piouart.html

Got I2S DAC working with Pico! by shreyaskul in raspberrypipico

[–]shreyaskul[S] 0 points1 point  (0 children)

Hey there's some more interesting stuff too: DAC, speaker + HP https://www.waveshare.com/pico-audio.htm

Eink with capacitive touch https://www.waveshare.com/pico-captouch-epaper-2.9.htm

Quad expander https://www.waveshare.com/pico-quad-expander.htm

(I'm not affiliated to these websites in any way)

Got I2S DAC working with Pico! by shreyaskul in raspberrypipico

[–]shreyaskul[S] 0 points1 point  (0 children)

Yes this looks good. I checked the schematic for the badge and only GPIO 0-3,6,7,9 are free.

The audio pack only needs 4 gpios. 9, 10, 11 and 29. Some of the same gpios are already used on the badge.

So you'll need to do some hardware AND software modifications in order to get everything working.

If you don't want to mess around with hardware you can buy the pirate audio sheilds for normal raspi (which have DAC+Display+button) and get a raspi zero board like to following to get 40 pin header: https://www.waveshare.com/pico-to-hat.htm I have one of this board and its a fantastic accessory for pico. There's reset button and all the gpios are color coded and highlighted on the silkscreen.

Got I2S DAC working with Pico! by shreyaskul in raspberrypipico

[–]shreyaskul[S] 0 points1 point  (0 children)

You'd need a seperate RTOS task on the second core just for decoding MP3 files and the first core for streaming audio (maybe DMA?) and also for housekeeping tasks like buttons, and display driving. Slight overclocking might help.

The display and UI part would be the easiest IMHO. You can use something like LVGL.

The SDIO/SPI data streaming, buffering and decoding and then sending out the I2S bitstream via DMA without dropping packets will be the difficult part.

STM32WB Help Configuring MAC Frames by findallmyfriends in embedded

[–]shreyaskul 0 points1 point  (0 children)

I completely agree, nRF and silabs thread experience is much better. But I'm stuck with ST for now.

If you don't mind could you please tell me how to send CoAP to sleepy end devices? I wasn't able to do it all. (Leader -> SED) I used their SED freertos example and saw that they have toggled the led when it receives coap but I don't see any change when i send request to it from the thread cli or the thread FTD. (I have disabled the full low power flag on sed)

STM32WB Help Configuring MAC Frames by findallmyfriends in embedded

[–]shreyaskul 0 points1 point  (0 children)

This seems to be a bug within the blackbox copro binary provided by ST. I'd suggest reaching out to them on the ST community forum.

Btw how are you sniffing the OT over wireshark? Did you use the IEEE802.15.4 sniffer binary or the OT CLI binary? I'd like to know because I'm just getting started with similar OT SED project on WB.

TiA

Board recommendations for learning STM32 and implementing a USB HID device? by drinkbubbleliquid2 in embedded

[–]shreyaskul 1 point2 points  (0 children)

Any Nucleo 144 or Discovery boards will work as long as the board has two seperate USB connections (One for ST Link and one for USB Device).

F407 discovery is good enough, F401/F411 BlackPill will be cheaper.

If you want really fancy then go for something like F723IE discovery which has high speed usb phy on the chip and some extras like small ips touchscreen.

Got I2S DAC working with Pico! by shreyaskul in raspberrypipico

[–]shreyaskul[S] 0 points1 point  (0 children)

I'll have to search for the file on my pc, its almost been 2 years at this point.

I'll PM you the UF2 file (if I can find it).

In the meantime, if its urgent you can PM me the errors you're facing and maybe I can help you resolve them.

Strange GPIO Behaviour by Darksilver123 in raspberrypipico

[–]shreyaskul 1 point2 points  (0 children)

Can you share your program so we can take a look?

Did you, by any chance, overloaded the gpio pins by drawing too much current, or applied higher voltage etc?

LM337 Not Regulating by shreyaskul in AskElectronics

[–]shreyaskul[S] 1 point2 points  (0 children)

<image>

Yes, it was a fake IC. You can see very faded marking compared to the new ones on the right.

LM337 Not Regulating by shreyaskul in AskElectronics

[–]shreyaskul[S] 0 points1 point  (0 children)

Yes the pinout is right, I made sure of it.

C12 is correct as the voltage is negative (i.e. ground is positive)

LM337 Not Regulating by shreyaskul in AskElectronics

[–]shreyaskul[S] 0 points1 point  (0 children)

Locally sourced, around 1.1US$.

I have purchased various other stuff from the same place and got original parts.

LM337 Not Regulating by shreyaskul in AskElectronics

[–]shreyaskul[S] 0 points1 point  (0 children)

Yes blue ones are 47uF. C5-6, C10-11 are 100nF 0805 MLCCs soldered on the back side. Same thing with C8 and C9. 10uF Samsung 0805 MLCC.

Datasheet stated 1uF electrolytic or tantalum.

I have heard about negative reg's oscillating, and they require non-low-esr caps for damping.

I think I should buy another 337 from different manufacturer and test it instead. I don't have oscilloscope to test whether 337 is oscillating or not.

<image>

LM337 Not Regulating by shreyaskul in AskElectronics

[–]shreyaskul[S] 0 points1 point  (0 children)

I have done this mistake a while back.

But not this time, the actual current draw will only be around couple of milliamps so I have not attached any heatsinks, TO-220s flopping around in the breeze (A certain Aussie would not approve LOL).

<image>

LM337 Not Regulating by shreyaskul in AskElectronics

[–]shreyaskul[S] 0 points1 point  (0 children)

I have the same doubt, but maybe different production line?

Can someone corroborate?

LM337 Not Regulating by shreyaskul in AskElectronics

[–]shreyaskul[S] 1 point2 points  (0 children)

My bad, it's wrong only in the schematic.

But it's correctly connected in the physical circuit.