Go Down

Topic: Components needed for 120V DC to 5V buck converter? (Read 873 times) previous topic - next topic


Jan 10, 2018, 05:17 am Last Edit: Jan 10, 2018, 05:24 am by AGrayson84
Hi everyone, I was hoping someone would be so kind as to not mind listing for me the bare minimum components I would need to regulate upwards of 120V DC down to 5V (or less). I will be using this on a digital pin on my Arduino and counting the pulses from the signal, but the signal can spike up to around 120 volts.

I am looking to use components made for pass-thru boards so I can use a section of a soldered protoboard I have to combine the buck converter along with everything else I'll be using onto just one board, rather than having separate buck converter board to tie into my protoboard.

If someone is willing to list the exact components I need and provide a simple schematic of how I need to lay out the circuit I'd hugely appreciate it! I can't seem to find anything anywhere else online that explains what components you need as a bare minimum, to build your own that can regulate a specific voltage (ie: 120). By the way, I won't need an indicator LED or anything extra like that for this. I hate to ask for assistance on this with having very minimal on buck converters,  but I'm running low on time for a personal project I want to complete in the coming days and sadly won't have the time to scour the Internet and learn how to build this that way. :) Thanks a bunch! :)



No technical PMs.
The last thing you did is where you should start looking.


What voltage range do you consider the pulse to be "off"? -50V to +10V for example.

What voltage range do you consider "on"? +50V to +130V for example.

How fast are the pulses? Hertz or kiloHertz? What is the duty cycle or pulse duration? Anything you can say about the rise or fall time?
"The problem is in the code you didn't post."


Your question makes not much sense.
A buck converter converts a DC voltage down to a lower one, but the output is DC, not a pulsed voltage.
Are you sure you mean a buck converter or something like a resistive divider.


You say your pulses can 'spike' to 120 volts.
What's a 'normal' pulse like ?

If your pulses are nominally say 12 volts with transient spikes on them, then use a simple clamping circuit (zener ?) to ensure pulses are clamped to a specific level, then use a simple resistive voltage divider to limit the clamped pulse height to suit your arduino input.


A signal is easier to deal with than power (we don't need a voltage regulator) but we do need to know more about the nature of the signal.

A voltage divider (2 resistors) can be used to knock-down the voltage.     ...If the pulse was always 120V, we'd just make a 5/120 voltage divider, and we'd be done!     But, since the pulse won't always go that high, we can't divide-down that much and a voltage divider alone isn't enough.

Since the voltage out of the voltage divider will sometimes exceed 5V, we need to add an over-voltage  protection diode.    (The protection circuit needs a current-limiting resistor, but the resistors that make-up the voltage divider will suffice.)


Hi everyone, I want to thank each of you for your responses! What you all posted was very helpful, and also makes me realize that this was not as simple as I assumed it would be, based on the questions being asked. I apologize for being so vague in the first post, as I've only dealt very little with modifying voltages in a few things I've done over the years.

Sadly, I don't have information regarding the majority of your questions, such as rate, duration, rise/fall time.... etc. So please don't misinterpret me not providing that information in this new post as me choosing which questions I do and don't answer :)

To give more information on what I'm looking to do this for, here are some more details...

I have a GM (General Motors) vehicle with a pretty common V8 engine that they produce. I'm looking to take the signal from one of the ignition coils, and use that pulse on a digital input of my Arduino to read the RPM. The ignition coil either pulses twice or four times (I have yet to determine which) per engine revolution. From what I've been told by another person that has experience with the ignition system on these engines is that the circuit coming from the engine's computer harness and going to the coil pack (I'm speaking of voltage before the coil, by the way, versus voltage after the coil) produces this pulse with sometimes up to 120 or so volts. I am no sure what the minimum voltage may be... and I was honestly just ignorantly assuming that there was an easy combination of components that could make sure a voltage ranging from perhaps 1v all the way up to 120v could be capped to produce no more than 5 volts. Again, just an ignorant assumption on my part :) :)

So what I'm ultimately looking to do is read the RPM based on the pulses coming from the circuit going to the coil pack of one cylinder, and then form some conditions (ie: If RPM > 6800) to trigger outputs from the Arduino, while of course preventing the voltage spikes from damaging the Arduino. I'd obviously still need to keep the high spikes and whatever the lower end of the spectrum of the pulsing voltages may be within a range that I can read on a digital pin from the Arduino, in order to accurately read the RPM.

Obviously the rate will vary on the speed of the engine in this type of scenario, and if the coil gets a signal 4 times per rotation, that could be around 466 pulses per second at 7,000 RPM, or as low as around 50 pulses per second when at idle, around 750 RPM. It may only be twice per second though like I said, so I'll need to still determine that.

I have been told by a friend that I need a buck converter for the over-voltage protection, so I definitely apologize if that is not correct.

I hope that helps, and narrows down what I need to do to achieve my goal. Once again, thanks to each of you for the helpful posts and not giving me a hard time for my ignorance on this one haha. Looking forward to reading more posts on this now that I was able to elaborate on this, I appreciate the help greatly!!


Google "multiple spark ignition". I am sure you are facing an impossible situation looking at the coil signal on this vehicle.



Instead of the trying to pick up rpm's from the coil side, why not go to the timing side which is a bit more predictable and in a more digital friendly signal? My truck uses a hall effect crank trigger sensor to determine injector timing. It also happens to be a 5V signal, and while the pulse duration for no1 and no4 are longer than the other 6 cylinders, the rising edge is the same for all.

It's not a hobby if you're not having fun doing it. Step back and breathe


Aha. That is a totally different question.

Detecting RPM from coil pulses is very specific and very common. There must be hundreds of circuits online. Mostly they will use some variant of schmidtt trigger to turn the wild variations into a "clean" digital signal.

Google for some circuits. Look at what you get. Look at the description to see if the designer has some clue what he is designing. If you have any questions after that, return here and give us exact links to what you have seen and what you don't understand.
"The problem is in the code you didn't post."


Thanks again for the responses!

I had actually wondered why reading pulses from the crank position sensor was not suggested by the buddy of mine that told me to tap into the ignition pulse to one of the coil packs. I asked him about that last night but have not received a response on that just yet. He has made a bunch of other Arduino projects for his car, using various factory devices from the engine management system, so I suspect there's a reason he chose to use the ignition pulse to the coil versus the pulse from the crank position sensor, but I'm not sure until I hear back from him.

I have a 28x reluctor wheel on my crankshaft, so I simply need to divide the pulses per second from the CPS by 28, then multiply that 60 to get the true RPM I suppose. I'll let you guys know when I hear back from him in case there's a solid reason to grab it from the wire to the coil.

Thanks for the tip on the Schmitt Trigger. I've never heard of that before and found a bunch of explanations on it, which have been over my head because I'm unfamiliar with the majority of the terms, such as, "In electronics, a Schmitt trigger is a comparator circuit with hysteresis implemented by applying positive feedback to the noninverting input of a comparator or differential amplifier. It is an active circuit which converts an analog input signal to a digital output signal."

So I watched a couple YouTube videos and still don't understand what people are explaining about these things. Maybe I need to try again in a few days when my brain isn't tired and I'm not so exhausted from work. But at least looking at some schematics it doesn't look too complicated at all, component-wise. I just can't seem to determine what component the triangle represents. Is that the operational amplifier, itself?


I tried determining what value resistors I would need, and what value of the other component that the triangle represents, using the formulas provided in the above link. Unfortunately I do not know what "Va" represents. I've never been one to be able to sit down and study formulas and equations on the first couple of tries... so I'm concerned I'll end up burning up my Arduino by not making this Schmitt Trigger properly. Is anyone willing to assist with choosing the proper resistors for R1 and R2, and whatever else I need for this project? Thanks again everyone!


I would not attempt to design the circuit from scratch. Start with good designs that other people have used.

The Schmitt trigger is like a light switch. Think of those big old toggles sticking out of the wall in most older American homes. It takes some push force from your finger to turn the switch on. If you don't quite push hard enough then it doesn't go on. Relaxing the pressure at that point means its still off. But once you've pushed hard enough to switch the switch on, it goes all the way. It never gets stuck "half on" where relaxing the pressure makes the light flicker. Once it's on, then it stays on positively. To get it to go off, you have to totally reverse the pressure and start exerting some downward pressure with your finger.
"The problem is in the code you didn't post."


Thanks for the continued help Morgan. I definitely do not intend on re-designing the wheel here or anything, I'm just looking to place the components needed for this on my own circuit board. I assume the circuit below is what I need to follow, but I just don't understand how to calculate what value resistors, nor what I need for the other component (if that's the operational amplifier...).

I definitely appreciate the analogy... I understand the analogy you mentioned fully, but I'm feeling so puzzled about this simple schmitt trigger that I don't know how to apply the analogy to this project. I also don't understand how I would "reverse" the "pressure", electronically, if I'm only dealing with a variant of pulsed voltages. You can consider me a dummy when it comes to this depth of electronics, lol. I'm not an idiot, but I barely understand most of the terms and concepts of some of this stuff without knowing exactly what components I will have my hands on, and connecting them up to understand them in action. Until then, a lot of this is just garble to me. I really don't want my lack of electronics knowledge to prevent me from getting this together, and I'm really running short on time to get components figured out and ordered, and get this circuit board completed so I can use it in time... so if you or anyone else is willing to walk me through what value resistors I would need and whatnot I'd really greatly appreciate it a whole lot. Every day that passes is putting me closer to not being able to have this circuit board ready to use before I no longer own the car to use this on (I'm listing it for sale in a couple of weeks or so).

I have to apologize again for my ignorance with this stuff, but if someone doesn't mind holding my hand through this I'd be super appreciative! :) :)


OK, yes that's a schmitt trigger circuit but it's totally unsuitable for connecting to a car's ignition system. I suggest you keep looking. You should be able to find complete circuits with PCB layouts published. The layout is just as important as the schematic as you don't want high voltage jumping between nearby tracks on the PCB.

Schmitt trigger:
Think about how to turn a "wild" input voltage into a digital signal. Let's step away from the car ignition and look at how the Arduino digital inputs work. The digital inputs are nominally 5V. You apply 5V to an input and that will digitalRead() as HIGH. Zero volts is LOW. But what if you have a long wire and you don't get exactly 5V? 4.9V certainly isn't LOW but it's not 5V either. The same thing applies on the low side. 0.5V is very close to zero so it should probably be read as  LOW.

The datasheet has a rather complex way of saying that anything over 3.0V will read as HIGH. Anything under 1.5V will read as LOW. OK, that's clear enough. But what happens in the middle? Should 2.9V be HIGH or LOW?

The answer is determined by the schmitt trigger. If the voltage was previously below 1.5V and it's gone up to 2.99V then it's still LOW. If it goes over 3.0V then the schmitt trigger output goes HIGH and stays HIGH even if the voltage drops back to 2.9. It will only switch back to LOW if it goes below 1.5V.
"The problem is in the code you didn't post."


Why don't you ask your "buddy" about the circuit that he used.
I am assuming that this is a fuel injected engine by your mention of a reluctor wheel. If so, you should have a square wave signal from the ECM that feeds the tachometer. It could be 5v or 12v. If it is 5v you are good to go. If it's 12v you will have to use a voltage divider.

Go Up