I would like to use the LeoStick with an output connected to a Solid State Switch as a motor speed control, with speed increased or decreased, dependent on measured temperature. I plan to use a thermocouple as the sensor.
Has anyone done this and uploaded the sketch to share?
Tony
Using LeoStick to drive Solid State Switch
-
- Posts: 7
- Joined: Mon Jun 29, 2015 2:37 pm
Re: Using LeoStick to drive Solid State Switch
Not really relevant to your actual question, but what motor are you driving, and what solid state switch? Just asking as most things marketed as a "solid state switch/relays" are usually designed for operation on AC power, and not many are actually interchangeable between AC and DC.
You code could be as simple as one line:
Where mintemp is the lowest value you expect from the thermocouple, max is the highest, and 0-255 is your range of motor speeds, from off to full.
So if you wanted your fan to go from off to full speed over the temperature range of 20-40C, you'd do:
Or if you always wanted the fan running even at the lowest temperature, you can increase it's minimum speed value:
etc.
You code could be as simple as one line:
Code: Select all
analogWrite(switchPin, map(temperature,mintemp,maxtemp,0,255));
So if you wanted your fan to go from off to full speed over the temperature range of 20-40C, you'd do:
Code: Select all
analogWrite(switchPin, map(temperature,20,40,0,255));
Code: Select all
analogWrite(switchPin, map(temperature,20,40,50,255));
-
- Freetronics Staff
- Posts: 853
- Joined: Tue Apr 09, 2013 11:19 pm
- Location: Melbourne, Australia
- Contact:
Re: Using LeoStick to drive Solid State Switch
Hi Tony,
As per Things' comment, can you give any more details about the motor and the switch that you plan to use?
Angus
As per Things' comment, can you give any more details about the motor and the switch that you plan to use?
Angus
Re: Using LeoStick to drive Solid State Switch
I've successfully pulse width modulated an AC fan using a solid state relay before, but you need to do it very slowly (1Hz tops), so it only really works with motors with enough inertia. That said it's still not ideal and I wouldn't recommend it for anything but hobby projects, and only then if you really have to. It's much nicer on the motor too if you get a switch with zero crossing detection as it won't turn on the motor at peaks in the sine wave .. but not an issue with a DC motor.
-
- Posts: 7
- Joined: Mon Jun 29, 2015 2:37 pm
Re: Using LeoStick to drive Solid State Switch
I am using it to drive an AC fan (240V 80W induction motor with run capacitor). I have been using a Light dimmer (600W rating) to manually control it's speed, but would like to remove the manual intervention. I have a solid state switch which will take a DC signal and use it to turn on AC current. The range of control is between 25 and 50% of full speed operation. I wanted a 40W 240VAC fan but couldn't get one at the time, so I bought the 80W, and now need to use it.
This will be part of a burner control system where the fan speed will follow the fuel rate by a predetermined delay (probably around 2 minutes)
The max fuel flow will be set by a needle valve and a minimum fuel flow by another. The idea is to switch between the 2 valves to control the temperature. The fan settings on high fuel will need to be changed to optimise the emissions.
I also considered using an O2 sensor from an automotive application as the data source for fan speed control, but I am just learning and I need to make something first, then modify it to better meet my needs.
Thanks for your support,
Tony
This will be part of a burner control system where the fan speed will follow the fuel rate by a predetermined delay (probably around 2 minutes)
The max fuel flow will be set by a needle valve and a minimum fuel flow by another. The idea is to switch between the 2 valves to control the temperature. The fan settings on high fuel will need to be changed to optimise the emissions.
I also considered using an O2 sensor from an automotive application as the data source for fan speed control, but I am just learning and I need to make something first, then modify it to better meet my needs.
Thanks for your support,
Tony
-
- Freetronics Staff
- Posts: 853
- Joined: Tue Apr 09, 2013 11:19 pm
- Location: Melbourne, Australia
- Contact:
Re: Using LeoStick to drive Solid State Switch
Hi Tony,
This sounds like a fairly complex control system project. I don't mean to discourage you, but if this is one of your first electronics/Arduino projects then you may want to consider starting with something simpler and working your way towards more complex projects.
A solid state switch is quite different to a lighting dimmer, in terms of operation. Speed controlling an SSR with very slow switching speed, as suggested by Things, may be an option for you. Just using the Arduino "analogWrite" function for PWM output will not work, and will probably damage something.
Remember to have anything that you're connecting to mains verified and tested by a professional before plugging it in.
Angus
This sounds like a fairly complex control system project. I don't mean to discourage you, but if this is one of your first electronics/Arduino projects then you may want to consider starting with something simpler and working your way towards more complex projects.
A solid state switch is quite different to a lighting dimmer, in terms of operation. Speed controlling an SSR with very slow switching speed, as suggested by Things, may be an option for you. Just using the Arduino "analogWrite" function for PWM output will not work, and will probably damage something.
Remember to have anything that you're connecting to mains verified and tested by a professional before plugging it in.
Angus