BabyO 328 and MigaMotors NanoMuscle

I am working on a small walking robot using two nanomuscle SMA actuators. They require 3.5-4V and anywhere from 410-470mA. I have an extra BabyO board that I had a “soldering” accident when connecting header sockets for the power connection so I am not sure if I damaged the regulator but I can program it just fine and both motor drivers work. However when I connect the two of the NanoMuscle70 linear actuators, they start to contract and expand and then one starts to fail and the motor driver chip get very hot.

From what I can tell, I should be able to drive these with this board and I am doing so using this test code from the resource section as seen below. I am not using PWM as I just need the motor ports to basically turn on and off.

Here is the code I am using and I admit I am not that experienced with C. Any thoughts are appreciated. I am trying to rule out a faulty board versus an unacceptable code/actuator combination.

#include <avr/io.h>

// use Data Direction Registers (DDRx) to
// set the four motor control pins as outputs

void motors_init()
{
DDRD |= (1 << PORTD3) | (1 << PORTD5) | (1 << PORTD6);
DDRB |= (1 << PORTB3);
}
// Motor Initialization routine -- this function must be called
//  before you use any of the above functions

//Motor 1 Forward
void M1_forward()
{
PORTD &= ~(1 << PORTD5);    // drive pin PD5 low
PORTD |= (1 << PORTD6);    // drive pin PD6 high
}
//Motor 1 Brake Low
void M1_brake()
{
PORTD |= (1 << PORTD5) | (1 << PORTD6);    // drive pins PD5 and PD6 high
}

//Motor 2 Forward
void M2_forward()
{
PORTD &= ~(1 << PORTD3);    // drive pin PD3 low
PORTB |= (1 << PORTB3);    // drive pin PB3 high
}
//Motor 2 Brake Low
void M2_brake()
{
PORTD |= (1 << PORTD3);    // drive pin PD3 high
PORTB |= (1 << PORTB3);    // drive pin PB3 high
}
#define F_CPU 8000000  // system clock is 8 MHz
#include <util/delay.h>  // uses F_CPU to achieve us and ms delays

// delay for time_ms milliseconds by looping
//  time_ms is a two-byte value that can range from 0 - 65535
//  a value of 65535 (0xFF) produces an infinite delay
void delay_ms(unsigned int time_ms)
{
    // _delay_ms() comes from <util/delay.h> and can only
    //  delay for a max of around 13 ms when the system
    //  clock is 20 MHz, so we define our own longer delay
    //  routine based on _delay_ms()

    unsigned int i;

    for (i = 0; i < time_ms; i++)
        _delay_ms(1);        
}

int main()
{
   motors_init();
while (1)
{
	do
	{
	M1_forward();  
	delay_ms(1000);  
		M1_brake();
		delay_ms(200);	
	M2_forward();  
	delay_ms(1000);  
		M2_brake();
		delay_ms(200);

	}
	while (1); 	
						}					
   return 0;
}

Hello.

What voltage are you using for your Baby Orangutan?

- Jan

Well - that is somewhat flexible.

I am currently using a 3.7V / 70mA LiPo and I know that is under the recommended voltage, but I have made adjustments to use 8Mhz and have done this in the past and it has worked out OK.

That being said, I also tried using a voltage doubling circuit tht gave me 7.4V, but when I connected it, the green powerLED blinked off and on - not sure why.

Perhaps I ruined the board or the lower voltage is causing the issue. I would like to stick to a single battery if possible and use the step up circuit.

Thanks,
Mike

The motor driver getting hot is not in itself indicative of a problem. If the battery capacity is 70 mAh, drawing close to an amp out of it is quite a bit, so you probably can’t expect that to last that long. It sounds like the main problem you’re reporting is that your actuator fails, and given that you’re not really providing any details about the unit or how it’s failing, it’s hard for anyone to comment much about that.

Is there reason to expect the voltage doubler to work? A quick estimate of 1.6A load and an 80% efficiency would mean that you would draw about 4A from your power supply; I hope you weren’t expecting your 70 mAh battery to supply that.

- Jan

Thanks. I was planning on using a higher capacity cell for longer life, but this is what was on hand. As for the doubler, that would be for a larger supply. I will do some further testing and provide more details on the actuator itself.

I swapped out the board I was using with one from another project and the heat buildup does not seem to be an issue, but the performance is still not there on both acuators even when using a wall wart at a higher voltage and mA.

These NanoMuscles have circuitry to prevent over powering and to manage the device so I basically need to turn them on and off. What I am looking to do is to use the babyO as a basic timer to turn power on and off to the two different actuators to create the walking gait. Is there another method of toggling power on and off with this board?

I have attached a PDF that has info on the actuator.
NM70.pdf (82.4 KB)

Thanks,

Mike

Your .pdf file doesn’t show much about the electrical interface, so it’s difficult to tell much. If there isn’t much electronics in there, it seems like applying higher voltages than it’s made for is asking for destroying it. If there is some circuitry in there, knowing some more electrical specs is crucial since you might just need to give it some logical signals to control it.

One thing that will probably help is to use the H-bridges as pairs of half H-bridges. If your actuator only has 2 leads, you can connect the negative terminal of your unit to ground, and the positive one to an output. That way, the H-bridge only has half as much heating in it, and you won’t accidentally reverse power to the actuator (which could be bad if there is some more electronics in there).

- Jan

Jan,

Thanks - as for more details I realized I attached the summary version rather than the one that had more info on connecting and monitoring the actuator. I have attached it - I had to reduce the quality for the upload, but it should still be legible.
[attachment=0]Digital interface from NM70-Super.pdf[/attachment]

There are only two primary wires used to power it, but you can see in the doc, that there are various other methods of control based on what type of monitoring is necessary.

Would I just connect each actuator to ground and the other lead to a port on M1 and the other acuator to M2 and then set those ports to High to enable that pin? Do I need to worry about the other M1/M2 pins not being used?

Thanks,
Mike
Digital interface from NM70-Super.pdf (177 KB)

You should apply your power directly to Vdc, ground to ground, and use an I/O line on the control input. If you want to monitor the outputs, you can hook those up to other I/O lines. The motor driver shouldn’t be necessary.

We made some control boards for Miga before. If what is in these is similar to those, you can damage the actuator if you connect power backwards, which you might have done if you were using the motor driver outputs.

- Jan

Well - I did manage to fry one of them. I spoke with the people at Miga and then suggested this:

If you really want to operate safely, you need to monitor the EXTENDED line. The polarity, etc, is described in the Data Sheet. As you can see from that NM70-Super Data Sheet, the EXTENDED line (equivalent to our SW line on the MigaOne) goes from HI to LO when it’s contacted.

It would be great to tie that connection in to the BabyO to monitor EXTENDED, but not sure how to go about it.

OK - are you saying bypass VIN and connect main power in directly to VCC and connect everything else to ground then connect the actuator VCC to a pin as in the code below?

If I just want to test a timed actuation for one of them, would a simple change to the LED blinking program like I made below work?

int main( void ) {
DDRC |= 1 << PC2; // set PC2 pin to output
while ( 1 ) {
PORTC &= ~( 1 << PC2 ); // Actuator off
delayms( 900 ); // delay 900 ms
PORTC |= 1 << PC2; // Actuator on
delayms( 300 ); // delay 300 ms
}
return 0;
}

Follow up observation. I tried the code above and I can get an LED to turn on and off as well as a pager motor, but when I connect the actuator - nothing happens - I measured the voltage and it is within range. I am sure I am missing something obvious…any and all thoughts appreciated.

Mike

The point is the actuator has all the power handling built in to it. You only need to control the control signal. You definitely should not try to power the thing through an I/O line. You should be able to test the actuator by itself by connecting power to it and then manually toggling the control line. Once you have that working, you can toggle the control line with an I/O line.

- Jan

OK - sorry for the misunderstanding. But just to clarify, I can power the actuator and then connect the control pin to the IO to control the toggling.

Since the actuator contracts as soon as power is applied to it with no other pins on it connected to anything, I am assuming that by connecting the CNTRL pin to an IO that is toggled off will cause it to not contract even when power is applied to the actuator?

I am also guessing that I can power it from a second source to maximize overall battery performance?

Thanks again for taking the time to respond!

Mike

You might need a pull-down resistor on the control line if it’s defaulting to being on. You should be able to test this without the Baby O even being in the picture. You can use different power sources for the Orangutan and actuator. I don’t know how that would maximize battery performance or what you even mean by that term.

- Jan

OK - I will try that. What I meant was that I could power the BabyO with one source and use a second battery source for the actuator.

Thanks,
Mike