3d printer head

I need some help with the code for a 3d printer temp sensor and motor. I am in the Dallas, Texas area.

bill_oelklaus: I need some help with the code for a 3d printer temp sensor and motor.

So you need help with some code that you did not post in code tags.

I am in the Dallas, Texas area.

Thanks for letting us know where you're at.. ::)

I am in the UK, near Manchester - is that useful?

Have you looked for info on the RepRap Forum where they specialize in 3D printing?

...R

No I did not post any code. I need help starting with it.

I have the file from RepRap. The problem is i do not need to control the rest of the machine.

I only need to; Get the temperature, turn on the heater when needed and advance the motor.

I can turn on the heater no problem. I am going to work on the motor, dont think it is a problem.

My big problem is getting and understanding the temperature signal.

I am trying to find the information in the RepRap ino but not sure i can. Lot of stuff.

bill_oelklaus: My big problem is getting and understanding the temperature signal.

You are not the first person to post a question on the Forum without realizing that we have no idea what you are talking about.

At the very least you need to post a link to the datasheet for the temperature sensor.

Have you written a short program just to read the temperature and display the result on the Arduino Serial Monitor.

You say you "have the file from RepRap" - what file? What does it do that you don't want it to do? Have you tried using it?

etc. etc etc.

...R

I am having a hard time finding information on the temp sensor. here is a link to where it can be purchased. http://www.gearbest.com/3d-printer-parts/pp_268310.html

the file i was referring to is the Marlin_RC ino file.

using it i can set a temp and turn on the heater. it will go to temp and stay there. works fine.

problem is the marlin file is for a full cnc machine. i only need to run the extruder. i am going thru the code trying to find the temp info. i am just very new at this and dont know it well so not sure what i am looking at always.

i am able to make things come on and off with my own code. no problem.

just need to get and understand the temperature

Marlin is a complex program. Full marks if you can figure it out and extract a useful subset from it.

I don’t see an reference to a temperature sensor on that link.

If you can find the details of the sensor it probably would be simpler just to write your own code from scratch.

Without details of the sensor I don’t know how to help.

What happens if you use Marlin and just ignore (i.e. don’t connect) the parts you don’t want?

…R

Robin,

Glad to know im not just an idiot about the Marlin.

I have been trying without any success to find information on the heat sensor.

The problem with using the Marlin code is i need to be able to tell it when to turn on and off.

Without finding the parts of the code that deal with the sensor i can not tell it to turn on or off.

Bill

Two things,

I visited the site for the extruder. There was a space at the bottom to ask questions. Post a question there to see if they will tell you what temperature sensor they are using.

I also took a look at the Marlin code, it supports thermocouples, RTDs (PT100s) and thermistors. It looks like you specify which to use when you do a build.

The temperature is then put through a PID controller to determine the output to the heater. There looked to be a good bit of protection logic in there as well.

Getting off the Marlin topic, temperature control is usually done with a PID controller (proportional–integral–derivative). It looks at the error of the temperature (process variable - pv) and the setpoint (sp). The error feeds into a formula (the PID algorithm) along with the tuning parameters to determine the change in the output. For precise temperature control, you do not turn the heater on at full and then shut it off when you get to the desired temperature (like a thermostat in the house), but instead it controls the heater using pulse width modulation (or other analog controls).

Here is a link to a PID library.

http://playground.arduino.cc/Code/PIDLibrary

I saw the place to ask a question did last friday. here is the great response.

Here is the answer from Our Customer service Team: " Hello bill, Thank you for your inquiry,we are sorry it is uncertain.Have a nice day.

what great customer service.

thanks for looking at that and i will see if i can get what i need from what you showed me.

bill_oelklaus: Robin,

Glad to know im not just an idiot about the Marlin.

I have been trying without any success to find information on the heat sensor.

The problem with using the Marlin code is i need to be able to tell it when to turn on and off.

Without finding the parts of the code that deal with the sensor i can not tell it to turn on or off.

Bill

How did you plan to send these commands to the thing you're building? Gcode is pretty good and Marlin already understands gcode. It should work just fine without any other components connected, using the complete Marlin code. You may just need to set a few options to tell it not to expect limit switches or anything.

I already have a cnc machine. Just want to add the 3d printer

I will send a command to heat and to extrude from my current controller.

bill_oelklaus: I am going to work on the motor, don't think it is a problem.

You are going to have to synchronise the feed rate with the X,Y and Z motion of the head. I don't think that will be trivial.

I suspect you will get a bundle of help with your project on the RepRap Forum. It has probably been done before.

...R

Unfortunately for you this is a chinese extruder head. Nobody knows how they assembled it, and even worse WHO is the true manufacturer of this thing. Conclusion: information about the temperature sensor, if you ever get any, will not be guaranteed to be precise or exact.

Generally the thermal sensors produce a voltage differential that is somewhat "proportional" to temperature in absolute (ie read from A0-A5 on arduino).

On this extrusion head it's just a matter of finding which pin outputs this voltage differential. Careful though, like I said it's chinese and so if they cut corners the signal will be in the operating range of the extrusion head (probably above 5V) and hence not compatible for arduino direct read.

It's probably much faster, safer, more reliable and easier to buy yourself a LM35 precision temperature sensor for less than 1$ and attach it to the thing. Power it from the arduino 5V and job is done.

a lm35 will never do the job [Rated for Full −55°C to 150°C Range] extrusion occurs at 170 to 260 c

marlin temperature probes can be one of several types of ntc thermistor or even a max6675

the temp control code is temperature.cpp,temperature.h,thermistortables.h

and called from Marlin_main.cpp

the reprap forums have many examples for custom thermistor tables and how to construct them

3d printer builder here - currently on my second one (first was mendal kit - progressively upgraded, second is my own design)

Now whilst it doesnt say by looking at the attached wires it is highly likely that the temp sensor is a 100k thermistor (two thin white wires). If it was a thermocouple these wires are normally different colours as they are polarised whereas you can connect up a thermistor either way round.

If you intend on combining the control of this into an existing cnc controller ripping a section out of Marlin will be a pain in the arse. It is highly optimised for the arduino Mega and as such can be difficult to read / understand.

To read the temperature follow this tutorial https://learn.adafruit.com/thermistor/using-a-thermistor Bear in mind you could also use the internal pullup. You can get the 100k thermistor lookup table from a google search or the temp tab of the marlin firmware (from memory - i may be wrong but it is in one of the tabs) :)

If it turns ou it is a thermocouple then you will need to buy a small breakout capable of reading a thermocouple. by trying it out as a thermistor you shouldn't damage the thermocouple so it is worth trying first.