<div dir="ltr">Craig,<div><br></div><div>You can still power the cooling fan from the AC power (dropped by the smaller heater coil) and use PWM to control the fan speed while isolating the Arduino from the AC line if you want. There are actually a few ways to it, two described below.</div><div><br></div><div>You could use a transistor output optoisolator to pull the gate of an N-FET MOSFET up to turn it on (remember to include an appropriately sized pulldown resistor to turn the gate off). </div><div><a href="https://electronics.stackexchange.com/questions/294744/mosfet-switch-using-an-optocoupler">https://electronics.stackexchange.com/questions/294744/mosfet-switch-using-an-optocoupler</a> </div><div><br></div><div>The 4N25 is a common choice but is rated for use up to only 30 volts while the HCPL-181 looks to be around the same price and is rated for up to 80 volts.</div><div><a href="https://www.digikey.com/product-detail/en/broadcom-limited/HCPL-181-00BE/516-1787-1-ND/1966493">https://www.digikey.com/product-detail/en/broadcom-limited/HCPL-181-00BE/516-1787-1-ND/1966493</a>  <br></div><div><br></div><div>Or you could use a Photovoltaic output optoisolator to drive the gate of an N-FET MOSFET. The device below includes additional circuitry to speed up the turn off of the FET to better support PWM. The extra speed is unlikely to be needed for controlling a heater, particularly when you consider the thermal mass of the beans being roasted, but it is nice to know that you have faster PVI isolation options. </div><div><a href="https://www.digikey.com/product-detail/en/vishay-semiconductor-opto-division/VOM1271T/VOM1271TCT-ND/3588699">https://www.digikey.com/product-detail/en/vishay-semiconductor-opto-division/VOM1271T/VOM1271TCT-ND/3588699</a>  <br></div><div><a>http://www.vishay.com/docs/83469/vom1271t.pdf</a><br></div><div><br></div><div>Either option would require the addition of an anti-kickback diode, or recirculation diode, to be installed reverse biased across the fan motor leads to capture and redirect the current spike from the motor when the MOSFET is turned off.</div><div><br></div><div><div><img src="cid:ii_k4w6jlpz0" alt="MosMot1.png" width="226" height="234"><br></div></div><div>Let me know if you have any questions about implementing any of the ideas mentioned. Good luck with your project! </div><div><br></div><div>Shane</div><div><br></div><div><br></div><div><br></div><div><br></div><div> <br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 1, 2020 at 8:27 PM Craig Cook via TriEmbed <<a href="mailto:triembed@triembed.org">triembed@triembed.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">>Oh wow, that totally slipped past me when I looked at it last.  That <br>
won't work because the Arduino's power supply is isolated (and that's a <br>
very good thing).  "GND" in your circuit is an isolated GND; there's no <br>
path through the MOSFET back to the neutral AC line.  The motor just <br>
won't run at all.<br>
<br>
Ah, I guess that's why the instructables version did not do this, it's why they used a dedicated DC supply for the fan.<br>
<br>
Getting the fan to work with AC may be a version 2 improvement. It's not as easy as I thought.<br>
<br>
>"Bresenham algorithm"<br>
<br>
I'll skip this as well.<br>
<br>
>Of course, since you're using an Arduino, you could also do some datalogging,<br>
<br>
Yes. That's what I'm working on now. Getting a ESP8266-01 working. I want to connect the system to my home wifi and send data to my desktop to create trend graphs. I want to see current temperature of the thermistor, roast start and end time, each time the SSR starts and stops, etc. I may add a DHT temperature sensor as well to see the current outside air temp to see how it affects roasting time.<br>
<br>
After about a year of using of the roaster the beans get over roasted (shortly after that the unit fails and the heater coil breaks). I suspect it is due to the fan motor getting worn out and not cooling the chamber. If I can graph the data for each roast I should see a trend over a few months. I suspect the roasting time will start getting longer when the fan gets worn out.<br>
<br>
Using the SSR should extend the unit's life.<br>
<br>
If I get all of this working after the next unit failure I may be able to predict when I need to order a spare popcorn maker.<br>
<br>
>I might have been too terse in describing what I meant.  The 10k pulling<br>
the SSR input to GND should stay, and a 250-ohm resistor should gobetween the SSR input and the Arduino pin<br>
<br>
Ah, I think I have it correct now. Updated the pdf and kicad files.<br>
<br>
Thanks<br>
<br>
Craig<br>
<br>
_______________________________________________<br>
Triangle, NC Embedded Computing mailing list<br>
<br>
To post message: <a href="mailto:TriEmbed@triembed.org" target="_blank">TriEmbed@triembed.org</a><br>
List info: <a href="http://mail.triembed.org/mailman/listinfo/triembed_triembed.org" rel="noreferrer" target="_blank">http://mail.triembed.org/mailman/listinfo/triembed_triembed.org</a><br>
TriEmbed web site: <a href="http://TriEmbed.org" rel="noreferrer" target="_blank">http://TriEmbed.org</a><br>
To unsubscribe, click link and send a blank message: mailto:<a href="mailto:unsubscribe-TriEmbed@bitser.net" target="_blank">unsubscribe-TriEmbed@bitser.net</a>?subject=unsubscribe<br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><table style="max-width:600px;direction:ltr">
                        <tbody><tr><td> 
                         <table style="max-width:470px;padding-bottom:10px;margin-bottom:8px" border="0" cellspacing="0" cellpadding="0"> <tbody><tr> <td>  <table border="0" cellspacing="0" cellpadding="0" width="470" style="width:470px"> <tbody><tr valign="top"> <td style="width:10px;padding-right:10px"> <img src="https://d36urhup7zbd7q.cloudfront.net/90c0bf9d-3fff-46c1-b0e0-2d6ec5d88108/ShaneBioPhotoCroppeddeleted19624a8551057e0d6dc353501de57e4d.crop_1536x2003_430,259.preview.format_png.resize_200x.jpeg#logo" width="65" height="84.7623697917" alt="photo" style="border-radius: 0px; width: 65px; height: 84.7624px; max-width: 120px;"> </td> <td style="border-right:1px solid rgb(69,102,142)"></td> <td style="text-align:initial;font:12px Arial;color:rgb(100,100,100);padding:0px 10px"> <div style="margin-bottom:5px;margin-top:0px"><b>Shane D Trent</b><br> <span>Patent Agent</span> </div> <table style="width:470px;margin-top:5px" width="470" border="0" cellspacing="0" cellpadding="0"> <tbody><tr> <td style="color:rgb(141,141,141);font-size:12px"> <p style="margin:0px"> <a href="tel:919-348-0061" style="color:rgb(141,141,141);text-decoration:none;font-family:sans-serif" target="_blank">919-348-0061</a>  <span style="color:rgb(69,102,142);display:inline-block">|</span> <span style="display:inline-block"><a href="mailto:shanedtrent@gmail.com" style="color:rgb(141,141,141);text-decoration:none;font-family:sans-serif" target="_blank">shanedtrent@gmail.com</a></span> </p> </td> </tr> <tr> <td style="color:rgb(141,141,141);font-size:12px">  <p style="margin:0px"> <span style="white-space:nowrap;display:inline-block"><a href="http://ShaneTrent.com" style="color:rgb(141,141,141);text-decoration:none;font-family:sans-serif" target="_blank">ShaneTrent.com</a></span>  <span style="color:rgb(69,102,142);display:inline-block">|</span> <span style="display:inline-block"><span style="color:rgb(141,141,141)">Skype: <a href="#SignatureSanitizer_SafeHtmlFilter_" style="text-decoration:none;color:rgb(141,141,141);font-family:sans-serif">skype:shane.trent1</a></span></span>  </p> </td> </tr> <tr> <td style="color:rgb(141,141,141);font-size:12px;font-family:sans-serif"> <span style="color:rgb(141,141,141);display:inline-block;font-family:sans-serif">Raleigh, North Carolina</span> </td> </tr> </tbody></table> <div style="margin-top:10px"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr style="padding-top:10px"><td align="left" style="padding-right:5px;text-align:center;padding-top:0px"> <a href="http://www.linkedin.com/in/shanetrent" target="_blank"><img src="https://cdn.gifo.wisestamp.com/social/linkedin/0077b5/16/0.png"></a></td><td align="left" style="padding-right:5px;text-align:center;padding-top:0px"> <a href="http://twitter.com/sdtrent" target="_blank"><img src="https://cdn.gifo.wisestamp.com/social/twitter/55acee/16/0.png"></a></td></tr></tbody></table></div> </td> </tr> </tbody></table> </td> </tr> </tbody></table> <table cellpadding="0" cellspacing="0" border="0"><tbody><tr><td></td></tr></tbody></table></td></tr></tbody></table>
                        <div href="http://WS_promo" style="width:auto;padding-top:2px;font-size:10px;border-top:1px solid rgb(238,238,238);margin-top:10px;display:table;direction:ltr;line-height:normal;border-spacing:initial">
        <div style="padding-top:2px">
                <a href="https://www.wisestamp.com/signature-in-email/?utm_source=promotion&utm_medium=signature&utm_campaign=create_your_own" style="color:rgb(0,0,0);text-decoration:none" target="_blank">Create your own <span style="color:rgb(165,3,16)">email signature</span></a>
        </div>
</div>
                        
                
        </div>