I’m building a hand piece for engraving with a soleonid … and it get hot too quickly !
Anyone here experinented with a sensor from a heating element for a 3D printer - maybe some sample code for arduino - I want to control a mini fan for cooling the soleonid.
Keld From Denmark !
A Fairy tale country
In the North of EU
You can be very specific in an internet search for exactly what you want, for code or circuit. In your reading, you might learn to solve the cause of the problem, avoiding the symptom.
Running a fan is not just about code for the mini. You need to supply the fan with power, and control that power, either on/off or speed, if the fan has a PWM pin.
An on/off sketch could look like this...
int pinTemp = A0; // thermometer
int pinFan = 13; // on/off
void setup() {
Serial.begin(115200); // start serial comms
pinMode(pinTemp, INPUT); // configure thermometer pin
pinMode(pinFan, OUTPUT); // configure fan pin
}
void loop() {
int value = map(analogRead(A0), 0, 1023, 0, 2); // map the thermometer (0, 1023) to OFF/ON (0/1)
digitalWrite(LED_BUILTIN, value); // use the mapped value
Serial.print(value); // show the mapped value
}
Where is the solenoid located at, in the hand piece or remote. What is your assumed power source? What else are you doing besides running a fan? Which controller are you thinking of using? You can get a simple temperature for less then two packs of cigarettes.
I have some of these bigger temp sensors kind of DS18B20 but they are way to big … I’ve seen one from my 3D printer - but it looks just like 2 leads soldered together and in fact I think they are - but how can it be read by Mr.Arduino … I don’t know how the SW in the 3D-printer manage to read the temperature.
You say “Power to the fan’ … yeah, but we’re talking about a 20X20X6mm 5V fan to be incoorporated in the hand piece for engraving - I think it can be driven directly from the Arduino.
No. Size has nothing to do with power required. Find the specifics for the fan and a power supply circuit the right size for the fan. Arduino is a controller to control the fan.
Thermocouples can look like that. Usually spotwelded together. In any case you will require an instrumentation amplifier to bring the voltage up to something your Arduino can read.
Glass bead thermistors are available in many base resistance values and sizes (some even microscopic) from specialty companies and most suppliers of electronic components.
I doubt OP needs an accurate temp for that solenoid. "Almost too hot" might be enough.
A bead thermistor does not need additional hardware and is good enough to give you temps within a couple of degrees.
Leo..
I think you are curing the symptom and not the cause.
If the solenoid is geing hot then maybe it is not the correct type, or you are using to high a voltage or your duty cycle is too high.
Nonesense. Industrial solenoids run continuously for days on end! Use a solenoid designed for that service and use a proper hear sink. Another option is to use 4X the rated voltage for 1/4 the time. Get the armature to move as quickly as possible and cut the current very quickly. I have had equipment run 32 volt solenoids at 100 volts DC for years. One could fire about once a second.