This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Attaching current sensor to msp430 launchpad

Hello everyone,

I have been working on a project to develop a simple power meter.  I have mainly been working a simple DC circuit and a photo resister to measure the change in voltage of the simple circuit when covering up the resistor.  It cause the resistance to fluctuate so I can measure a voltage of 0 to .3 volts.  Now that I have that part working I'm trying to figure out how to go about attaching a split core current sensor  .  It produces a voltage up to .333 vols AC.  My initial thought is to wire the black lead to ground and white lead to the pin that I'm sampling but then I realized that is what I would do for DC.  Second thought was to wire each lead to different pins and alternate sampling between the two.  I am now to the point where I honestly don't know what I'm doing and the rest of the team I am currently on doesn't have the vaguest idea of how to approach it either.

Thanks =)

  • Chris,

     

    Why are you using a photo resistor for a power meter? If you have a known resistance and a voltage you can measure power.

    You can sample the voltage change on one of the MSP430's ADC's.

    I also do not see the need for a current sensor if you have access to the voltage change.

    Please provide some more details.

     

  • Oh, sorry I can see how that is confusing,  I had never  worked with just a chip and a board like the MSP430 launchpad.    I read through the documentation and I keep going back to reread sections as I realize I don't know answers to some things but even still somethings still elude me.  So what I did was build a voltage divider circuit that I could get a varying voltage  between 0-.3v.  I figure if I feed that voltage into a pin, say P1.5, I can use the example TI code  to do the sampling and the transmitting over the MSP430 uart.  The voltage divider with photo resistor circuit is just a test circuit to make sure the sampled voltage of the circuit that is transmitted to the computer are the same as the multimeter I have.  So I hook the multimeter up to the voltage divider circuit and watch the values displayed at the command prompt to make sure their similar to the multimeter so if the circuit is .2 volts the sampled voltage to the pin that is output to the screen is also .2v.  Once I have that working I at a minimum know my sampling and transmitting of the value are correct.  The problem is when I plug in this sensor-it outputs AC voltage and nothing happens.  So I would think I need to run the ac voltage through some kind of conversion to make it DC so that the ADC can sample it.  One of my team members who refuses to read the docs says by glancing at them he is positive the ADC in the Launchpad can sample AC directly.  I don't know where to look to confirm this.  The materials we find online refer to referencing a positive and negative voltages which he assumes means it does sample AC while I contend that it just means it samples positive and negative Voltages doesn't mean AC or DC.  His argument is voltage is voltage regardless of AC or DC.  I seen another post on here that says to use a full wave rectifier to run the AC voltage into in order to make a DC voltage which the MSP430's ADC can sample but we're still not a 100% disproved that the Launchpad can't handle AC directly.  Hope this helps I know it's confusing but I appreciate any and all the help. 

  • Why do you need a current sensor? What are you trying to measure the power of? If you are trying to measure a DC current the sensor you have selected will not work as it is intended for AC currents. Your teammate is correct, voltage is voltage. AC and DC refer to the current direction. The problem with AC is that the voltage is centered around 0 volts. Therefore when the current becomes negative the voltage becomes negative and cannot be sampled by the launchpad. The full wave rectifier essentially takes the negative voltage and flips it making it a positive voltage.

    So I will say this again. Since you have a voltage divider and a known resistance you can measure power without measuring current.

    Power = V^2 / R = I^2 * R = V * I

    So feed the output of the voltage divider into the launchpad making sure it is an analog pin (A0,A1 etc). Use the ADC to sample the voltage, square that number and divide it by the load resistance to measure the power going through the resistor.

     

     

  • Were trying to measure the power running to a power strip with appliances plugged in it.  We're assuming a fixed voltage and varying current.  The current sensor clips on the unshielded power strip wire and outputs a ac voltage with respect to the the ac current passing.  I want to use the MSP430 to measure this voltage provided by the sensor so we can calculate the current and then calculate the power be provided to the power strip.

  • Ok that is a little more clear. Since the sensor outputs an AC voltage I would recommend getting a sensor that outputs a DC voltage if possible. If that is not possible you will need to convert the AC output by rectifying it and using a cap to stabilize the voltage. There might be an easier way but this is what I would do.

    The current sensor you have can measure up to 50 amps, which is high. Therefore an input current of 50 amps between 50 and 400 Hz will yeild a .333V sign wave centered around 0V. 

  • Hello,

     Usually, a current transformer outputs a differential signal (Floating voltage), you will need an instrumentation amplifier in order to feed it into the single ended A2D.

    A simpler solution would be to use a hall effect sensor, such as the ACS758. It outputs a signal relative to the current centered around its Vcc/2

    Edit: You will also want to use an isolation transformer while developing and debugging, HVAC hurts..

    G

     

     

**Attention** This is a public forum