I was never good at voltage to resistor dividers. I need help.

Hello i have a 48v Power supply I'm trying to monitor the voltage to see if it goes below 47v or Spikes above 49v. I was never good at resistors and figuring out the color bands and what i need to do the right voltage to bring it down to 1.8v. I'm using a arduino pro mini at 3.3v. It is what i have at the moment. Can someone please help me.

Look at it this way.

1mA through 1K is 1V

1mA through 1.8K is 1.8V

47K and 1.8K at 1mA would be 48.8V.

Half both resistor values, the current will double, but the voltage will stay the same.
Double both resistor values, the current will half, but the voltage will stay the same.

Here’s the rub with this method.

47V/48.8K = 1.73V
49V/48.8K = 1.80V

What used to be a 2 volt difference is not a measly 70mV difference.

How wide are the spikes you are looking to detect? Are they wide enough, long enough to be sampled and read by the Arduino? (the Arduino ADC is not really fast)

You may be better off looking into an add-on with a comparator (LM393 or similar), then use a digital input. You would not get the actual value of the spike, but rather that the spike had occurred. Doubling up (one for <47 and one for >49) would be cheap as there are two in one 8 pin DIP, then you could tell whether a low spike or high spike occurred.

hello adwsystems thank you very much. There is no power spike now. What happen is the old power supply Die on me i send it back and still under warranty and they told me some kinda power spike or something make it went over voltage on the output. So i just would like to measure if it goes below 47v or up to 50v DC. and if so use a relay to shut off the Power supply. That is right now my project.

I would use a 51K and 1K voltage divider, and the 1.1V internal reference of the Arduino for the ADC.

Then it would be easy to tell the difference between 47, 48 and 49V. The ADC outputs would be approximately 925, 945 and 965 respectively.

Looks like i need to order some resistors, I don't have anything about a 20k up to 100k. Mostly just 1k up to 10k.

I doubt if a relay is going to be fast enough to turn the power supply off in time. Also, I doubt shutting off the power supply is going to make a difference. The spike will still enter the output and cause the damage.

And, I even question their assessment that a spike caused the problem. Unless it was a hell of a spike! So, maybe some kind of protection on the output of the supply. But, it seems to me, they should be providing this protection as part of the design of the power supply.

I don't know a lot about this sort of thing, so if anyone else is monitoring this, and is more knowledgeable? Anyone?

I provided my original post based on the original description.

Based on the updated information, my question would be to try to determine the cause of the voltage spike. Is it the input power for the load causing the spike, or a combination? If it is actually a spike, I don't think the arduino sample rate would capture it. You will need something more continuous than a slowly sampled ADC signal.

I'm waiting for the respond back from the company on what happen to the power supply and why it spiked failed or what happen to it.

Mean while i did what adwsystems said to do. I don't have a 47k or a 48.8k resistor not even a 50k resistor. i do have a bunch of 10k resistors I have put in Series i also have a 1.8k resistor So i have tried 5 of the 10k Resistors and a 1.8k resistor and that bring it down to 1.664v Would should be okay. Sense the arduini pro mini is 3.3v pins.

adwsystems:
Look at it this way.

1mA through 1K is 1V

1mA through 1.8K is 1.8V

47K and 1.8K at 1mA would be 48.8V.

Here’s the rub with this method.

47V/48.8K = 1.73V
49V/48.8K = 1.80V

What used to be a 2 volt difference is not a measly 70mV difference.

Something is amiss, here. Where did 48.8k come from? Did you mean 47k? If so, I get these values [for a 47k + 1.8k voltage divider]:
47V: 1.73V
49V: 1.81V
But, ADWSYSTEMS is correct. The voltage delta is very slight: 77mV
When I did this, I use precision zeners, like the BZT585BnnT series – but, I believe these only come in SMD packages.

The Zener takes the place of the upper resistor. That way, the voltages differences at the measurement point are as dynamic as they are at the top.

Also, I’m going to throw this at you, and leave [gotta get some sleep], but tomorrow I’ll try to get back and explain this rather esoteric circuit [using a Norton current differencing Op-Amp]:

MeasureHighVoltWithArduino01.png

Meanwhile, you can read about it here [but it’s pretty advanced stuff]: http://www.ti.com/lit/an/snoa653/snoa653.pdf

ReverseEMF:
Something is amiss, here. Where did 48.8k come from? Did you mean 47k? If so, I get these values [for a 47k + 1.8k voltage divider]:
47V: 1.73V
49V: 1.81V
But, ADWSYSTEMS is correct. The voltage delta is very slight: 77mV
When I did this, I use precision zeners, like the BZT585BnnT series – but, I believe these only come in SMD packages.

The Zener takes the place of the upper resistor. That way, the voltages differences at the measurement point are as dynamic as they are at the top.

Also, I’m going to throw this at you, and leave [gotta get some sleep], but tomorrow I’ll try to get back and explain this rather esoteric circuit [using a Norton current differencing Op-Amp]:

MeasureHighVoltWithArduino01.png

Meanwhile, you can read about it here [but it’s pretty advanced stuff]: http://www.ti.com/lit/an/snoa653/snoa653.pdf

The problem with using the zener diode, is the voltage drop is not very precise, the one 47V zener I looked up ranges between 44 and 50V (ie., +/- 3V of rated value). It is workable as long as you characterize (measure) the zener diode you are using.

You want to drop about 33V with the zener, then use a divider to take the 15V (48-33) down to 3V range, which would be a 22k/5k6 perhaps (divide by 4.93). The divider top resistor protects against over voltage by limiting current through the zener, and a modest divide by 5 takes than +/-1 V variation down to +/-200mV which gives a more reasonable resolution.

And yes you'd have to calibrate the zener in use as the zener voltage depends on the current and varies between devices somewhat.

Then the conversion is something like:

 voltage = 4.92 * 3.3 * analogRead() / 1024 + 33.0 ;

adwsystems: The problem with using the zener diode, is the voltage drop is not very precise, the one 47V zener I looked up ranges between 44 and 50V (ie., +/- 3V of rated value). It is workable as long as you characterize (measure) the zener diode you are using.

No, I said "Precision Zener". Look up the BZT585BnnT series. But, seriously. the OPs requirements are not for precision, but for detection of a "spike". So, it's really more of a "Comparator" task.

OK, I’m back–with my explanation of this circuit, and another track.

MeasureHighVoltWithArduino02.png

The “OP-AMP” of common experience, such as the LM741 or LM324, are Voltage differencing Op-Amps. The above is a Current differencing Op-Amp [also know as: current feedback operational amplifier].

It works by comparing the currents flowing into the two inputs. If the current flowing into the NonInverting input, is greater than the current flowing into the Inverting input, the output rises towards the positive rail (a fancy word for the positive supply voltage less whatever drop occurs in the op-amp’s output transistors). And, if the current flowing into the NonInverting input, is less than the current flowing into the Inverting input, the output seeks the negative rail.

Each input is, actually, a Base-Emitter junction on Bipolar transistor. As such, the input voltage is what would be expected across a forward biased Base-Emitter junction: from the TI App Note: one VBE ≈ 0.5 VDC.

When “High Voltage In” [HVI] is at 50V, there’s around:
50-0.5 = [b]49.5V[/b]
across the 1M resistor, which limits the current to 49.5µA.
When the two inputs [inverting and noninverting] are at the same current [less whatever offsets exist], the output stops seeking one or the other of the rails. So, the output will seek until 49.5µA is flowing into the noninverting input. which is an output voltage of:

49.5µA * 91k = [b]4.50V[/b]

If the HVI drops to 47V, the voltage issued to the Arduino will be 4.23V

Technical note: The LM3900 datasheet says the output can go as high as
** **V[sub]CC [/sub]- V[sub]BE[/sub]** **
– which means the max output voltage will be around VCC - 0.5 or 4.5V – which is why I changed that feedback resistor to 91k [from 100k], because with the 100k resistor, the output at 50V is 4.95V and even at 47V it’s 46.5V – in both those cases, we can expect the output to be more like 4.5V, because the LM3900 won’t be able to go any higher! {oops!}

But, notice how lowering the value of that resistor, changed the output voltage range [good save, huh!]. Using the following formula, you can set that range to whatever you like [within the bounds of the LM3900’s ability to produce]:

V[sub]out[/sub] = (V[sub]HVI[/sub] - V[sub]BE[/sub]) * R2 / R1

Here’s how to do it as a comparator [or Spike Detector, perhaps(?)]:

CompareHighVoltWithArduino01.png

With this arrangement, if the voltage goes higher than around 50V, the output of U1 will go HIGH, else the output will remain LOW.

Changing R2 changes the threshold voltage, as follows:

** **R2** **
= (VCC-VBE) * R1 / (Vthresh - VBE)

Wow, haven't seen a Norton opamp used for donkey's years! Not sure that's going to be stable enough to drive a digital input though: adding a little positive current feedback might be sensible, perhaps add another 1M between pins 1 and 5 of the opamp?

LM3900 Vcc max is 36 volts abs max, 32v recommended (+/-16v dual supply)

I don't see were the datasheet lists the maximum voltage that may be applied to the IN+/- pins. I see 20mA max in, and 29.5V max out.

adwsystems: LM3900 Vcc max is 36 volts abs max, 32v recommended (+/-16v dual supply)

I don't see were the datasheet lists the maximum voltage that may be applied to the IN+/- pins. I see 20mA max in, and 29.5V max out.

That's the beauty of a Norton Amp. The voltage on the other end of that input resistor can be Higher than the LM3900 max voltage -- 'cuz it's all about current. The voltage at the noninverting input will not go much higher than 0.5V, because, after all, it's a BE junction. As long as one doesn't exceed the max input current, no problem how high the voltage goes on the other end of that resistor [as long as things like flash over and such are dealt with].