I'm trying to get one (eventually more) SMA springs controlled by a Mega.
So far I've got the setup shown in the attached Fritzing diagram. The transistor is getting quite hot to the touch, so I think I've done something wrong...
Hi
The analog pin can be configured as an output, but we need to see your sketch.
Are you using PWM to control the current?
If so the analog pins are not PWM type.
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Please not a fritzy diagram ,we need a proper schematic, thanks.
I think you need to put a resistor in series with the spring to limit the current to whatever value is needed to heat it.
You haven't told us what current the spring requires, or what voltage and current your power supply is rated at.
Without this information, I'm not going to suggest a resistor value, but it is likely to be a few ohms, and a high power rating.
I've attached the data sheet for the spring-- it's the thickest diameter one listed on page 6 (0.020 inches).
I've been using a 4.5 V at 500 mA power supply; it looks like I can use quite a bit larger current (4A, according to the datasheet). How can I figure out what voltage is appropriate?
Here is my sketch-- I didn't include it the first time because I thought it was so simple nothing could go wrong, but on second thought, it would have been good to include:
int springPin = A1;
void setup()
{
pinMode(springPin, OUTPUT); // Set the mode of springPin to output.
}
void loop()
{
digitalWrite(springPin, HIGH); // Turns on spring.
}
(I also wrote another sketch which was meant to turn on and off the flow of current, by digitalWrite-ing the pin to HIGH and LOW, but then reverted to the above as that did not work.)
Thanks for the datasheet. That's very interesting.
To get reasonably rapid heating, the currents they specify are too high for continuous operation. They say that only the thinner wires can be heated continuously by a fixed current. Also, the resistance changes dramatically during the contraction process. You need at least some PWM control over the voltage. Eg. apply a voltage appropriate for 4A for 0.5 second, then drop back to some 'maintaining' current like maybe 2A. But a gust of wind may cool the wire too much and then the resistance drops and the current goes away. You will need to experiment with the real stuff to get a feel for how it works.
I think the current amount of current is fine (it's only 500 mA)-- but the problem is that the current isn't actually causing the spring to move-- just the transistor to heat up.
I was seeking help with the design of the circuit-- any suggestions here? (I do think there must be some mistake with the current setup other than the transistor I'm using and the lack of resistor in series...)
Thanks! I will try another transistor. But right now the spring is not moving at all (and it DOES move when connected directly to the wall wart), so I think something else must be wrong... any ideas?
Well, start by measuring the voltage on the SMA wire. Is it what you expect? Measuring the current is more difficult as most multimeters don't have a current range that goes high enough. You may need to add a shunt resistor to be able to measure the current.
I am assuming you have a multimeter. You won't get far without one. You only need to spend $5-$10 to get something 95% as good as the professional units that cost $hundreds. I have some expensive bench multimeters but the one I use most often cost $12.
Hi,
With the circuit turned on and sketch running.
Measure.
Voltage across the wire
Voltage across the collector and emitter of the transistor,
Voltage between gnd and Base of the transistor.
What is the value of the resistor in the base of the transistor to the arduino?
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Showing the C B and E connections and part numbers.
Hi,
I think we need ohms law here, how long is the piece of wire you are using.
Use the chart on page 6 to work out the resistance you have.
Then using the appropriate rated current, note there is a 1Second rating, work out what the voltage you need will be.
The OP has not provided ANY calculations to show he has a piece of wire that will work at the voltage he is using.
TIP. NEVER start these sort of projects without a DMM
Tom.....
14 posts and no calculations.
PS Are you assuming that because your wallwart is rated at 4.5V 500mA that when you connect your wire across the supply that is exactly what will be supplied no matter what the resisitance???
If so? What is your electronics, programming, arduino, hardware experience?
If you look at the datasheet for the transistor, on page 2, you will see that hfe, the DC Current Gain could be only 10 - 50.
Because you have a 470Ω base resistor, you are limiting the base current to <10mA. So the collector current might only be around 100mA. Compare that current with the current that you get when you connect the spring directly to the power supply.
You could increase the base current by reducing the value of the base resistor, but you shouldn't exceed the 20mA limit for the ATmega2560.
You say that when you connect the spring directly to the power supply, it works satisfactorily, but the current could in fact be much higher than you think. Just because the power supply is rated at 500mA, it doesn't mean that the current is actually limited to 500mA! The load will draw whatever current it needs, this could in fact be damaging for the power supply.
TomGeorge:
PS Are you assuming that because your wallwart is rated at 4.5V 500mA that when you connect your wire across the supply that is exactly what will be supplied no matter what the resistance???
Thank you for saying that, TomGeorge.
That is the point that I was trying to stress.
Voltage across the collector and emitter of the transistor - 2.0 V
Voltage between gnd and Base of the transistor - 0.86 V
What is the value of the resistor in the base of the transistor to the arduino? 470 ohms
The length of the spring wire is roughly 12 inches, uncoiled, based on my measurement. Thus the total resistance should be 12 inches * 0.11 ohms/inch = 1.32 ohms.