Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Electrical Issue - If the Vpp adjustment trimmer looses contact, the Boost Converter goes into a run-away and shorts the supply rails. #10

Open
Kuba0040 opened this issue Nov 25, 2024 · 3 comments

Comments

@Kuba0040
Copy link

Hello, Mr. Andreas

I apologize for how long this message is, however I couldn’t find any contact information to send You an email about this with my detailed suggestions on how to fix all these issues.

I have purchased the rom burner from Your store, and it is great, thank you so much for making it! In the process of testing it however, I accidentally used too much force while adjusting the Vpp trimmer, causing it to bend out of shape. This caused the trimmer’s wiper to lose contact with the resistive trace which sent the boost converter into a run-away (trying to boost the voltage to infinity). The coil got very hot, and the circuit shorted out the Arduino’s power rails. This is caused by the Boost Converter loosing all feedback when the trimmer fails.

I have reviewed your schematics and would like to suggest this improved design (Please consult file New Design.png).
New Design

As You can see, it uses no extra components, however, just re-arranges them. The trimmer is still being used as an adjustable resistor within the voltage divider, however now it is the top resistor and the potentiometer’s full resistive track is connected. In function, this works the same way as Your design.
When the trimmer’s is turned to one side and it’s resistance is 0Ω and the output voltage is minimum (I forgot to add a second resistor in the schematic, in series above the potentiometer, like You have done in Your design to set what that minimum voltage is, without it the minimum voltage would be whatever the Boost Converter’s reference voltage is, I apologize for the mistake before scanning), when the trimmer is fully tuned the other way, and it’s resistance is at maximum, the output voltage also is at it’s maximum value.
However critically, if the trimmer’s wiper were to lose contact, the output voltage would be safely boosted to the maximum value we design, the same as if the trimmer were set to the maximum position. In general, I’d also highly encourage you to substitute the miniature trimmer for a higher quality, and bigger one to make it more reliable. Right now, if the trimmer were to fail completely, it would be quite difficult to fix the programmer, especially for people with beginner soldering skills. It would be more expensive, but vastly better.

-- End of Relevant Issue as mentioned in post title, the following is an design suggestion on how to control Vpp automatically, with the Arduino --

Another question I’d like to ask is weather having the Vpp trimmer was a conscious design choice or rather a limitation, not being able to adjust Vpp automatically with the Arduino. If so, I’d also like to offer a potential solution (Please consult file Automatic.png):
Automatic

The circuit below uses an Operational Amplifier to compare the boosted Vpp to a set-point dictated by the Arduino. The Arduino is of course a digital device and thus cannot create arbitrary voltages at its pins. We can cheat however and use PWM. In this circuit, the arduino’s PWM signal is heavily filtered to create a mostly smooth, although a little bumpy DC voltage, proportional to the PWM duty cycle. The higher the duty, the higher the filtered voltage. Just how bumpy the filtered voltage is is a design choice, with more filtering the Vpp rail will be more stable, however changing its voltage will take more time.

The two feedback resistors Rf1 and Rf2 simply divide down the boosted Vpp to the 0-5V range of the Arduino’s filtered signal.

I would also like to say that this solution may not work with all boost converter ICs, depending on how their feedback circuitry is designed, however I don’t think it would cause problems with the one You’re using. In terms of the Op-Amp itself, while I can’t speak for all manufacturers – single, tiny SMD op-amps can be bought very cheaply from makers like Nisshinbo and Toshiba. Just be careful in your choice that the Op-Amp can work with its output and inputs close to the negative rail (0V). Some op-amps may not be able to do so or deceptively appear like they can't, but in fact can work like that. A good example is the NJM2904. By simply installing a resistor going to ground from its output, we’re forcing it to always supply current, never sink it – and thus allowing it to lower its output all the way down to 0V. Although, depending on how high the reference voltage on your boost converter is, this may not be necessary. Without this trick, the minimum voltage the NJM2904 can sink its output to is 1.2V. I suspect other op-amps may be similar. So, it’s best to test Your chip of choice before using it, semiconductor manufacturers often don’t show this information in their datasheets. I don’t know why.

In any case, I would highly encourage you to think about my suggestions as described here so that we may make the Universal Rom Burner even better.

Best Regards,
Kuba.

@AndersBNielsen
Copy link
Owner

Hi Kuba
Thank you so much for taking the time to review the issue and bring up two possible solutions. Just today I decided to intentionally overturn the pot, to verify this issue, so you're right on time! It does indeed tend to fail open and cause the regulator to runaway - at least I think it usually turns off the regulator because it resets the MCU by bringing down the 5V rail in the process.

I'm not sure what I was thinking when I didn't connect the the third terminal - I guess I simply didn't consider the wiper "lifting" as a failure mode, but even that doesn't make much sense.

Either way - you're absolutely right. That'll be fixed in the net minor revision.

I like your second suggestion too because it keeps with the spirit of keeping the cost down. Just today we were also chatting on Discord (please join! https://discord.gg/AVHsHKCN ) and looking up i2c potentiometers, but even the cheapest would bring up the BOM cost a bit.

An opamp can be cheap enough that it doesn't matter cost-wise. However, I'd like to keep compatibility with my 6502 based 65uino - and that doesn't have PWM outputs.
Instead of relying on PWM outputs I've thought about using a fourth register as a cheap r2r DAC, since it doesn't need extra BOM items - but it might still need the opamp. I'll have to think more about that.

Thanks again for the detailed review!

@henols
Copy link

henols commented Nov 26, 2024

@Kuba0040 Awesome write up, helped me to understand the things that are over my head!
I totally love the idea of using an OPamp and a PWM signal.
I do support @AndersBNielsen idea about not to break compatibility with 65duino, RURP is kind of sprung out of that project.
And on the other side RURP suddenly turned out to be a product instead of a tinkers tool.
Let try to figure something out to still be compatible with both ways of using RURP.

@Kuba0040
Copy link
Author

Hello,
Thank You so much for the feedback. I forgot about the 65uino in my design, I do apologize. But that being said, I think the R2R ladder DAC idea is a great one, and it opens up a great possibility to completely get rid of the Op-Amp in the design by using just a little bit of analog magic.

Please, take a look at the design below:
Superposition

I have removed the op-amp, and added a third resistor connecting the R2R DAC to the midpoint of the feedback divider. Such a resistor configuration is called a Super Position, and it may be the best solution to Your problem.

It works as follows:
The normal Rf1 and Rf2 resistor divider still provides feedback to the Boost Converter, however now the DAC resistor ladder through the Rmid resistor, can slightly pull the divider’s voltage down or up. When it does so, it fools the Boost Converter into thinking the Vpp voltage is higher or lower than it actually is, and thus allows us to control Vpp.

When the DAC output is at maximum (5V), it raises the feedback voltage, this means that Vpp needs to now be lower to maintain the same reference voltage at the Boost Converter’s FB pin. As a result, Vpp is brought down to its minimum value, which we design.
When the DAC output is at minimum (0V), it pulls the feedback voltage down, this means that Vpp now needs to be higher to reach Vref at the feedback point. As a result, Vpp goes up to the maximum value.

This solution could have also worked with the PWM approach, however I chose not to describe it, as the bumpy nature of the filtered PWM signal could have led to unwanted oscillations and stability issues with the feedback, which would have required frequency compensation. Not to mention, the Super Position network would impose a load on the filter, which would also need to be considered.

The superposition + R2R approach by itself is difficult to design, the impedance of the R2R DAC would have to be calculated to be able to properly design the Super Position Divider to produce our desired Vpp range. I apologize if I have been vague on the calculation side of my ideas, however currently I don’t have much free time to run the math, properly design and test the divider and DAC for Your needs. (It’s exam season in Poland - I’m finishing high school).

I still think however that this would be the perfect solution for Your needs, it’s cheap and very clever - fits the spirit of the Universal Rom Burner perfectly! Due to my situation however, I just don’t feel comfortable making promises to design this circuit in a timely matter.

If You’re interested in potentially incorporating this circuit into Your design, I’d highly recommend You look around for other analog engineers on Your discord server and show them my ideas. They will probably have even better ideas than me and could improve them and point out issues I didn’t even foresee here.

Thank You for considering my previous ideas, I hope this one will be of use as well.
Best of luck,
Kuba.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants