Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Electronics Schema #4

Open
greghesp opened this issue Dec 29, 2020 · 13 comments
Open

Electronics Schema #4

greghesp opened this issue Dec 29, 2020 · 13 comments

Comments

@greghesp
Copy link

Do you have a wiring diagram/ scheme for the electronics part?
The software side is simple for me to understand, but the hardware side I'm not so sure on

@willblev
Copy link
Owner

willblev commented Dec 29, 2020

Hi @greghesp,

I originally intended to upload a diagram/schematic after I got everything working smoothly, but I never got around to it! I doubt that I'll be able to upload a schematic the repo for a while, as I'm not in the same location as Smokey... but if you're interested in making your own, I'd be happy to help figure everything out.

From the code, we can start to see where the different components are connected to the WeMos D1 mini:

int fanControlpin = D0;
int const thermoSOpin = D6; // pin D6  *MISO*
int const thermoSCKpin = D5;  // pin D5 *CLK*
int const probe_A_CSpin = D1;  // 
int const probe_B_CSpin = D2; // 
int const probe_C_CSpin = D3; //  
int const probe_D_CSpin =D4; // 
int const probe_E_CSpin = D7; //  

As far as I can remember (I'm not able to open it and snap photos as previously mentioned), the thermocouples are all sharing a common connection to D6 (MISO) and D5 (CLK), then each of the thermocouples' CS pins are connected to a different pin on the WeMos. I think that the fanControlpin is wired directly to the PWM input lead of the fan, as the fan model I used could accept a range of voltages on this input so I didn't have to do anything fancy.

Do you already have the components?

@greghesp
Copy link
Author

I've got them similar components on order, just waiting for them to arrive.

I've got a NodeMCU rather than a D1 mini, although that should make little difference, and I've ordered some MAX31865 amplifiers. Very similar setup from what I can tell though

@willblev
Copy link
Owner

willblev commented Dec 29, 2020 via email

@greghesp
Copy link
Author

greghesp commented Jan 8, 2021

Im running a NodeMCU, but U cant even get the MAX31865 example code to upload. Seems when the max's are connected, it fails

@willblev
Copy link
Owner

willblev commented Jan 9, 2021

Hi again!

So if I have understood correctly, you are using this model of ESP8266-based microcontroller:
image
You can find some more details about the different functions of each pin in the NodeMCU here .

My build/code uses the WeMos D1 mini, which looks like this:
image

Both boards should be able to run the code, with minor changes such as the names of the pins in the code. You should note that the name of the pin you need to use in the Arduino IDE is not always what you may expect, so look this up for your MCU. You may need to map out on paper the allocation of each pin to each component, as you may have conflicts (e.g. you run out of PWM capable GPIOs to run the blower fan if you use the wrong one of the two possible MOSI pins).

I opened up my temperature controller to try and figure out how I have everything wired, but unfortunately I was quite generous with the hot glue, so I couldn't get any good pictures. What I CAN see, is that the MAX31865 share some common connections (SCK, MISO, MOSI) like is shown here:
image

I would recommend that you first try connecting just one thermocouple and get the example code running with that, then try scaling up piece by piece. Hope this helps you to move forward!

@greghesp
Copy link
Author

greghesp commented Jan 9, 2021

Sorted! I had to strip back your code and build it up from scratch selecting what I needed using the MAX31865 library, but I've managed to get the temperatures to read out from both probes now :)

In your readTempSensors function, what's the reason for the calculation to set the temperature?

foodTemperature_Last = (2 * foodTemperature_Last + foodTemperature)/3;

Wouldn't it just be foodTemperature_Last = foodTemperature

@willblev
Copy link
Owner

willblev commented Jan 9, 2021

Glad to hear that you got it working! You can change the aforementioned line if you want; I think my intention was to smooth the values to avoid turning off everything prematurely due to one high reading. Sort of like a weighted average of the last few readings.

@greghesp
Copy link
Author

greghesp commented Jan 9, 2021

Out of interest, how are you powering it and doing the 12v to 3v? I've got some buck converters from my 3d printer, but they seem a little big and excessive for this xD

@willblev
Copy link
Owner

willblev commented Jan 9, 2021 via email

@greghesp
Copy link
Author

Seems the NodeMCU outputs 3v, so have bought a cheap 3v to 12v setup

@willblev
Copy link
Owner

willblev commented Jan 10, 2021 via email

@greghesp
Copy link
Author

Makes sense, its a 12v 3a fan. Ideally I'd like to power this via USB from a power bank (Micro, Mini, USB C) but I cant seem to find anything to handle this

@willblev
Copy link
Owner

willblev commented Jan 10, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants