Home | Community | Message Board

The Spore Depot
This site includes paid links. Please support our sponsors.


Welcome to the Shroomery Message Board! You are experiencing a small sample of what the site has to offer. Please login or register to post messages and view our exclusive members-only content. You'll gain access to additional forums, file attachments, board customizations, encrypted private messages, and much more!

Shop: Myyco.com Golden Teacher Liquid Culture For Sale   North Spore North Spore Mushroom Grow Kits & Cultivation Supplies

Jump to first unread post Pages: | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
Some of these posts are very old and might contain outdated information. You may wish to search for newer posts instead.
Re: !!Arduino programer needed!! [Re: bogdancev]
    #26273052 -

Here are the relays I ordered that will be here Friday. Both are 5v..

https://www.amazon.com/gp/product/B07NWD8W26/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1

These I have now but I will wait on the 15 amp because as I said my pump is 11.5 amp...

https://www.amazon.com/gp/product/B07M88JRFY/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

Extras: Filter Print Post Top
Re: !!Arduino programer needed!! [Re: SHROOMSISAY01]
    #26273059 -

I just realized I got the wrong relay these are dc out put.

Extras: Filter Print Post Top
Re: !!Arduino programer needed!! [Re: SHROOMSISAY01]
    #26273068 -

About top link, that relay is based on 2 MOSFETs, it is so called "solid state relay". Board looks scary, I'm just wondering what happens if one of the MOSFETs fails (which they do), It might send your high side power into your Arduino and you will observe spectacular magic smoke and worse -- fire.

Board has no protection. To use it you better need separate power supply and opto-isolation for control signal.

It is opposite to mechanical relays, it they fail -- they just don't work. But they do not send your high side into your lower side.

Extras: Filter Print Post Top
Re: !!Arduino programer needed!! [Re: SHROOMSISAY01]
    #26273070 -

I canceled the 15 amp relays since they won't work I will just leave the 2nd relay in there. I installed the 15 amp relay originally because the humidity controller I was using was only rated for 10 amp.

Extras: Filter Print Post Top
Re: !!Arduino programer needed!! [Re: bogdancev]
    #26273071 -

bogdancev said:
About top link, that relay is based on 2 MOSFETs, it is so called "solid state relay". Board looks scary, I'm just wondering what happens if one of the MOSFETs fails (which they do), It might send your high side power into your Arduino and you will observe spectacular magic smoke and worse -- fire.

Board has no protection. To use it you better need separate power supply and opto-isolation for control signal.

It is opposite to mechanical relays, it they fail -- they just don't work. But they do not send your high side into your lower side.



They won't work any way they were for VDC. I am glad you asked the question. It made me look closer at what I bought.

Extras: Filter Print Post Top
Re: !!Arduino programer needed!! [Re: bogdancev]
    #26273072 -

OK, then I suggest we first do a fixed set-points in ambient range so we could breath on the sensor to reach them.
We will connect that relay and see (hear) if it clicks.
Then we will do buttons.

Extras: Filter Print Post Top
Re: !!Arduino programer needed!! [Re: bogdancev]
    #26273082 -

Sounds good at least I don't have to wait on relays now since I already have them. LOL.

Extras: Filter Print Post Top
Re: !!Arduino programer needed!! [Re: bogdancev]
    #26273086 -

I will use pin D0, so you can connect signal of your relay to it, connect ground and +5V.
For that I would probably use 3-pin connector similar to 4-pin I have used already on the board.

I will be able to quickly write the code but you will have to test it as I'm currently not at home.
Will be home on Sunday.

Extras: Filter Print Post Top
Re: !!Arduino programer needed!! [Re: bogdancev]
    #26273403 -

Here is the code.
On top two set-points are defined for when to switch on and off the relay.
Currently are set to 40 and 50 so you could breath onto the sensor and see how it works.
It gives hysteresis of 10 so no jitter occurs.

Code:

#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

//Uncomment if you are in USA
//#define Fahrenheit

#define LOW_LIMIT 40;
#define HIGH_LIMIT 50;

//Relay must be connected to pin 0
const int RELAY = 0;

//CRC-8 (x^8 + x^5 + x^4 + 1) lookup table
static const byte CRC_8_TABLE[256] =
{
0x00, 0x31, 0x62, 0x53, 0xC4, 0xF5, 0xA6, 0x97, 0xB9, 0x88, 0xDB, 0xEA, 0x7D, 0x4C, 0x1F, 0x2E,
0x43, 0x72, 0x21, 0x10, 0x87, 0xB6, 0xE5, 0xD4, 0xFA, 0xCB, 0x98, 0xA9, 0x3E, 0x0F, 0x5C, 0x6D,
0x86, 0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 0xBD, 0x8C, 0xDF, 0xEE, 0x79, 0x48, 0x1B, 0x2A,
0xC1, 0xF0, 0xA3, 0x92, 0x05, 0x34, 0x67, 0x56, 0x78, 0x49, 0x1A, 0x2B, 0xBC, 0x8D, 0xDE, 0xEF,
0x82, 0xB3, 0xE0, 0xD1, 0x46, 0x77, 0x24, 0x15, 0x3B, 0x0A, 0x59, 0x68, 0xFF, 0xCE, 0x9D, 0xAC
};

Adafruit_SSD1306 display(128, 32, &Wire, 4);
float result, low, high;
unsigned int rawResult;
byte bufferRaw[3], CRC;
int index, relayOutput;

void setup() {
pinMode(RELAY, OUTPUT);
low = LOW_LIMIT;
high = HIGH_LIMIT;
relayOutput = 0; //Default is off

Wire.begin();
Wire.setClock(10000);

display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
display.clearDisplay();
display.setTextSize(2);
display.setTextColor(WHITE);
display.cp437(true);
}

void loop() {
display.clearDisplay();
getRH();

if(low > result) relayOutput = 1;
if(high < result) relayOutput = 0;

getTemperature();
display.display();
digitalWrite(RELAY, relayOutput);
delay(700);
}

void getRH() {
//Triggering RH measurement
Wire.beginTransmission(0x40);
Wire.write(0xE5);
Wire.endTransmission();

//Requesting result (3 bytes: 2 bytes for value and 1 for checksum)
Wire.requestFrom(0x40, 3);
index = 2;
while(Wire.available()) {
bufferRaw[index] = Wire.read();
if(0 == index) {
//Trying to display result if it's correct
showRH();
break;
}
index--;
}
}

void getTemperature() {
//Triggering temperature measurement
Wire.beginTransmission(0x40);
Wire.write(0xE3);
Wire.endTransmission();

//Requesting result (3 bytes: 2 bytes for value and 1 for checksum)
Wire.requestFrom(0x40, 3);
index = 2;
while(Wire.available()) {
bufferRaw[index] = Wire.read();
if(0 == index) {
//Trying to display result if it's correct
showTemperature();
break;
}
index--;
}
}

void showRH() {
display.setCursor(0, 0);
if(checkChecksum(bufferRaw[2], bufferRaw[1], bufferRaw[0])) {
rawResult = (bufferRaw[2] << 8) | (bufferRaw[1] & B11111100);
result = rawResult * 125.0 / 65536.0 - 6.0;
display.print("RH:");
display.print(result, 1);
display.print("%");
}
else
display.print("RH: error");
}

void showTemperature() {
display.setCursor(0, 16);
if(checkChecksum(bufferRaw[2], bufferRaw[1], bufferRaw[0])) {
rawResult = (bufferRaw[2] << 8) | (bufferRaw[1] & B11111100);
result = rawResult * 175.72 / 65536.0 - 46.85;

#ifdef Fahrenheit
result = result * 1.8 + 32.0;
#endif

display.print(" T:");
display.print(result, 1);

#ifdef Fahrenheit
display.print("F");
#else
display.print("C");
#endif
}
else
display.print("Temp: error");
}

bool checkChecksum(byte MSB, byte LSB, byte checksum) {
CRC = 0;
CRC = CRC_8_TABLE[CRC ^ MSB];
CRC = CRC_8_TABLE[CRC ^ LSB];
if(CRC == checksum) return true;
return false;
}



Please check how it works as I won't be able to do it until Sunday.

Extras: Filter Print Post Top
Re: !!Arduino programer needed!! [Re: bogdancev]
    #26273551 -

Setup screen idea (please tell what you think)



We need 4 buttons:
-- Setup button changes the screen from showing readings to this screen and back. When changing back, values are saved.
-- Select button moves arrow on the right of the screen that indicates which H or L values are being changed.
-- Up and Down buttons increase or decrease value to which arrow is pointed.

There is just enough space on the bottom of the shield to solder 4 buttons evenly and nicely.

Extras: Filter Print Post Top
Re: !!Arduino programer needed!! [Re: bogdancev]
    #26273637 -

Man, this is awesome!! I got the shield so I am going to start putting things together.

Extras: Filter Print Post Top
Re: !!Arduino programer needed!! [Re: bogdancev]
    #26273676 -

I used exactly this set of wires from Amazon. Had to import it.

Extras: Filter Print Post Top
Re: !!Arduino programer needed!! [Re: bogdancev]
    #26273704 -

I just picked up some thermostat wire from a local store it is 18 gauge but it was like $1.75 for 2 feet of 8 wire so I have plenty of colors...

https://www.lowes.com/pd/Southwire-18-AWG-8-Conductor-Thermostat-Wire-By-the-Foot/3378010

Extras: Filter Print Post Top
Re: !!Arduino programer needed!! [Re: SHROOMSISAY01]
    #26274890 -

I ruined the oled so I am waiting on a replacement.

Extras: Filter Print Post Top
Re: !!Arduino programer needed!! [Re: SHROOMSISAY01]
    #26276096 -

So, how is the progress? I'm bored. My in-laws drive me cray.

Extras: Filter Print Post Top
Re: !!Arduino programer needed!! [Re: bogdancev]
    #26276809 -

Well, my soldering has gone to shit. I use to solder good but I can't solder very well anymore. I Think it was the tip in the new solder station. I changed it to a better one and things are going better. But I ruined the OLED screen tring to desolder it.

Extras: Filter Print Post Top
Re: !!Arduino programer needed!! [Re: SHROOMSISAY01]
    #26280066 -

Looked around for buttons, found 2 big and 2 small. Added 4-pin header to pins D10-D13.


Soldered everything together with blue wires. One side of each button is connected to ground, another to D10, D11, D12 and D13.


Put shield back on (4 the same buttons would look nicer).

Extras: Filter Print Post Top
Re: !!Arduino programer needed!! [Re: bogdancev]
    #26280239 -

Just discovered that onboard LED is connected to pin D13, so it cannot be used for a button (or at least in a manner I want).
So I added extra header pin and moved MODE button connection to pin D9 instead.


Extras: Filter Print Post Top
Re: !!Arduino programer needed!! [Re: bogdancev]
    #26281037 -

Man, I am impressed. You make this seem so easy. I will be getting everything on Tuesday to start over. I wish I understood this more. I keep watching Arduino videos but I am not learning anything. I guess it is either over my head or I am not watching the right videos. I want to learn to do this in the future but I don't know where to start.

Extras: Filter Print Post Top
Re: !!Arduino programer needed!! [Re: SHROOMSISAY01]
    #26281363 -

If you have particular questions, then ask.
I will try to finish code today so we can completely focus on the sensor.

Edited by bogdancev (10/28/19 01:36 AM)

Extras: Filter Print Post Top
Jump to top Pages: | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |

Shop: Myyco.com Golden Teacher Liquid Culture For Sale   North Spore North Spore Mushroom Grow Kits & Cultivation Supplies


Similar ThreadsPosterViewsRepliesLast post
* I need some type of medicinal mushroom... Ichydai 4,668 12 10/15/02 07:14 AM
by Anonymous
* Help! Pure agar cultures needed. Some trades available! Basidiocarp 4,442 17 01/26/04 07:53 AM
by ChromeCrow
* We need one or two mods for this forum. ThorA 1,728 12 09/26/02 11:51 AM
by psyconaut
* In need of pink oyster spores colors 3,301 7 09/07/02 07:28 PM
by colors
* i need a pic of a yellow morel plate please ChromeCrow 2,310 10 11/22/03 11:11 AM
by FocusHawaii
* Gourmet/Edible Cultures Needed. Joshua 2,127 6 02/10/04 02:42 AM
by Zen Peddler
* Just Recieved Cultures - need ID Joshua 1,513 15 03/10/04 12:50 PM
by Joshua
* Advice Needed For Sending Cultures Jackal 2,122 14 03/26/03 06:10 PM
by FocusHawaii

Extra information
You cannot start new topics / You cannot reply to topics
HTML is disabled / BBCode is enabled
Moderator: RogerRabbit, cronicr, Pastywhyte, Forrester, Stromrider, SHROOMSISAY01
7,504 topic views. 1 members, 41 guests and 5 web crawlers are browsing this forum.
[ Show Images Only | Sort by Score | Print Topic ]
Search this thread:

Copyright 1997-2026 Mind Media. Some rights reserved.

Generated in 0.03 seconds spending 0.008 seconds on 17 queries.