Components needed for 120V DC to 5V buck converter?

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. :slight_smile: Thanks a bunch! :slight_smile:

-Andrew

Look for an opto coupler 100s out there.

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?

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 [u]voltage divider[/u] (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 [u]protection diode[/u]. (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 :slight_smile:

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 :slight_smile: :slight_smile:

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.

Paul

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.

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.

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.

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! :slight_smile: :slight_smile:

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.

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.

Morgan, thanks for the explaining the schmitt trigger in the detail you went into-- that made a lot more sense to me, and I understand it better than the videos I had watched. I guess mainly because tying one into an Arduino brings the complications you mentioned. When you mentioned the schmitt trigger in post #9 of this thread, I thought you were suggesting I look at circuits including a schmitt trigger to accomplish what I needed.

I spent a good several hours yesterday and today researching a little on how our ignition works on this particular engine (GM LS2, but same as the infamous LS1 and the other variants [LS3, LS6, LS7]). Apparently it uses a ground pulse to each coil to fire that cylinder (it has a separate, dedicated coil for each of the 8 cylinders, just as an FYI). Short of learning that, threads on other forums about this ignition system seem to dead-end. I read someone mention that the ground will be what gets voltage spikes, which I don't understand, and can't confirm nor deny if that's true from further digging I've tried doing. I did confirm that each coil is pulsed twice per revolution, so that helps.

So I went into digging up how optocouplers/optoisolators work, which user larryd suggested as the very first reply to this thread. At my first glance at that component after reading what larryd posted, it didn't appear that that was what I needed, but after re-visiting it and learning more about them, from what I can tell, that seems like exactly what I need for this project, but the ground pulse of the ignition system getting + voltage spikes is what confuses me as to how it would work, again, if the ground pulse does in fact see voltage spikes.

Obviously if it was just a ground pulse with no voltage spikes, I assume I could hook the "input" side of the optocoupler to constant (when ignition is on), positive voltage, then hook the ground side to the pulse wire going to one of the ignition coils... I just don't know if the LED and/or light sensor can display/read at the speed of 233 times per second, if the engine were at 7,000 RPM, pulsing the coil twice per revolution. Am I even at all on the right track here with the optocoupler theory?? If so, will it support that type of frequency??

I've search various keywords, such as "rpm coil arduino", "engine rpm arduino", "engine rpm optocoupler", "engine rpm optoisolator", multiple variants of those keywords, and a bunch of other keywords. What I see is ways to do it using a capacitive pickup, or an inductive pickup. I've seen people asking how to read from the ground pulse going to an ignition coil, even here on this forum, but pretty much all of the threads end without a solution. Being that I'm not really sure what direction I need to go, I'm also having trouble finding anything about PCB layouts for the components I need. If I know I'm looking for using an optocoupler then perhaps I can narrow my search terms down some, but so far I have not seen any particular way to lay out the circuit to prevent voltage from jumping around.... all I have found is people placing the optocoupler in random places on their solderless breadboards. :frowning:

If I'm wrong about using an optocoupler then I'm really at a loss here after all of the reading and videos I've been going through. Lol at that point it would have to be time for me to throw in the towel, because I'm not electronically-savvy enough to find what I need for this unfortunately.

detown:
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.

Thanks detown. My buddy is not often available because he is overseas right now with limited access to Internet. I asked, but it could be several more days before I get a response. He also had someone piece together some of the stuff for him while he was deployed last year, so there's a chance he may not be able to tell me the specifics due to not knowing.

Yes Sir, it is a fuel injected engine, and it does have a 5v square wave signal that feeds that tachometer. It pulses 4 times for every two rotations, so "pulses/2" should get me around where I need to be I think, if I were to go that route. The only reason I don't want to go that route is because I want to build one of these for a friend as well, and has pretty much the same engine, just an older variant of it, with a PCM that does not appear to have a tach output signal. So I'd like to replicate our installation methods of what I am building, so if he were to have an issue with the way he is reading RPM, I could troubleshoot it with my car instead of doing it with his. Otherwise, I'd be all over using the tach output, for sure :slight_smile:

If you are going to use the crank shaft sensor, you need to determine if it is a hall effect type or variable reluctance type. If it is a hall effect type it will usually have 3 wires going to it, and already be using 5V, so you can route this through a schmitt trigger and into the arduino.

If it is a variable reluctance sensor, it will have 2 wires, one is probably grounded. This will produce an AC voltage as the teeth spin past the sensor. You will need to chop the sine wave down so that it is in the range of 0-5V. I am working on a very similar project and so have been researching all this.

My motorcycle engine has a VR sensor, and here is the circuit I have been working on to bring the sine wave into the 0-5V range.

The 1N4007 diode should be changed to a fast switching diode like a 1N4148. I only used that as I had one available and will be changing it to a fast switching one. If you then put the output of this circuit into a schmitt trigger, you will get a clean square wave that you can feed into an arduino interrupt pin.

Just be careful, I broke the tachometer on my motorcycle while investigating the square wave produced by the ECU. I am now trying to read the VR crankshaft sensor and create a square wave to send to the tachometer in order for it to display the rpm again.

Hi Rickerman, thanks so much for sharing that info! Sounds like a cool little project, even though there's the bummer about the tach getting broken....... but at least it sounds like you'll be able to run it off the Arduino without too much effort.

I'll definitely keep all that in mind if I decide to try the crank position sensor approach! I'll probably stick with trying to read the pulses to one of the coil signal wires for now, and might tap into the 5v square wave tach output signal from the PCM later once I get the coil signal thing sorted it. Definitely appreciate the valuable info and like I said, I'll absolutely keep it in mind if my plans change.... which they seem to do every few days, anyway. Haha :slight_smile: