Welcome! Log In Create A New Profile

Advanced

Dedicated Mega2560 R3 just to control multiple heatbeds

Posted by pugzor 
Dedicated Mega2560 R3 just to control multiple heatbeds
November 09, 2015 11:29PM
Hey there,

I'm building a large CoreXY printer and one of the problems I've come up against is that of heating the bed. It was suggested that I could use a mains powered heater but I'm not keen on that (small child + moving mains powered metal parts = not acceptable risk to me) so I'm trying to find the next best option.

Printer is running a MKS SBase 1.1 (Smoothieboard clone of debatable quality), with the bed being heated by four individual MK2B heating PCBs. There are three power supplies involved; 1x 240W 24VDC for the MKS SBase, steppers, drivers, etc, 1x 960W 24VDC dedicated to the heatbeds, and 1x 60W 12VDC for various accessories.

The idea is that I'll use the heatbed output from the Smoothie clone as an input to some of the pins on the Mega2560. Each heatbed + MOSFET + thermistor combo should be able to operate independently (which is kind of required to a degree given the differences in manufacturing). MOSFETs (linked) will use PWM outputs from the Mega2560 so they can each have their own PID setup and not just run bang-bang.

Additionally I'll run a fifth thermistor in the middle of the heatbed to feed into the Smoothie clone. I guess you could call this a "master thermistor".

Can anyone see any issues with this or even point me in the right direction of what firmware snippets might be useful? I don't think I'm trying to to be terrible innovative here... got a feeling a lot of this has been done before.
Re: Dedicated Mega2560 R3 just to control multiple heatbeds
November 10, 2015 05:22AM
When you say Mega2560, you actually mean RAMPS?
Ramps only has three MOSFETs, so the SBASE would have to power one bed itself.
The fuses on the Ramps are not suited to drive 3 beds. You'd have to replace the 5A fuse at least.
The traces between 5A power connector and MOSFETs are my next concern.

-Olaf
Re: Dedicated Mega2560 R3 just to control multiple heatbeds
November 10, 2015 09:56AM
You don't need to use a Mega because you need only a few pins. A Uno or Leonardo would be adequate. I prefer the Leonardo because of its separate USB and serial ports.

The mosfets you linked to are not suitable because they are designed for 10V gate drive. Use logic level mosfets instead, e.g. IRLB8743.

Your main problem is that the Arduino controlling the bed doesn't know what temperature has been commanded. You can monitor the PWM form the RAMPS to tell when you are approaching temperature, but the PIDs on the bed control Arduino coupled with the PID in the printer controller will quite likely form an unstable system. Better to have the printer electronics just send the commanded temperature to the bed control Arduino, e.g. over a serial link.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Dedicated Mega2560 R3 just to control multiple heatbeds
November 10, 2015 09:26PM
Quote
o_lampe
When you say Mega2560, you actually mean RAMPS?
Ramps only has three MOSFETs, so the SBASE would have to power one bed itself.
The fuses on the Ramps are not suited to drive 3 beds. You'd have to replace the 5A fuse at least.
The traces between 5A power connector and MOSFETs are my next concern.

-Olaf

Hmm, not quite the concept I had in mind.

I was just going to use the Mega2560 without RAMPS. The Mega2560 output would only drive the gates for the MOSFETs... the MOSFETs (and hence power requirements associated with them) would be externally mounted. I know pretty much all boards aren't rated to handle the kind of current needed to drive large/multiple beds.

Quote
dc42
You don't need to use a Mega because you need only a few pins. A Uno or Leonardo would be adequate. I prefer the Leonardo because of its separate USB and serial ports.

The mosfets you linked to are not suitable because they are designed for 10V gate drive. Use logic level mosfets instead, e.g. IRLB8743.

Your main problem is that the Arduino controlling the bed doesn't know what temperature has been commanded. You can monitor the PWM form the RAMPS to tell when you are approaching temperature, but the PIDs on the bed control Arduino coupled with the PID in the printer controller will quite likely form an unstable system. Better to have the printer electronics just send the commanded temperature to the bed control Arduino, e.g. over a serial link.

I was only going to use a Mega2560 because I have one lying around... I know it's overkill but it's free and would work.

Thanks for the advice on the MOSFETs!

So you're just saying I should program the Smoothie clone to have a serial link to the Mega2560? From the schematics on the Smoothie clone, I think the AUX-1 block has P0.2 and P0.3 as TX0 and RX0 respectively, and I don't think they're used for anything else... The Mega2560 should be able to talk on pins 17 and 16. Would that work, do you think? In theory at least...
Re: Dedicated Mega2560 R3 just to control multiple heatbeds
November 11, 2015 03:21AM
Yes that sounds OK. Bear in mind that the Smoothie clone uses 3.3V signal levels and the Mega uses 5V, so you probably need to do some level shifting.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Dedicated Mega2560 R3 just to control multiple heatbeds
November 11, 2015 08:02PM
Thanks for that David! Out of interest, how do you know the smoothie clone uses 3.3V signal level? I thought I saw that the AUX-1 block had a 5V pin... I know that means nothing for signal level but just thought it was strange.

If I do need a level shifter, would something like this do the trick? [www.jaycar.com.au]
Re: Dedicated Mega2560 R3 just to control multiple heatbeds
November 12, 2015 03:39AM
The processor chips used on the 32-bit boards all use 3.3V signal levels, although some of them may have 5V-tolerant inputs. So the UART output on the Smoothie clone will use 3.3V signal levels if it comes straight from the chip.

That level shifter you linked to looks good to me. However, you may not need a level shifter at all. You only need to connect the Tx output of the Smoothie clone to an Rx input of the atmega, because the atmega does not need to pass data back to the Smoothie. I have just checked the atmega2560 datasheet, and with a 5V supply it only needs 3V to register a high on its inputs. [The atmega32u4 used on the Arduino Leonardo is even better, it only needs 1.9V.] So as long as you don't have a lot of ground noise, a direct connection should be OK.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Dedicated Mega2560 R3 just to control multiple heatbeds
November 12, 2015 04:23AM
Again David, thank you so much. I might put in the level shifter because for only $5 it'll rule out potential issues with ground noise.

I was looking at Jaycar a bit further and they have a little MOSFET [www.jaycar.com.au] Seems to be a NTD5867NL which has a lower output (still a respectable 20A) but has a Rds(on) of 39 mOhms @ 10V. It's a slightly more expensive option but at $7/piece it's still economical and comes is an easier-to-mount package than a naked TO220.

Would something like that be fine rather than a IRLB8743PbF?
Re: Dedicated Mega2560 R3 just to control multiple heatbeds
November 12, 2015 08:32AM
Quote
pugzor
Again David, thank you so much. I might put in the level shifter because for only $5 it'll rule out potential issues with ground noise.

I was looking at Jaycar a bit further and they have a little MOSFET [www.jaycar.com.au] Seems to be a NTD5867NL which has a lower output (still a respectable 20A) but has a Rds(on) of 39 mOhms @ 10V. It's a slightly more expensive option but at $7/piece it's still economical and comes is an easier-to-mount package than a naked TO220.

Would something like that be fine rather than a IRLB8743PbF?

I don't advise it. The specification that matters is the Rds(on) at Vgs=4.5V, not 10V. For that mosfet, it's 50 mOhms maximum. With 10A drain current, that will dissipate 5W and the board will get hot. It's a shame they didn't choose a better mosfet for that board.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Sorry, only registered users may post in this forum.

Click here to login