Welcome! Log In Create A New Profile

Advanced

Wrong things happening

Posted by thatguy 
Wrong things happening
June 10, 2009 12:46PM
I have been helping a friend build a reprap machine and it is fully assembled and the software is fully installed. The firmware is uploaded properly and any test we run seems to work. The problem is nothing I do on the host software works on the actual reprap. If I turn on the cooling option, it doesn't happen. If I tell it to turn the heater on, it does weird things. For example, just on the PWM driver, the voltages on the outputs will be all over the place, and clearly not doing what they are supposed to. I have tried a few different baud rates but I don't know that that's it. Any thoughts?
Re: Wrong things happening
June 10, 2009 12:48PM
Oh, I have both linux and windows up and trying to work, gen 2 electronics, sanguino board, and I know the usb->serial is working
Re: Wrong things happening
June 11, 2009 05:09AM
First attempt to debug "strange things happening" are:
- Check ground wires.
- Check for any interferences along the cables.
- Make sure all pwm pins are connected to pwm output on your micro-controller board.
- Does every channel work? Write a small test program to activate the PWM pins.
- Inspect your boards for bad solder joints.
Re: Wrong things happening
June 11, 2009 12:27PM
Where can I download some test programs?
Re: Wrong things happening
June 11, 2009 01:24PM
I found some...
Re: Wrong things happening
June 11, 2009 02:51PM
Well it's still not working. I used the test program:
int pwm_a = 9;
int pwm_b = 10;
int pwm_c = 11;
int i;

void setup()
{
pinMode(pwm_a, OUTPUT);
pinMode(pwm_b, OUTPUT);
pinMode(pwm_c, OUTPUT);

Serial.begin(9600);
}

void loop()
{
//
//fade all channels up and down.
//
Serial.println("Fading all pwm channels up to max.");
for (i=0; i<=255; i++)
{
analogWrite(pwm_a, i);
analogWrite(pwm_b, i);
analogWrite(pwm_c, i);

delay(100);
}

Serial.println("All pwm channels at max.");
delay(1000);
Serial.println("Fading all channels to 0");

for (i=255; i>=0; i--)
{
analogWrite(pwm_a, i);
analogWrite(pwm_b, i);
analogWrite(pwm_c, i);

delay(100);
}

Serial.println("All pwm channels at zero.");
delay(1000);

fade_channel(pwm_a);
fade_channel(pwm_b);
fade_channel(pwm_c);
}

void fade_channel(int channel)
{
Serial.println("Fading pwm channel to max: ");
Serial.println(channel);

for (i=0; i<=255; i++)
{
analogWrite(channel, i);
delay(100);
}

Serial.println("pwm channel at max.");
delay(1000);
Serial.println("fading down.");

for (i=255; i>=0; i--)
{
analogWrite(channel, i);
delay(100);
}

Serial.println("pwm channel at 0.");
delay(1000);
}
and absolutely nothing happened. So is it probably bad soldering or could it be the power supply?

I'll test the power supply.
Sorry, only registered users may post in this forum.

Click here to login