Welcome! Log In Create A New Profile

Advanced

Testing my electronics - responses not as expected...

Posted by AgeingHippy 
Testing my electronics - responses not as expected...
October 19, 2010 03:53PM
Hi All

I have loaded my motherboard and extruder controller... successfully I hope! I have loaded the Arduino 0021 with the latest version of reprap host and the 5D GCode interpreter that came bundled with it. Also the sanguino extensions as directed. My boards are Makerbot pre-assembled Gen 3 with the minimal mods.

Anyway, according to this page when testing the motherboard with nothing connected I should be getting

comms: G-code: M105 dequeued and sent [0.002s/-1259516051264ms]
comms: GCodeWriter.waitForOK() - temperature reading: T:0 [0.017s/15ms]
comms: GCode acknowledged with message: ok EB [0.017s/0ms]
comms: G-code: M105 dequeued and sent [1.519s/1502ms]
comms: GCodeWriter.waitForOK() - temperature reading: T:0 [1.537s/18ms]
comms: GCode acknowledged with message: ok EB [1.537s/0ms]

but I am getting

comms: Response: ok T:0 B:0 intercom::waitError() [9.599s/30ms]
comms: G-code: N15 M105 *51 dequeued and sent [9.607s/8ms]
comms: Response: ok T:0 B:0 intercom::waitError() [9.647s/40ms]
comms: G-code: N16 M105 *48 dequeued and sent [11.154s/1507ms]
comms: Response: ok T:0 B:0 intercom::waitError() [11.182s/28ms]
comms: G-code: N17 M105 *49 dequeued and sent [11.190s/8ms]
comms: Response: ok T:0 B:0 intercom::waitError() [11.230s/40ms]

When connecting the extruder I should be getting

comms: G-code: M105 dequeued and sent [9.140s/1502ms]
comms: GCodeWriter.waitForOK() - temperature reading: T:0 [9.158s/18ms]
comms: GCode acknowledged with message: ok EB [9.158s/0ms]
comms: G-code: M105 dequeued and sent [10.660s/1502ms]
comms: GCodeWriter.waitForOK() - temperature reading: T:0 [10.677s/17ms]
comms: GCode acknowledged with message: ok EB [10.677s/0ms]
comms: G-code: M105 dequeued and sent [12.179s/1502ms]
comms: GCodeWriter.waitForOK() - temperature reading: T:499 [12.197s/18ms]
comms: GCode acknowledged [12.197s/0ms]
comms: G-code: M105 dequeued and sent [13.699s/1502ms]
comms: GCodeWriter.waitForOK() - temperature reading: T:499 [13.717s/18ms]
comms: GCode acknowledged [13.717s/0ms]
comms: G-code: M105 dequeued and sent [15.219s/1502ms]
comms: GCodeWriter.waitForOK() - temperature reading: T:499 [15.237s/18ms]

but I am getting

comms: G-code: N160 M105 *0 dequeued and sent [146.391s/1506ms]
comms: Response: ok T:2 B:-41 [146.405s/14ms]
comms: G-code: N161 M105 *1 dequeued and sent [146.413s/8ms]
comms: Response: ok T:2 B:-41 [146.437s/24ms]
comms: G-code: N162 M105 *2 dequeued and sent [147.943s/1506ms]
comms: Response: ok T:2 B:-41 [157.452s/9509ms]
comms: G-code: N163 M105 *3 dequeued and sent [157.459s/7ms]
comms: Response: ok T:2 B:-41 [157.474s/15ms]
comms: G-code: N164 M105 *4 dequeued and sent [158.980s/1506ms]


Now I don't understand what is happening but it does not look nearly like what I expect according to the wiki.

Can anyone please advise?
Re: Testing my electronics - responses not as expected...
October 19, 2010 05:50PM
i guess the wiki page is a little older from a diff firmware but now yes it says T:0.

only bend the pins of a termistor and connect them to extruder in their socket directly - run again and see what reports, put your finger on termistor and see if temp changes increases / drops etc.

also go to extruder tab, try fan and heated bed and you should see the corresponding leds light up and off

set speed 300 and press extrude - see the leds blink (just a question here, do 2 of the leds near the chips, the enable pin ones, light differently than the other phase 2 or its just my opinion? also dont turn the trimpot to max ever, i think you risk burning one of the bridges)

note: to run the extruder you have to link the pins scl sda from MB with D9 D10 on extruder controller - check the connection schematic

Edited 2 time(s). Last edit at 10/19/2010 05:56PM by NoobMan.
Re: Testing my electronics - responses not as expected...
October 19, 2010 06:06PM
Btw do you have the GND and GNDA points near oscilator connected?

The enable leds (led 2 and 3) for me are somehow dimmer than the other 2. I guess thats because are enable pins and the other two are phase pins of the bridges, and the chips were actually meant to run dc geared motor, and they ended getting hacked to run a stepper instead, but still cant quite figure it out exaclty why these leds get different stuff flowing through their path. Also with the pot to min these dont lit up at all on my board (at least not visible).

Any clues? Anyone can say if its normal for those leds to be dimmer than the other two?

Edited 1 time(s). Last edit at 10/19/2010 06:24PM by NoobMan.
Re: Testing my electronics - responses not as expected...
October 21, 2010 04:30AM
Thanks for the tips guys. I was hoping to try this last night and give feedback but could not get to the printer. Maybe tonight...

cheers
Re: Testing my electronics - responses not as expected...
October 22, 2010 07:49AM
Hi Noobman

I did connect the thermistor and it was readin the temperature fairly accurately (I think)... 17 deg C in free air (York - northern england bloody cold smiling smiley) and 33 when I held it going up to about 70 when I put it near a light bulb.

Problem is when I attach the motor. When REPRAP host is not started it seems fine but the minute I get REPRAP host running the motor emits a high pitched whine.... Pressing extrude does not make any difference and I do not notice any flickering LEDs

Also the host seems to crash quite often. sad smiley

I do have my SCA/SDL connected to D9/D10 as per the diagram.... just a thought - I should check there is continuity between the 2 boards as many posts I have read state these missing connections are often the error - could a dud connection here cause the motor to wine incessantly the moment reprap host starts up?

Cheers
Re: Testing my electronics - responses not as expected...
October 22, 2010 09:11AM
The whine is normal. It is because the Arduino library restricts the maximum PWM frequency to be in the audio range.


[www.hydraraptor.blogspot.com]
Re: Testing my electronics - responses not as expected...
October 25, 2010 05:48PM
Thanks Nop - That puts my mind slightly at ease... but does that mean the printer will have this perpetual high pitched whine???

Remember I am using Reprap Host with the bundled firmware on Arduino 0021. I am trying to test my extruder board here

Anyway, Noobman - I see what you mean about the 2 leds LED2 and LED3 are dimmer than the other 2 (LED4 and LED8) - this is when the motor is whining... - reading up on the GCodes here and looking at the console output right after reprap host starts I see M113 on it's own tells the extruder controller to use the PWM (whatever that is) setting from the onboard pot. Changing the setting of the pot befor starting up modifies the brightness of these 2 LEDs.

Not sure what LED 5 indicates but it flashes intermittently and is often on for longer than it flashes...

If I turn on the heat using the button on the extruder tab, and the temperature is lower than the target temp LED 7 comes on - I guess it indicates it is trying to heat up the extruder hot end. If the temperature reaches the target temp LED 7 goes off, and if I turn off the heat (on the tab) the LED7 also goes out in this case even if the target temp is higher than the current temp. This all seems to indicate something sensible smiling smiley

LED6 comes on when I select 'cool' so I guess that indicates power for the fan...

I cannot seem to get my motor to do anything other than whine though.... I set the target temperature to a temp returned by the attached thermistor and set the extrude speed to 300 as suggested... but nothing happens. GCode is sent as follows...

comms: G-code: N937 G1 F3000.0 *126 dequeued and sent [753.496s/1242ms]
comms: Response: ok [753.517s/21ms]
comms: G-code: N938 G1 E26.0 *117 dequeued and sent [753.524s/7ms]
comms: Response: ok [753.533s/9ms]
comms: G-code: N939 G1 F1500.0 *119 dequeued and sent [753.540s/7ms]
comms: Response: ok [753.549s/9ms]

I am guessing the feed rate F3000 followed by F1500 is for any head movement and the E26 is telling it to extrude to a length of 26mm...

Am I missing something? What do I need to do to get some action from the motor? Most everything else on the extruder board looks like it is acting like it should... which makes me think the motherboard is good as well..

I do have SCL-D9 and SDA-D10 connected. using a multimeter to test resistance at the back of the pins with the power off indicates the connections are good.

I don't know where the GND / GNDA are which you asked are connected Noobman ...
Re: Testing my electronics - responses not as expected...
October 26, 2010 05:53PM
I'm stumped!!

I have recompiled and reloaded my motherboard firmware stating the actual number of extruders is 1, commenting out all references to any other extruders in the configuration.h file. Compiled and loaded fine.

I have set the number of extruders on the host to 1 and nothing but the behaviour I have already listed here.

If I set the number of extruders to 4 the motor occasionally gives a bump which is different to the usual whine but does not turn... although the occasional bump does rotate very slightly sometimes. This behaviour seems random to me...

I have tried various stepper motors so I don't think it is the motor.

The 4 rj45 ports along the motherboard seem to be connected to each other according to the schematic and this seems so as regardless of which extruder tab on reprap host I select and set the cool (fan) or heater, the lights come on...

time for bed. I hope someone can give me a pointer....
Re: Testing my electronics - responses not as expected...
October 27, 2010 02:05PM
well, tried swapping the wires of 1 coil of the motor in case they were working against each other but to no avail sad smiley

If the problem I am having is usually not due to SCL/D9 and SDA/D10 connections then how can I check to see that the motherboard is in fact sending signals to these pins? I have a digital multimeter and can wire up some LEDs on a breadboard....

any advice would be appreciated.

Cheers
Re: Testing my electronics - responses not as expected...
October 29, 2010 07:10AM
Connect LEDs from the SCL / SDA lines to ground with series resistors about 2.2K and see that the one which is step flickers when extruding slowly and the other changes with a direction change.

You could use a digital voltmeter and see some change in the level, but it will be unpredictable how your meter responds to fast pulses.


[www.hydraraptor.blogspot.com]
Re: Testing my electronics - responses not as expected...
October 31, 2010 04:54PM
Hmm.. after a weekend away I eventually have got down to test the signals and they again are not quite what I expected....

Wiring the SDA and SCL via some resistors and LEDs to GND give me the following....

Switch on power to the motherboard - Reprap Host not running... SDA is on and SCL is off.

Start Reprap host - no change - SDA on and SCL off

Go to the extruder tab and click the extrude button. SDA remains ON and SCL comes on - no flickering or anything. Just constantly on.

Click extruder button again (deselect button) - no change SDA on and SCL on

click extrude button a few times - no change SDA remains on and SCL remains on.

Select Reverse and click extrude button - SDA remains on and SCL goes off.

Essentially the only time the signals seem to change is when I toggle reverse and then toggle extrude. SDA remains constantly on and SCL is toggled when the reverse and extrude buttons are toggled...

So my guess is that the SCL is the direction pin - and this is working correctly. I set the direction (toggling the reverse checkbox) and then send the signal by toggling the extrude button.

The SDA seems faulty - no flickering or anything. Just constantly on regardless...

Edited 1 time(s). Last edit at 10/31/2010 05:41PM by AgeingHippy.
Re: Testing my electronics - responses not as expected...
November 02, 2010 05:35AM
I am stumped and don't know where to go now sad smiley

Can anyone confirm whether my understanding of the signals as in the previous post? That my direction is working as expected but the speed is buggered?

If so, any way around that?

Thanks
Re: Testing my electronics - responses not as expected...
November 02, 2010 06:38AM
Yes SCL is direction and SDA the step signal.

SDA does not look right, but it is hard to be sure without looking at the firmware. It could have very short negative pulses on it too small to see. I do my step signals with 50/50 duty cycle but IIRC reprap does it with small pulses.

You could wire your LED from +5V through the resistor to the output (swapping the polarity of course) so it lights when SDA is low. That way you would see it light faintly if there are any negative pulses.

Look for shorts on the PCB between SDA and VCC.


[www.hydraraptor.blogspot.com]
Re: Testing my electronics - responses not as expected...
November 02, 2010 07:00AM
Thanks Chris

I was thinking that I should perhaps put some really basic firmware on the board that expressly turns that pin on and off based on an instruction sent to the board.

That should be a simple enough intro to firmware programming....

As for shorts - I have had the board under a magnifying glass and cannot find any...

Will place feedback as I progress.
Re: Testing my electronics - responses not as expected...
November 02, 2010 07:16PM
OK - a simple sketch to flip the pins shows that SCL is fine but SDA remains high regardless of the write output.

There are some pull-up resistors attached to each pin - I guess if there is a short there, I would have permanent high on the pin? The documentation states there are 4.7K pull-up resistors incorporated, so I guess the 1.8K resistors at R11 and R12 are not said pull-up resistors?

any suggestions on using another pin for SDA?
Re: Testing my electronics - responses not as expected...
November 02, 2010 10:26PM
AgeingHippy,

I am having the same issue you are having with my exturder controller. Did you recently buy yours from Makerbot?


"Get busy living, or get busy dieing" - Red
Re: Testing my electronics - responses not as expected...
November 02, 2010 11:25PM
You can disregard my post. I had forgotten to connect the SCL and SDA lines and all is fine.
Re: Testing my electronics - responses not as expected...
November 07, 2010 01:03PM
Solved -

For anyone following, I redefined pin 1 as my SDA within the firmware and wired from there - not as clean but it works.

Seehere
Re: Testing my electronics - responses not as expected...
November 16, 2010 05:11AM
fwiw - I removed the 1.8k pullup resistor for the SDA pin and now the pin remains low regardless of the signals... so it seams the pin is dead.

nevermind, I can use pin 2.

learning learning learning - it's great smiling smiley
Sorry, only registered users may post in this forum.

Click here to login