My DigitalWrite code is not triggereing my device

@Lichtsignaal or @philmurp has his temperature sensor set up wrong (trying to read data thousands of times a second etc).

I haven’t looked too closely at the code but you state you are setting temperature manually to 0 but surely some of the triggers need to be at certain temperatures (boiling point etc)?

We have had problems with some temperature probes so until the new ones arrive we set up a simulation to generate random temperatures between -24 and +39 © using Arduino’s, not so random, random number generator.

I agree, this could be the issue. When set to 0, it seems to respond just fine :slight_smile:

an LED is superior to using high-current drawing hardware as it allows you to see what the relay is doing, just waiting to see bubbles stop bubbling off an element is not a “real-time” way of debugging code…

especially if using and switching AC loads…

but OP has not really described the hardware, so just still guessing why it ‘mysteriously’ doesn’t work…

I am using WeMos DI Mini, to power 2000W heating elements via SSR (pictured below)

@Dave1829 Your right I should have started w/ LED but jumped the gun going straight to the heating elements

@Costas I have since removed my sensor from the loop and put it into my “Brewing stuff” function at the top, so it is being called far less now.

@Lichtsignaal Are you using my full code because I am getting issues when I hit boil phase and my hop add section of code that the WeMos disconnects?

If you arent using the temperature sensor code, then that would be the only difference between what your doing and what I am, so it sounds like I need to try my code now that the sensor reading is out of the loop. Is having that mistake really something that could cause such unreliable performance? It just seemed odd because my issue is happening every time so it is a repeating issue which I wouldnt expect if having sensor readings make performance erradic I would expect random problems.

@philmurp from what you say it suggests you have bad code for certain temperature rather than a bad sensor.

If you haven’t already done it just change the code so that after the sensor reading you hard code the required temperature for the boil phase. You could tie it to a Blynk slider to increase and decrease the temperature rather than keep changing the sketch.

Serial Monitor is also your friend.

@philmurp can you perhaps post you latest code and ensure the first line starts // and then the includes should display correctly.

Just quickly, google “fotek ssr fake”

1 Like

@Dave1829 Well thats a bummer, looks like I need to check the SSR when I get home. I know this doesnt mean it isnt fake, but the manual heater on/off works consistently; but if it is a good fake I guess it will work sometimes but the reliability wont be there.

Ill do some googling tonight, but do you know any reliable places to get a SSR I know will work?

It so happens my SSR from “Fotek” (or Faketek …) arrived today but it seems to work fine. Since it does work consistently right on the manual approach I’m kind of out of options. As @Costas suggest it may be good to improve the code in a general sort of way and see what that does.

As soon as I get time, I am uploading my new code with sensor readings out of the loop, and added two blynk LED widgets to track pin status on the two heater pins. That way I can know if the arduino thinks it off but the relay is keeping it on, then it should be the relay which is the problem; and I will look to replace or other solutions.

Will post as soon as possible. Thanks again for all the input, its been a few minor bugs that have held me up this week and I want to get a nice fall beer fermenting!