Welcome! Log In Create A New Profile


Problem with my sanguinololu..

Posted by glub0x 
Problem with my sanguinololu..
October 19, 2015 03:01PM
so i decided to build back my 3d printer and i am facing a problem with my sanguino (rev 1.3a if i'm not mistaken)

The j-head doesn't receive any power.
The board looks in good state, nothing burned.

If i plug the j-head instead of the heating bed, it works fine.
The mosfet looks good but i'm not sure how to test it properly, it doesn't give power because it doesn't receive the +5 or -5v on the gate (?)
So i was thinking maybe there is a problem with the firmware.
I uploaded a new marlin, it didn't change anything. I can't find (configuration.h ? ) if there is a pin assigned in the firmware to control this mosfet ...
If something is burned somewhere it would be nice to use the mosfet for the heatbed to the j-head instead so i can at least print.

I'm a bit lost, what should i do now?
Re: Problem with my sanguinololu..
October 19, 2015 03:36PM
The pins HEATER_0_PIN=13 and HEATER_BED_PIN=12 are defined in pins_SANGUINOLOLU_11.h if you are using Marlin 1.0.2 or newer (or in pins.h for older versions, search for MOTHERBOARD == 62). There you can switch the pin numbers.

If you have a voltmeter, you can also first check the voltage on HEATER_0_PIN to see if it goes high when switching on the hotend. Logical pins 12 and 13 are on physical pins 18 and 19 of the 40-pin 644P/1284P microcontroller chip (see here). This way you can check if the signal at the MOSFET gate is okay (-> MOSFET problem) or not (-> microcontroller or configuration problem).
Re: Problem with my sanguinololu..
October 20, 2015 01:35PM
So after some testing, the pin n°19 is always at -0,7volts which is not nice...
Do i have to replace the 40 pins chip?
Looks strange to me, how a chip can work for everything else but not that?
Also, how to know if it is a 8mhz or 16mhz? in arduino, the 8mhz doesn't seem to work so i guess it is the 2nd one...

By the way thanks for your very clear answer.

Edited 1 time(s). Last edit at 10/20/2015 01:36PM by glub0x.
Re: Problem with my sanguinololu..
October 20, 2015 02:06PM
So after some testing, the pin n°19 is always at -0,7volts which is not nice...
Do i have to replace the 40 pins chip?
Very strange that you get a negative voltage...

Have you measured this with only one power connected (either 12V PS or USB ) ? Do you then still get negative voltage?

Because, as I understand it, there should not be negative voltages anywhere on the board. So if there is, the only possibility I can think of is if you have some ground loop, i.e. if the 0V from the USB is not the same as the ground from the 12V PS. You might want to measure if there is any voltage difference between PS and USB ground lines. If it is not 0V, try to solve this first, e.g. using the same outlet for PC and PS.

Have you tried changing HEATER_0_PIN to 12 and, if so, can you then control the hotend via the heatbed connector? If yes, then you have at least a temporary solution as long as you don't need the heatbed. If later on you want to use the heatbed, you can still control it using a Sevenswitch on the PWM pin of the 14pin extension header.

If you decide to replace the ATmega644p/1284p, be aware that they normally don't come with a bootloader. So you will need an ISP programmer or some Arduino (with ArduinoISP sketch) to upload the bootloader, before you can use the Sanguinololu via USB.
Re: Problem with my sanguinololu..
October 21, 2015 02:36AM
After double check the voltage on pin 19 is +0,74 no matter what ... I guess i just didn't pay attention and reverse black and red on the voltmeter

Also now the bed temp sensor doesn't work. the sensor itself works but the card no, i'm not sure if this is new or if it came with the bed power not working.
HEATER_0_PIN to 12 works fine that will do for now i guess.
Is there an extra sensor pin aswell?

For the record, i did 3 things that might have created those problems :
1 i use a 5A 12v alimentation, that was clearly not enough, it kept turning on/ off for a few minutes until i understood the problem (i was thinking of a shortcut at the beginning)
2 i handled the card over this alimentation which has some kind of farady cage around it. this resulted on some sparkles between the cage (&maybe the card) and some element inside the alimentation.
3 i stored this sanguino in a very cold place for a year or something...

Edited 3 time(s). Last edit at 10/21/2015 03:17PM by glub0x.
Re: Problem with my sanguinololu..
October 21, 2015 07:31AM
At least it's good to know that there was no negative voltage smiling smiley

As for the extra sensor pin, you could use one of the five analog input pins A0-A4 on the 14-pin extension header. But you have to add a 10uF capacitor to ground and a 4k7 resistor to 5V yourself (see "Thermistor" section of the schematics on the link in my first message). You could e.g use a 0.1" 2x2pin connector and bring out A4, PWM, GND and 5V to a little prototype PCB where you can implement the thermistor RC circuit and the sevenswitch for the heatbed.

As for the "3 things" you did, it looks to me that no. 2 could probably be the cause of the problems - shorting with the PS case (sparks!) may have damaged some parts of the Sanguinololu.
Re: Problem with my sanguinololu..
November 04, 2015 09:54AM
Ok so thanks to your advice i build the seven switch which works fine.
On the same board i build the temperature sensor and that work as well.
BUT i got some VERY strange behaviour that i cannot explain except by Murphy's law.
I am almost writting this to clarify my discovery to myself.

So I plugged my temp sensor on A4 which should be pin number 27 in marlin but on my board it is pin 28 ! i have looked 50 times at the wiring and i am positive. I have no clue why. Next i ll check what pin is A3 (maybe 27?)...

Both sensor works but if i do


I always only got the temperature of the head, never the bed, how is that possible? No idea, i will double check because this looks magical to me. How can the sensor & the pins work but not together? Maybe a software version?

This didn't work. But when i put TEMP_0_PIN 28 It does work fine ( with the extruder pin )
Strangely ( but i have to fomfirm that) TEMP_BED_PIN 28 instead of TEMP_0_PIN 28 does not work, which mean i can never have the temperature of the bed i do not know why but again next time i go down i'll double check that.

I didn't manage to trigger the seven switch but it works otherwise, i tested it with my alimentation. Also on power UP of the sanguino, the led goes on...

So strange things are hapening here, i suspect the ghost of electronically dead poeple to aunt my sanguino.

I have a last question, the MOSFET of the seven switch goes hot and need a heatsink. Why doesn't it have one on the sanguino?

Edited 1 time(s). Last edit at 11/04/2015 09:55AM by glub0x.
Re: Problem with my sanguinololu..
November 04, 2015 11:44AM
If you connect the heatbed directly to the Sanguinololu, the MOSFET also gets hot. But it's better not to do that, since the traces on the PCB are quite weak, so you risk burning them at >10A (see here). So I never connect the heatbed directly to the Sanguinololu, but use either a cheap automotive 40A relay or more recently also a sevenswitch. As MOSFETs in the sevenswitch I use IRLB3034, they have a very low on-resistance, so they do not get hot.

If you put a heatsink on the MOSFET, be careful not to cause a short, since the top of the MOSFET are at 12V when the MOSFETs are off.

As for the pin numbering of the Sanguinololu, there is indeed some confusion, as some diagrams show the analog pins in the wrong order, i.e. A3 -> 28 and A4 -> 27 instead of A3->27 and A4->28. But the easiest is to use just the analog numbers 0-7 instead of the digital numbering 24-31. In the file arduino/hardware/sanguino/cores/arduino/wiring_analog.c it says:
#elif defined(__AVR_ATmega1284__) || defined(__AVR_ATmega644p__)
        if (pin >= 24) pin -= 24; // allow for channel or pin numbers
so you see that digital pin number 28 is mapped to 28-24=4, i.e. A4. But why not use directly 4 instead of 28?
Re: Problem with my sanguinololu..
November 04, 2015 03:12PM
There is something i would like to clarify.
The D12 pwm should be plugged to to the gate of the seven switch. I put HEATER_BED_PIN 4.
But for the temp sensor TEMP_BED_PIN 4 (A 4)
Is that normal ?
Re: Problem with my sanguinololu..
November 04, 2015 04:34PM
Yes, the pin label D12 PWM on the Sanguinololu is wrong, it should be D4. And using (D)4 for a PWM output pin and (A)4 (=D28) for an analog input pin sounds indeed strange, but it should work.
Re: Problem with my sanguinololu..
November 05, 2015 12:58PM
Ok thanks to your help i solved all my problems everything works. I now have a much better understanding of this sanguino!
The bug of the heated bed sensor that didn't work regardless of the fact that both the pin and the sensor worked was simply because i disactivated the heated bed in marlin...

I have one last wonder: on the sevenswitch i used IRLB8743 just like on the sanguino.
When i run the sevenswitch with a small heatsink the MOSFET goes quickly above 120° ( i stoped at that point) so i would probably burn if i use it as is.
The seven MOSFET of the sanguino is the same without heatsink and it used to work fine.
Is it a quality diference between the 2 components ? Logically this mean that mine has a higher R, am i wrong here?

I am thinking of unsoldering the useless MOSFET of my sanguino and use it. Or use a wire between D12 and the gate of this old mosfet and use my actual sevenswitch for fan control with another Digital pin....

Edited 1 time(s). Last edit at 11/05/2015 12:58PM by glub0x.
Re: Problem with my sanguinololu..
November 05, 2015 01:29PM
I also remember that the first batch of IRLB8743 I bought had a much higher ON impedance than it should be according to the specs - so they got much too hot. The second batch was ok and the MOSFETs kept cool. You can measure the voltage drop over the MOSFET while heating between the "-" of the heatbed and the GND from the power supply. For 10A current it should not exceed 50mV, which would mean about only 0.5W heat dissipation...
Re: Problem with my sanguinololu..
November 05, 2015 05:04PM
70mv not nice sad smiley....
i will try to use this mosfet for fan control, will another MOSFET work with D11, it's not rated as PWM ?

Another option for me is to use 2 Mosfet in parallel sounds weird but why not.
Re: Problem with my sanguinololu..
November 06, 2015 01:38AM
You can use D11 for controlling a fan with the MOSFET, but if it's not a PWM fan you will only get OFF/ON control.
Sorry, only registered users may post in this forum.

Click here to login