Get your Geek on and control your grow room with Arduino!

ChiefRunningPhist

Well-Known Member
You can add an sd card really easily with only a few resistors dividers to change the 5v to 3v and a zener diode to provide a 3.3v supply. 4MB should be fine if you just store the data you need and generate the table on the fly (see below). It also might be easier to just store the data you need rather than the whole chart; in my app a weeks worth of temp and humidity measurements from one sensor with one point for every five minutes takes up less than 4kB.


HTML is static content, to display dynamic content you would probably need java, javascript, or maybe php. If you really want to store the whole chart then you could run a php server and use prebuilt libraries to just display the chart. Your code would only really consist of adding data to the file. Alternatively you could just provide the data and let the user display it (through a static web page with javascript - I think javascript would be enough for your purposes).

I have used appinventor in the past to create low/no effort android apps, but a web page is more flexible.


It's just backup. If there's a brownout or some sort of program crash then the fans keep running and the lights stay on/off as required. (edit: see TimeZone's comment about the pi hanging sometimes) Basically I just want to move two clicky timers, three switches, two potentiometers, three thermometers (12 aaa batteries a year!) and one fan controller all to one box. Having it be able to adjust settings for me is icing on the cake.
Thanks, and that sounds like an efficient project! I've since realized I can condense much of the data set and have started to design with JS. We'll see how it goes lol

Referencing this video on the procedure.
Ill have to look into how to reference values that are being input on the html page for the JS chart to use, but just getting familiar atm.
 
Last edited:

OldMedUser

Well-Known Member
Yes. Essentially, in very general terms, you delete (by overwriting) the old sketch when you upload a new one.

As far as moving off of the breadboard, take your time. Remember that the rows on the breadboard are connected together, which is unlike the protoboard. I'm sure you have many spare boards, so strip a bunch of wire, and do a bunch of test soldering before you start soldering real components to your prototype. Ensure you get some practice with connecting the through-holes together where components need to be in the same path.

Solder your components to the board in order. For example, get the LM334 in place. Then do a resistor, then connect the LM leg to the resistor by soldering the through holes together (if you don't use the pre-connected holes). Then do a continuity test from the LM leg to the far end of the resistor to ensure solid contact between the components. Do this for every solder joint. It's easier to find now than it is after you've done everything and you're scratching your head as to why it won't work.

Triple check that you're putting your components in place in the proper direction (diode for example). Ensure that you're putting the proper resistor in its required space.

The two long strips in the middle of the board are typically used for your + and - rails. Utilize them to minimize soldering. Utilize the already-linked 2 and 4 hole strips to your advantage. For example, a 3-hole strip can be used to interconnect the middle (from your picture's perspective) leg of the LM to the resistors. A two-hole can be used for the LM leg to power-rail. This minimizes the number of interconnections you must solder by hand by connecting the through holes (which can get awful messy and prone to failure).

Document the whole thing out on paper before you begin. More than once if you have to. The idea is to maximize the benefits of the board, and reduce the number of interconnects you have to solder yourself. Once you've drawn it by hand once, flip that paper over and do it again without looking, then compare the two. Are they the same? Good, you're on your way! Are they different? Do it a third time, then compare them all together and take the good from each one.
Thanks for all the great advice man. At this point I'm mainly concerned with it all being lined up so it works. Pretty can come later but I will definitely take you points about how to connect everything neatly into consideration and will either have this page open for reference or print it out.

:peace:
 

OldMedUser

Well-Known Member
Good work on getting arduino IDE installed. That's kinda meticulous but you'll not have to do again. Also, if you loaded the "blink" sketch, everytime you give power to the esp, the blink sketch will run. If you want it to stop then you'd load up a blank sketch or a new sketch. The esp runs whatever its been sent as long as it has power. If you want it to do something else then send it something else to loop, ie a blank sketch will loop nothing lol. You may need to have a few default lines, ie void setup () - void loop (), but you may not, I've never loaded a blank sketch, just loaded new sketches over old sketches.

Your LM334 is backwards. You've got the positive rail from the breadboard going into the negative terminal of the LM334. When you look at it with the flat side up, + is on the left, - on the right.
When I first plugged the Arduino in Windoze popped up with the usual 'installing drivers for new device' and shortly after the onboard LED started blinking which they say means the board is working properly so that was easy enough. Went to bed at 4am reading the Getting started with Sketches book instead of Stephen King. lol

The kit has all sorts of sensors, parts, motors etc for me to practice with. Think I'll skip the blinking LED #1 project as I feel I'm beyond that already. ;)

About that LM334. I've double, tripple and now quadruple checked it and I'm 95% certain it's oriented properly. According to your diagram and the one on the sheet with the schematic I'm set up right. Looking from the bottom, (legs pointing toward me), and the flat side up I have the + leg connected to + rail and it's the one on the left when looking from the left side of my breadboard. Got me nervous now.

Also I could be wrong, but it looks like your left resistor is a 43.6Ω resistor, but your right most resistor looks like a 436MΩ resistor, which is 10,000,000 greater, as opposed to "10×" greater. I could be wrong though its hard to tell.
The resistors are all labelled and I checked with the meter and both are within spec as 43 and 430ohm but I'll check them again. I got no problem with checking it out until I'm 100% certain all my ducks are in a row.

I gather from the sheet that the actual #s aren't critical and if all I could get to meet the 10X rule were 40/400 or 50/500 that combination should work too? That 2600 pack of resistors has a shitload of sizes with 20 per strip so 130 different values.

That's also a zener diode (see attached for a typical diode used, the attached has a Vf of around 0.6V). The zener can work, but depending on the avalanche voltage, or zener size (1V, 2V, 3V,...ect), your 0.134V constant to determine your set current will change. It can't be over a 5V zener.

What is your zener value and what mA are you looking to produce? 3mA? It can go up to 10mA.

Depending on your Vin, or input voltage, and your Iout, or output current, your LM334 may get warm.
I took a few diodes off of old gear and then looked up what type they were. Not that easy to find out something basic like 'small signal' diode but this link says it is one like that and the original sheet says 'any' small signal diode will do so you think this one should work?

Maybe I should order a diode kit but really only need the one for now. I also have these. 2 x 1n4004, 1 - 1n49373143, 1 - 1n4762A305 and 1 - 1n4146 that is listed as a general purpose that I marked as a possible. I got other stuff laying around that I can strip for parts too.


I'm not really sure of what the zener value is or what mA this is supposed to produce. I'm just going by what the original schematic lays out. Is there some way to get a reading from my meter that can help make sure it's a useful diode? I checked it for polarity and the current only goes one way with + on the end with the black band. This is a heck of a lot more involved that running new power lines around the house. That I can handle. lol

I got a brand new zener diode I bought for my old 1970 Bonneville chopper back around '82. Wonder if it would work? ;)

Please double check that LM334 for me OK. The picture and my drawing show the way it is physically oriented on the board.

:peace:
 

spek9

Well-Known Member
Do you think you could give a recommendation on an oscilloscope that I can connect with a computer and use for fast (~2MHz signals)? I actually have one of those $20 one which claims it will read a 1MHz signal but I can't get the trigger to display it. I used to have one of the better handheld units but I don't want to spend $400 on a new one.
I can do my best, but I'll need to know your budget ;)
 

OldMedUser

Well-Known Member
Sounds cumbersome, isn't there a better way? How is your Pi connected to your pc? wired or wireless? There is a way to transfer the files back and forth between the two without emailing. I use RealVNC.

"Virtual network computing (VNC) is a type of remote-control software that makes it possible to control another computer over a network connection. ... It also interprets commands coming from the viewer and carries them out on the remote computer. VNC is platform independent and is compatible with any operating system."

I log into both of my Pi s in separate windows on my pc, using one keyboard, mouse, and monitor. 3 in 1. I loaded VNC Connect onto the Pi and VNC Viewer on the pc. Makes it easy to transfer files.

Btw, does the Arduino IDE come preinstalled on the Pi4? The Pi 3 had it.
I haven't got to the part about connecting the Pi to my PC via wifi yet. The PC is hardwired for internet but I have a couple of wifi boards so could install one and try that way but I really don't have a lot of bookmarks that need sharing yet so it's not a huge deal. I'm trying to stay away from being part of the Cloud with all my devices shared all over Hell's Half Acre.

I have that esp8266 coming for the Arduino so can maybe figure it all out once that gets here next week sometime with my work trays and whatever else it was I ordered. Seems odd that there isn't some basic case or tray included in the Arduino kit. I'm using a small styrofoam tray that had liver in it at one time. You'd think they would have a very thin and flexible USB cable for that tiny, very light Arduino so it doesn't get flipped around so easy. My desk is getting buried and I need to take a day or two to get shit organized!

I'm thinking of switching to Win10. It's already on the other hard drive so just have to switch boot drives in the BIOS and reinstall some software to get up to speed on that. Found a good page of instructions to almost eliminate privacy leaks in Win10 and have already done many. This Win7 is flaky and no longer supported but I just switched from XP Pro and it hasn't been supported for years.

I downloaded the IDE I think. I just followed directions at arduino.cc and it all seems to be working OK. Windows installed the drivers when I plugged it in to USB but I'm not certain that they are the best ones. On COM4 and looks OK in Device Manager at least.

I'll look into that RealVNC along with the other 3 dozen things to delve into. :D

:peace:
 

OldMedUser

Well-Known Member
I'm gonna check it out in more detail in a minute.
How many of those LM443Z chips did you get?
10. You wanting to make CS too? I could send you 1 or 2 if that's the plan. I have been thinking of maybe making some up real pro like and flogging them on Kijiji or something but seems more trouble than it would be worth. Probably illegal without CSA approval or some such too.
 

ChiefRunningPhist

Well-Known Member
When I first plugged the Arduino in Windoze popped up with the usual 'installing drivers for new device' and shortly after the onboard LED started blinking which they say means the board is working properly so that was easy enough. Went to bed at 4am reading the Getting started with Sketches book instead of Stephen King. lol

The kit has all sorts of sensors, parts, motors etc for me to practice with. Think I'll skip the blinking LED #1 project as I feel I'm beyond that already. ;)

About that LM334. I've double, tripple and now quadruple checked it and I'm 95% certain it's oriented properly. According to your diagram and the one on the sheet with the schematic I'm set up right. Looking from the bottom, (legs pointing toward me), and the flat side up I have the + leg connected to + rail and it's the one on the left when looking from the left side of my breadboard. Got me nervous now.



The resistors are all labelled and I checked with the meter and both are within spec as 43 and 430ohm but I'll check them again. I got no problem with checking it out until I'm 100% certain all my ducks are in a row.

I gather from the sheet that the actual #s aren't critical and if all I could get to meet the 10X rule were 40/400 or 50/500 that combination should work too? That 2600 pack of resistors has a shitload of sizes with 20 per strip so 130 different values.



I took a few diodes off of old gear and then looked up what type they were. Not that easy to find out something basic like 'small signal' diode but this link says it is one like that and the original sheet says 'any' small signal diode will do so you think this one should work?

Maybe I should order a diode kit but really only need the one for now. I also have these. 2 x 1n4004, 1 - 1n49373143, 1 - 1n4762A305 and 1 - 1n4146 that is listed as a general purpose that I marked as a possible. I got other stuff laying around that I can strip for parts too.


I'm not really sure of what the zener value is or what mA this is supposed to produce. I'm just going by what the original schematic lays out. Is there some way to get a reading from my meter that can help make sure it's a useful diode? I checked it for polarity and the current only goes one way with + on the end with the black band. This is a heck of a lot more involved that running new power lines around the house. That I can handle. lol

I got a brand new zener diode I bought for my old 1970 Bonneville chopper back around '82. Wonder if it would work? ;)

Please double check that LM334 for me OK. The picture and my drawing show the way it is physically oriented on the board.

:peace:
Stephen king lol :bigjoint:

If you're using the 1n914b then you should be pretty close. It just looked like a zener diode. A traditional diode is like a 1 way valve only lets current flow 1 way. A zener diode is a special diode that is designed to only let current flow through at a certain voltage. Its a voltage limiting component. There's all sorts of different voltage Zener's. Your LM334 can't have greater than 5V between its mid-pin and negative pin (found on data sheet) so your not be able to use higher than a 5V zener because angering more the LM334 couldn't handle. They ask for a small signal diode because they are wanting a voltage drop of ~0.6V. The 0.134V figure used to determine the resistor sizes is based on a diode voltage consumption (drop) of 0.6V. So if you had a zener diode that regulated the voltage to greater than 0.6V, then your 0.134V constant wood need to change, and this would lead to different resistor sizes. But if the diode in question is a 1N914B then it has a forward voltage, or Vf, or voltage drop of 0.7V, so it's pretty damn close to the arbitrary diode they picked to come up with the 0.134V constant which your resistor sizes depend on.

About your orientation, its perfect! I was wrong previously.

Diode kits are cheap and handy. Look for 200V and less for small power DC ccts.

2 signal diodes and a rectifier diode is bottom...
Circuit-symbol-and-examples-of-standard-diode.png

Here's what a zener looks like...
Zener_Diode.JPG
 
Last edited:

OldMedUser

Well-Known Member
Stephen king lol :bigjoint:

If you're using the 1n914b then you should be pretty close. It just looked like a zener diode. A traditional diode is like a 1 way valve only lets current flow 1 way. A zener diode is a special diode that is designed to only let current flow through at a certain voltage. Its a voltage limiting component. There's all sorts of different voltage Zener's. Your LM334 can't have greater than 5V between its mid-pin and negative pin (found on data sheet) so your not be able to use higher than a 5V zener because angering more the LM334 couldn't handle. They ask for a small signal diode because they are wanting a voltage drop of ~0.6V. The 0.134V figure used to determine the resistor sizes is based on a diode voltage consumption (drop) of 0.6V. So if you had a zener diode that regulated the voltage to greater than 0.6V, then your 0.134V constant wood need to change, and this would lead to different resistor sizes. But if the diode in question is a 1N914B then it has a forward voltage, or Vf, or voltage drop of 0.7V, so it's pretty damn close to the arbitrary diode they picked to come up with the 0.134V constant which your resistor sizes depend on.

About the orientation, it looks flipped to me, ie backwards. It looks like the red jumper from the positive power rail is being fed into the top pin of your LM334 (neg) It also looks like your R's are tied into the middle pin which is correct, and then following their path it looks like they tie into the bottom pin of the LM334 which is correct if the bottom pin on the LM334 is the negative.
View attachment 4458720

Diode kits are cheap and handy, the ones you listed are pretty big. Look for 200V and less.
I'm even more certain that I have it the right way 'round. I think I bookmarked a page showing how to test each leg to make sure the thing was working properly so will check that out. I've always been good at visualizing things in 3D space and the more I look at it the more I'm convinced it's correctly placed. When I look at the breadboard from the side the + wire connects from I'm looking at the flat side of the LM where the + leg is on the left on the row with the + rail connection. Just like in the fine rotated pic you have above.

I just popped the diode out and tested it. Pretty sure now that it was in the wrong way round as the band should be on the COM or downstream side of the diode with the + coming in opposite the band. Had to do it that way to get a reading.

The COM lead is on the end with the black band.

DiodeTest.JPG

I replaced the diode in the circuit flipped the other way and got a closeup from the + rail side. Nice clear pic.

Breadboard4CS01.JPG
 

ChiefRunningPhist

Well-Known Member
I'm even more certain that I have it the right way 'round. I think I bookmarked a page showing how to test each leg to make sure the thing was working properly so will check that out. I've always been good at visualizing things in 3D space and the more I look at it the more I'm convinced it's correctly placed. When I look at the breadboard from the side the + wire connects from I'm looking at the flat side of the LM where the + leg is on the left on the row with the + rail connection. Just like in the fine rotated pic you have above.

I just popped the diode out and tested it. Pretty sure now that it was in the wrong way round as the band should be on the COM or downstream side of the diode with the + coming in opposite the band. Had to do it that way to get a reading.

The COM lead is on the end with the black band.

View attachment 4458741

I replaced the diode in the circuit flipped the other way and got a closeup from the + rail side. Nice clear pic.

View attachment 4458752
Good job on the diode. I was about to say something lol if it were a zener it would have been correct, haha just what you wanted to read, right(?), more shit on zener diodes!



EDIT:
Ya I was way off about those resistors, looks exactly as you said..
a5e637ab2f440ae117c56e4caeb53851--charts.jpg
 
Last edited:

OldMedUser

Well-Known Member
Here's what a zener looks like...
Damn. The pics didn't show before and the one I have in now is definitely a zener from the pic.

I have an old Shaw cable box and need a #10 Torx to get it open but just have the tips for a multi driver and it won't fit down the deep holes where the last 2 screws are but fug it. I'll drill out the plastic holes so I can get them out. Going to toss the case anyway and I have another one too.

Gotta be a few diodes in that old thing. :)
 

OldMedUser

Well-Known Member
Good job on the diode. I was about to say something lol if it were a zener it would have been correct, haha just what you wanted to read, right(?), more shit on zener diodes!

If your voltage source is less than 30V try it both ways. See which way works as desired.
View attachment 4458761
Now to me the way you have the thing flipped is backasswards to what it is according to the diagram on the original schematic or the original pics you posted. If I bent that LM back from the way it's positioned in the pic so the flat side is up and the legs pointed at me the + is the left leg in row 10. Your little pic on top of mine is turned around with the flat side down so the + and - are correct but the shape is flipped 180°.

Certainly not trying to argue but it sure seems to me that I'm right about this. Anybody else see what I'm seeing?

LMviewing.JPG

I'll find that bookmark or hunt down that procedure to test these things.

Going to go drill that case out and have a peek inside. Can't read the damn numbers on those diodes until I get them out but I'll skip any that look like zeners.

:peace:
 

ChiefRunningPhist

Well-Known Member
Damn. The pics didn't show before and the one I have in now is definitely a zener from the pic.

I have an old Shaw cable box and need a #10 Torx to get it open but just have the tips for a multi driver and it won't fit down the deep holes where the last 2 screws are but fug it. I'll drill out the plastic holes so I can get them out. Going to toss the case anyway and I have another one too.

Gotta be a few diodes in that old thing. :)
Lol nice, but as long as you're reading close to 0.6V on the multi then the diode should work. Also, the signal diodes you posted look very similar to a red zener diode. If it had the designation of 1N914B then it's a signal diode.
 

Mak'er Grow

Well-Known Member
@OldMedUser I was wondering what is this circuit going to do also?
Why not just use the correct size adapter to the electrodes...maybe add a fuse too if its just a safety thing.
I've read a few posts on making CS and as long as the amperage isn't really high pretty much any voltage from 9 to 28 seems to work.
One guy used 3 x 9 volt batteries...if memory serves me correct...lol
 

OldMedUser

Well-Known Member
Good job on the diode. I was about to say something lol if it were a zener it would have been correct, haha just what you wanted to read, right(?), more shit on zener diodes!
Total wash on that Shaw box. Probably lots of diodes in there but all those tiny surface mount ones so no use to me.

The descriptions of the 1N914B on that web page lead me to believe that I can use it.

SMALL SIGNAL SWITCHING DIODE
500mW 100 Volt Silicon Epitaxial Diode
75mA Axial Leaded High Speed Switching Diodes
Small Signal Diode (lots of those)

Would be nice to know what kind of readings to expect once it's all hooked up with power supplied so I can confirm it's working correctly. Guess I'll have to make some CS and see if it passes the laser pointer test and the ppm rises over time once I actually solder this all up and give it the smoke test.
 
Top