Measuring DC Current, Voltage, and RPM vs. time

I am looking into Arduino as a solution to measuring voltage and current output from a DC generator. Voltages range from around 0-36V and current ranges from 0-10A.

I am also looking to measure rotational speed of a disc which I am sure I could use some type of senor.

I was hoping to get these three values recorded along with time (voltage, speed and current will be varying).

IF any body has any ideas, let me know! I will be lurking the internet for a solution.

Thanks

you can use wheel encoders to measurw the rotational speed (RPM)
but i doubt the voltages and current thing !
(i guess could be acheived but ont solely based off arduino )
chek online if any one interfaced a multimeter to and arduino
anyways all the best :slight_smile:

Rotation: All sorts of ways like hall effect sensors, opto interrupters, and LED/IR reflecting units with reflective tape on a shaft.
Voltage: Just divide the genny output so the voltage swings between 0 and 5 volts and feed that into an anaolgue input.
Current: Use a high-side hall effect current chip or put a shunt in series and use a high-side shunt amplifier chip.

It should be pretty easy.

I was hoping to get these three values recorded along with time

That might take more effort.

How often are the readings being taken?
For how long will these readings be taken?
Do you need actual time of day or just elapsed time?
Can you upload to a PC?


Rob

Voltage divider for the voltages (http://www.google.co.uk/url?url=http://www.raltron.com/cust/tools/voltage_divider.asp&rct=j&sa=U&ei=lkK4TOTjCIyOjAffuuWpDg&ved=0CB0QFjAA&sig2=9PUMrkxTC3y1LVDf-qeq-Q&q=voltage+divider+calculator&usg=AFQjCNGdvS8sahOobLN3FYXoFbJJcQ_7vg&safe=vss)
You will want to use large resistors, a few 100k or something.

Current, you can buy simple to use current sensors for this. Look up 'current sensor' on your favourite electronics site (look for ICs).
I have some coming that do up to 200A with a nice analog output 0-5V

Depending on how fast the disk is, you could sense this with an IR gate or a hall effect sensor and magnet, I would steer away from reed switches. Stick the input on an interrupt and you should be away.

:slight_smile:

Mowcius

Thanks for the feedback.

I was not looking to plot these with time of day, but time as in when each piece of data recording as been taken from a reference time of 0. IE, initial time = 0 sec, t1 = .5 sec, t2=1 sec.... I hope that makes since.

I am actually a beginner with this stuff.... does anybody have any reference to help guide me thru making this or at least a start?

The timestamp is easy, use the Arduino's millis() function to get the number of milliseconds elapsed (from power up I think). That will be valid for about 49 days, after that you have to keep another counter.

Storing the data? I repeat

How often are the readings being taken?
For how long will these readings be taken?
Do you need actual time of day or just elapsed time?
Can you upload to a PC?

Reading the voltage, see the link Mowcius provided. You just need two resistors.

Reading the current, a bit more complicated, use a chip like the ASC712, AD8210, MAX4080 etc. but there are a gazillion others. The ACS712 is a hall effect sensor, meaning that it detects the current without the need for a shunt but you still have to cut into the wire and insert the sensor. The others are shunt amplifiers, meaning that you have to insert a shunt (very low value resistor) in series with the generator output and hook one of these chip across it. Google those part numbers or enter them into the search at http://www.alldatasheet.com/.

As for the rotating disc

How fast?
Is it a clean environment?
Can you paint it?
Does it already have some holes in it with access on both sides?
Can you glue things to it?
Do you have easy access to it?

Most of this is pretty straightfoward but we need to know exactly what we're dealing with.


Rob

How often are the readings being taken? every .25 - .5 seconds would be ideal

For how long will these readings be taken? a minute run time, max

Do you need actual time of day or just elapsed time? elapsed

Can you upload to a PC? I would prefer this

How fast? 0-1500rpm, varying speed
Is it a clean environment? yes
Can you paint it? sure
Does it already have some holes in it with access on both sides? no, but it is possible, just not preferred

Can you glue things to it? prefer not to

Do you have easy access to it? yes

I basically have a disk that is varying in speed and I would like to record this speed.

At the same time, I have a generator where I would like to measure current and voltage (to get power)... I suppose I could do with just voltage too....

End result....I want a power output vs. speed at different timer intervals.

By the way, thanks for the help everybody.

The current is easy.

Just get something like the 50A version of these: http://www.allegromicro.com/en/Products/Part_Numbers/0758/index.asp

every .25 - .5 seconds would be ideal

Sounds possible

Can you paint it? sure

Paint it in black and white stripes then use an IR sensor to determine when the stripe comes around :slight_smile:

Mowcius

every .25 - .5 seconds would be ideal

For how long will these readings be taken? a minute run time, max

So storage shouldn't be a problem, you can save this much data in local RAM.

Is it a clean environment? yes
Can you paint it? sure

Mowcius covered that. Have a look at the products on this page to get a feel for what's available.

http://au.farnell.com/jsp/search/browse.jsp?N=1002854&Ns=PRICE_PLS_018_PRICE1|0&locale=en_AU&appliedparametrics=true&getResults=true&originalQueryURL=/jsp/search/browse.jsp%3FN%3D1002854%26No%3D0%26getResults%3Dtrue%26appliedparametrics%3Dtrue%26locale%3Den_AU%26catalogId%3D%26prevNValues%3D1002854

How fast? 0-1500rpm, varying speed

Pretty slow then. If the disk is steel you can attach a rare-earth magnet, it will stay there without any glue, and use a hall effect switch. I've used an ATS177 before, built in comparator and schmitt trigger so it has a clean output you can feed straight into a digital pin.

Does it already have some holes in it with access on both sides? no, but it is possible, just not preferred

Can you glue things to it? prefer not to

Doesn't matter the above optical and magnetic options will work.

I think that pretty much covers it for the moment. Do some research to get a feel for some of these components, that will allow you to be more specific in your requirements. You can always ask here if you don't understand any of them.


Rob

I've used an ATS177 before, built in comparator and schmitt trigger so it has a clean output you can feed straight into a digital pin.

I've also been looking at hall effect sensors for one of my projects, not sure what to look for.

I understand I want unipolar and it needs to be 5v but apart from that I am a bit unsure.
Can't find any ATS177s on farnell, any others you know of?

Mowcius

Hi Mowcius,

Here's a link to the data sheet on my site

http://www.robgray.com/grayit/embedded/components/datasheets/ATS177.pdf

Its a Diodes Incorporated product, here's their page

http://www.diodes.com/products/catalog/detail.php?item-id=1817&popup=datasheet

I think I got my last batch from Farnell (only because that's where I buy most stuff) but can't garrantee it. Looking at the above page though they only mention Digikey and Mouser.

From the data sheet

If a magnetic flux density larger than threshold Bop, DO is turned
on (low). The output state is held until a magnetic flux density
reversal falls below Brp causing DO to be turned off (high).

I didn't think twice about this but it appears you need to reverse the flux to turn it off. I don't know much about these things but using a single magnet passing the sensor turned it on but never off (or vice versa). By aligning the magnet in it's edge it worked but that wasn't mechanically stable enough. So I used two magnets, one with - outwards and the other with + outwards and got a nice square wave.

It has a VCC of 3v5 to 20v and an open collector output.


Rob

I think I got my last batch from Farnell (only because that's where I buy most stuff) but can't garrantee it.

Yeah couldn't find it.

I didn't think twice about this but it appears you need to reverse the flux to turn it off. I don't know much about these things but using a single magnet passing the sensor turned it on but never off (or vice versa). By aligning the magnet in it's edge it worked but that wasn't mechanically stable enough. So I used two magnets, one with - outwards and the other with + outwards and got a nice square wave.

Ahh so it's bipolar, I'll have another look some time for some nice unipolar ones. I got some bookmarked which I think will do the trick.

Mowcius

Ahh so it's bipolar

I see, I said I didn't know much about them. That can be a benefit, by using two magnets the shaft being measured stayed balanced (not that it really mattered, it's massive compared to the magnets) and I got a nice 50% square wave.


Rob

Yeah I think unipolar would be better for what I am doing, then I have more time to do other stuff and it's easier to do with interrupts.

I can see where bipolar would be useful.

As for balancing the shaft, I have a few tiny 1mm magnets and I am thinking of drilling a hole in the shaft to embed it in there. Keep the balance true then too.

Mowcius

Old thread here. Hey guys, I am also looking to do DC current sensing, and DC voltage sensing, with an ATmega. If possible, I would much rather use a hall-effect sensor rather than a shunt sensor. Can someone recommend a little more of a step-by-step guide for these parts? I'd like to find a sensor and schematic for both current and voltage sensing.

This will be for current in the 1 - 10 Amp range, and voltage in the 10 - 20 volt DC range.
Thanks!

(EDITED: I had the voltages wrong! 10 - 20vDC is what I'm after).

Well calculate a voltage divider for the battery sensing (try to stick to kOhm for the resistors to keep current through them at a minimum - but not too high).

Take a look at the Allegro current sensors I linked earlier, probably your best bet, the 50A version.

Mowcius

Have a look at www.devicecraft.com. Very good prices and he posts worldwide cheaply too. I've ordered some and waiting for them to arrive. I will probably pot them in epoxy when thery are set up and working.

Wow, great find. Thanks for posting that! After some research yesterday i was going to build my own with an Allegro ACS711, but for $5.50USD, this guy is selling 80 amp sensors. Cant beat that with a stick!

Please let us know how the performance is once you receive yours. From the description, it looks like this will go straight in to an Arduino analog pin with no fuss. Let us know!!

My 200A Allegro sensors (which are rather better than those 80A ones in terms of specs and current) were only $18 or so each (can't quite remember).

You get what you pay for though - I'll be interested to see what you find those are like.

Mowcius

Good point Mowcius. I need a fair amount of resolution in my application, as I will be monitoring current on individual 3.5 A @18v solar panels, so accurately measuring down to at least 1/10th of an amp is essential.

Where have you been able to find Allegro IC's at a reasonable price? I see DigiKey has them, but in consumer-level quantities, shipping alone makes them almost prohibitive.