AC ripple, PWM behavior, and software logic

Thread Starter

edwardjedmonds

Joined Jul 30, 2019
4
I'm new at electronics and am learning a lot from YouTube and from Scherz's "Practical Electronics for Inventors".

On YouTube, there was a video I watched called "How to Control a Ton of RGB LEDs with Arduino & TLC5940," in which Kevin Darrah talked about PWM switching and that got me thinking about AC ripple and AC ripple tolerance specs in rectifiers.

I have been trying to understand how software and hardware interface and how good software can misbehave if the hardware is malfunctioning due to external factors. If I'm thinking about this correctly, it occurred to me that software could behave in unintended ways if enough AC ripple was introduced into a circuit utilizing PWM switching by affecting duty cycles and thus overall software logic. That got me thinking if it was possible to design a rectifier with adjustable AC ripple and to then have a series of LEDs controlled by software to see if you could introduce "buggy" behavior in the LEDs by adjusting AC ripple (hopefully you could do this before you fry the microcontroller?). It would also be interesting, I don't know if this is possible, to use software to detect AC ripple to try and detect the buggy behavior and either shut the entire circuit down or try to correct for it. I'm still not quite sure if I'm thinking about this correctly, but is it possible to demonstrate an effect like this?

Best wishes,
Edward

 

Wolframore

Joined Jan 21, 2019
2,619
As for applying something like this to Arduino. There’s a brown out detector that would reset or shut down the chip if the ripples were bad enough. I’m not sure what you’re trying to achieve some sort of random behaviors based on bad power? You can program interesting patterns without power faults.

Maybe you’re trying to monitor and control your power supply? I’m still a bit unclear on what you’re trying to achieve.
 

Thread Starter

edwardjedmonds

Joined Jul 30, 2019
4
Hi Wolframore, yeah basically that is the idea, however, the intent is not to generate random behaviors for the sake of them, but to learn more about how AC ripple/tolerances affect circuit behavior and whether or not you can detect it with clever software logic instead of outright shutting things down with inbuilt circuitry. Perhaps I could have some type of detection circuit monitoring frequency, current, and voltage. Maybe something like an LTC2945 and something similar in concept to a silicon odometer (https://ieeexplore.ieee.org/document/4476494); something to measure frequency.

So for example, you have 10 inline LEDs that are programmed to blink one after the other according to set intervals, but then I would want to make sure and track the integrity of the blinking lights making sure they are blinking as they are programmed to, then I would want to increase AC ripple and watch the lights for random behavior, when the monitoring software detects the lights aren't blinking properly, report out the data for each LED. Basically something similar in concept to error correction codes.

The second part would then be to take that data and see if I can correct the behavior of the lights by detecting which light lost its integrity and then correct it by passing the signal through a filter.

Perhaps there is no point, and it is very likely that I'm misunderstanding something, but the seed idea was to create a sort of adaptive intelligent circuit to do some exploring and learning. Hard to balance ignorance with eagerness sometimes :)
 

Wolframore

Joined Jan 21, 2019
2,619
I’m trying to figure out an application for it. It sounds like something we would check with oscilloscopes when something isn’t right. If you’re getting bad ripples something is probably not right. In most cases sensitive devices should shut down. In the case of LEDs causing it, it’s likely that the current draw is too much for the circuit or supply. In which case you would beef it up.

Nothing wrong with exploring ideas. Sometimes great things come of it. Other times it’s a thought exercise but keep thinking that’s the important part. We all learn as we go.

I had a discussion with a friend of mine from bulgaria who’s studying electronics. He’s pretty amazing at PIC programming, RF and other interesting circuitry. I was trying to create power monitors with a microcontroller at the time. He believes that analog circuitry is better for this. I haven’t given up with digital controls but there’s something to be said about a circuit that just works. it’s difficult to monitor current and ampacity.
 
Top