Friday, August 19, 2016

43: Linear Motors -- Arduino
revised 8/26/16

I got a stepper working after I bought one with the control interface card. But for my "Dog Treat" system I decided that a linear motor would be most reliable for spitting out dog treats. I bought 2. Here's #1:


#2:

                        top of #2                   under side     control board
                                                        of  #2             for 28B...

Right away, problems. My 28BYJ-40 stepper has 5 wires to the little board. My linear #1 only has 4 wires (blue, yellow,black, red). Will the little interface work? How do I wire it? Ditto for #2 (after I figure out how to solder the tiny contacts).

REVISION:
To get motor #1 to work I bought an "Easy Driver" through Amazon. After the nasty soldering and a couple wrong-headed examples from Googling "arduino stepper..." I got "SparkFun Easy Driver Basic Demo" code & wiring to work.

Motor #2: Soldering to those tiny contacts? First off, I shorted 2 and had to de-solder & start over. Then the same code & Easy Driver worked -- except -- forward and backward are reversed (but then the contacts weren't labeled). Also, #2 spiral gear is "coarser" so a small motor rotation moves much farther. Actually (ignoring soldering), I like #2 better -- the 2 screws will make it easier to connect to something useful.

Also: what's the best way to avoid running the plastic piece past the end of the screw? 

Wednesday, August 10, 2016

42: DHT22 Update of Post 39

Well, my sensor inside a cut-off water bottle failed after a couple days. So I put the next try inside a opaque plastic box that is sealed except for 2 screen-covered 1" holes. But the thing that makes it work (I think) is the tiny fan that blows directly on the DHT22. It still stops working briefly when the humidity reaches 100% but it then recovers after an hour or so. To make this work I had to increase the 5v power to the Photon to 2.4 amps.

I also tried the HIH-4030 sensor in the same environment. Guess what: it stops working at 100% RH, too.