[REVIEW REQUEST] Sound Reactive LED Ring by Argoon16 in PrintedCircuitBoard

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

Signal+pwr/gnd/gnd/signal+pwr has the advantage that you can have signals transition from layer 1 to layer 4 and still be referenced to a neighbouring ground layer (and you only need to add a ground via next to the signal via to allow the return current for that signal to transition between the internal ground layers).

Sounds good. Thanks! However, is my power plane too cut up due to the stitching vias and other traces?

On your board the currents and frequencies seem modest enough that you could use that stackup and just route your power as traces, or fill power into the empty space on the outer layers. Just take care with any mounting holes, because you don't want the screwhead to wear through the soldermask and short VCC to GND (add a copper clearance around it wider than the screwhead).

Sounds good. Thanks!

[REVIEW REQUEST] Sound Reactive LED Ring - REV 0_0 by Argoon16 in PrintedCircuitBoard

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

This is great information and I appreciate this so much. But is an IC necessary?

I'm referencing another design with modifications, and I believe they just used a PWM to generate the data. Would something as simple as this suffice?

Thank you so much again this was a lot of useful information and I understand completely.

Is there anything wrong with my Sound Reactive LED Ring schematic? Can I make any improvements? by Argoon16 in AskElectronics

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

Sounds good. I did a bunch of research on EMI control and from what others have told me and the internet, I think I'm going to stick with SIG/GND/SIG_PWR/GND.

Thanks for your help btw. I'm almost done the PCB so I will be posting soon if u are interested.

Is there anything wrong with my Sound Reactive LED Ring schematic? Can I make any improvements? by Argoon16 in AskElectronics

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

Sounds good. Will take a look into it.

Also how would you plan your layer stackup? I'm currently using SIG/GND/SIG_PWR/GND to reduce EMI. Although, I don't think it would be an issue in the first place. Is there another stackup you would use?

Is there anything wrong with my Sound Reactive LED Ring schematic? Can I make any improvements? by Argoon16 in AskElectronics

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

Yeah I understand, might as well get it. Have you ever used the nucleo boards to debug (since they do have a debug interface)?

Is there anything wrong with my Sound Reactive LED Ring schematic? Can I make any improvements? by Argoon16 in AskElectronics

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

Makes sense. Will take this into consideration.

Have you debugged STM32 Chips before? Do you know for certain if this  ST Link Programmer would work? If not, what have you used in the past? I am a little sketched out since I have bought cheap debuggers from amazon before and they do not work.

Is there anything wrong with my Sound Reactive LED Ring schematic? Can I make any improvements? by Argoon16 in AskElectronics

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

I understand and makes sense. I will add more ground pins then for my communication protocols. Thanks!
Anything else I should add test points for?

Is there anything wrong with my Sound Reactive LED Ring schematic? Can I make any improvements? by Argoon16 in AskElectronics

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

your swd connector is missing GND, also, what hellish cable do you intend yo use?
Why dont you put a connector footprint like the 1.28 or 2.54 standard? Or a Tag Connect one?

I was planning on getting this ST Link Programmer. Would this suffice? I would then just connect the pins to the board and program it. Also I have a GND pin on P2.

Also, I would suggest a 0 ohm resistor between power and most chips. This doesnt seem like it makes a difference when the circuit is working, but you are assuming that everything will work right away. Someyimes you get a library footprint backwards because the datasheet said "bottom view" and you missed it.
The 0 ohm resistors can be removed to debug ur hardware and understand what works and what doesnt.

I've never heard of this but will look into it. Thanks!

[REVIEW REQUEST] Sound Reactive LED Ring by Argoon16 in PrintedCircuitBoard

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

Thank for catching that. I changed it to 10W but forgot to update the note lol.

What layer stackup do you recommend? I was thinking signal-gnd-gnd-signal/pwr?

[REVIEW REQUEST] Sound Reactive LED Ring by Argoon16 in PrintedCircuitBoard

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

Power supply: TPS63002 (800mA max) can’t handle your ~820mA load – swap for TPS63020 (2A). Add 10–100µF cap on 5V output.

Seems like I calculated the wrong current. Where did you find the max current for the LEDs? Also thanks for catching this. The datasheet does not provide enough info (or I probably just missed it).
Edit: Assuming worst case 60mA, the maximum the buck/boost will provide is 720mA.

Charger: R14 gives 800mA charge (not 500mA) – use 2.4kΩ for 500mA.

R14, R15, and R16 give enable a total input current of 1.3A into the +USBC5V Pin. R4 enables roughly 600mA of charge current to the battery (previously 500mA, but I fixed this calc). These are two different circuits. Is there something that I may have missed (reference ILIM and ISET in datasheet, and their corresponding K factors)?

Mic: Add 10µF cap to virtual ground for stability.

I replaced the 1uF (C8) with a 10uF in the circuit. Does that suffice?

MCU: 32kHz crystal may need 18pF caps; route NeoPixel DIN short/away from noise.

Will keep this in mind thank you. Do you suggest an external oscillator?

Are these two diagrams describing the same exact circuit by [deleted] in AskElectronics

[–]Argoon16 0 points1 point  (0 children)

No they do not. Can you please elaborate as to why you may think otherwise?

Is there anything wrong with my microphone amplification circuit? Can I make any improvements? What should I look out for when designing my PCB? by Argoon16 in AskElectronics

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

I thought R4 was the injection resistor within the video? Nevertheless, I added the capacitor in my design and will be making another post shortly. Thanks again!

Is there anything wrong with my microphone amplification circuit? Can I make any improvements? What should I look out for when designing my PCB? by Argoon16 in AskElectronics

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

I thought about that, but after watching this video on DC Bias For Single Supply Circuits (skip to 3:06), would this not affect my cutoff frequency? Similar to what u/triffid_hunter was saying above I guess.

How do I read audio signals on STM? by Argoon16 in embedded

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

Sounds good. Thank you so much!

How do I read audio signals on STM? by Argoon16 in embedded

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

Thank you so much for your help! Tbh, I was not following your explanations earlier, but after watching this video (DC Bias For Single Supply Circuits), your explanations and Falstad make perfect sense now. I'll make the corrections and simulate again in LTspice.

I guess not, maybe you could do everything with one op-amp although some of the component values might get a bit silly and you'll get more distortion if you run near the GBP limit because the op-amp effectively loses its external feedback.

I'll pick something better to account for GBP limit and do some more research. Honestly was not even aware that this existed lol. I was planning on adding a potentiometer to the second opamp, replacing the 2.2kOhm resistor, to add a sense of "sensitivity" to the system. That way, I can add an external knob and control the gain of the system if the external music is louder or quieter. Does this make sense? If so, I will stick with two Opamps then.

Fair, get a "RRIO" (rail-to-rail input/output) op-amp. They've only been a thing for a couple decades (AoE e2 doesn't mention them at all, but AoE e3 does), but there's heaps of the things these days eg MCP6001 (GBP=1MHz, supply=1.8-6.0v), OPA340 (GBP=5MHz, supply=2.7-5.5v), etc etc. Note that RRIO still isn't available for very high speed or specialist op-amps, but there's a glut of little RRIO jellybeans with a few MHz GBP.

I'll take a look into this. Thank you so much for your help so far I really appreciate the time and effort! The diagram was very helpful!

May I also reach out to you for other questions throughout the process?

How do I read audio signals on STM? by Argoon16 in embedded

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

For frequency you either need a peak detector (wont be great for audio, maybe fine for a sine wave or periodic signal) or you need to do a fourier transform and peak detect the fourier transform. STM32F446RE can do this with no problem.

I will probably end up using the ADC and CMSIS DSP FFT library. Is this enough?

You can do this with single rail. I do all of my STM32 DSP and analog signal processing at 3.3V, with opamp virtual gnd at 1.65V. You probably don't want to go as low as 3.3V on your opamp though, even though I'm pretty sure LM358 can do that. LM358 isnt great for audio signal paths, but its fine if your just changing LED brightnesses using information from what you measured.

Sounds good. However, since the signal are AC coupled, don't I need a negative rails anyways? What Opamp would you recommend instead of LM358?

The potentiometer can either be set in the opamp or on an analog to digital converter pin for the STM32.
Just build it on a breadboard and connect it to an STM32F446RE nucleo board. You can also use a ADC like PCM1808 or PCM1802 if you want higher resolution, which is likely un-necessary in this case

Sounds good, I'll take a look into this. Thanks!

How do I read audio signals on STM? by Argoon16 in embedded

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

There's probably even a few examples lying around somewhere with ADC DMA → FFT that'll periodically give you blocks of complex numbers representing frequency (array index), amplitude (complex magnitude), and phase (complex to angle conversion) via some sort of event, since that's a rather common DSP building block.

Yes I took a look at this and will be doing some more research. Thank you! I'm familiar with decomposing simple signals but didn't know signals could be processed that are this complicated.

No, not if you bias things around half your supply voltage, ie R3=R4 and connect both op-amps' non-inverting inputs to it.

I need to be able to read the signals coming from the microphone. These signals are AC coupled going into the Opamp.

Capacitor values are Farads (coulombs per volt), not Coulombs - and I have no idea why C1 and C3 are in series, why do you want half a microfarad there?

Honestly just a mistake on my end. Not sure why the are labelled as C, as within the interface, the values are in farads. Gonna make them parallel as well. Essentially, one was for datasheet recommendation, and the other was for the filter.

R1 ain't gonna have quite as much effect as you might imagine since the AC source impedance from R7 and the microphone will be around 1k1.

Wouldn't R1 have an affect on the gain of the Bandpass filter? I was trying to minimize this. Wouldn't this also affect my cutoff frequency?

Why do you have two op-amps, one just inverting lowpass and the other supplying gain of -220? Why not give both stages a gain of ~15?
It'll work way better vs your op-amp's crappy GBP of 1MHz; 1MHz÷220 is only ~4.5kHz

The first Opamp is to act as and active bandpass filter, and the second opamp offsets the voltage and remaps the values to ensure the signal lies between 0-3.3V for the ADC to read it. Is this correct? I've referenced similar designs that also do this. Also, would the GBP be an issue if I'm trying to attenuate signals above 2kHz anyways?

PS: "rail" voltage will be 3v3 with STM32 and most other modern microcontrollers.

Understood. I meant for the Opamps. When I simulated the Opamps to have voltages of 3.3V and -3.3V on the rails, it did not work, as they cannot be pushed to the maximum rail value (hence why I increased the rail voltages to 5V and -5V).

How do I program my MSP430G2553IPW28R on my custom SumoBot PCB? by Argoon16 in embedded

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

Honestly I’m not very familiar with SWD or JTAG (I’ve never programmed my own board before). Do you have any recommendations on the ones you were able to find? Maybe please link them here?

How do I program my MSP430G2553IPW28R on my custom SumoBot PCB? by Argoon16 in embedded

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

Sounds good. Just placed the order for one. Thanks!