Page 1 of 1

Using LeoStick to drive Solid State Switch

Posted: Tue Jul 07, 2015 3:03 pm
by Tony From West Oz
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

Re: Using LeoStick to drive Solid State Switch

Posted: Wed Jul 08, 2015 12:51 am
by Things
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:

Code: Select all

analogWrite(switchPin, map(temperature,mintemp,maxtemp,0,255));
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:

Code: Select all

analogWrite(switchPin, map(temperature,20,40,0,255));
Or if you always wanted the fan running even at the lowest temperature, you can increase it's minimum speed value:

Code: Select all

analogWrite(switchPin, map(temperature,20,40,50,255));
etc.

Re: Using LeoStick to drive Solid State Switch

Posted: Wed Jul 08, 2015 1:09 am
by angusgr
Hi Tony,

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

Posted: Wed Jul 08, 2015 1:51 am
by Things
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.

Re: Using LeoStick to drive Solid State Switch

Posted: Wed Jul 08, 2015 10:33 am
by Tony From West Oz
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

Re: Using LeoStick to drive Solid State Switch

Posted: Thu Jul 09, 2015 7:13 am
by angusgr
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