Solving the Power Problem

I solved it! And it was the simplest solution possible. The batteries were dead.

Well, technically not dead because they were still reading 7.4v so they should have worked, but yes. They were dead. I decided to keep the batteries in parallel because the combined modules still want a decent amount of current.

So far, everything is working nicely. I’m getting a steady 4.92v out of the regulator. I’m keeping the power supply regulator instead of the little regulator because I really like the on/off switch.

Apparently the saying holds true. The simplest solution is usually the correct one.

Sponsored Post Learn from the experts: Create a successful blog with our brand new courseThe Blog is excited to announce our newest offering: a course just for beginning bloggers where you’ll learn everything you need to know about blogging from the most trusted experts in the industry. We have helped millions of blogs get up and running, we know what works, and we want you to to know everything we know. This course provides all the fundamental skills and inspiration you need to get your blog started, an interactive community forum, and content updated annually.

Power Problem… GRRR!

I thought I had finally found a solution to this problem. Again. But yet again. It didn’t work.

I took two 9v batteries and connected them in parallel. This way the current should add, and I’ll still have enough voltage. I excited plugged this into the power supply regulator, but it didn’t help anything. The voltage still reads at 2.3v. I even measured the current each module was drawing when it was the only thing plugged into the 5v supply, and they all added up to 162.5 mA which is much less than my estimate based on the datasheets. I’m not sure what’s going on. Maybe I’ll try using the fresher 9v batteries next. I was just too annoyed to do it then. Sigh. Hopefully, eventually I’ll figure it out.

No More Floating Tray!

After contemplating the possible solutions to my floating egg tray problem, I stumbled upon a simple and “elegant” solution. I was originally thinking about feeding all 26 wires down the center aisle and out of the tray. However that leaves me with a mess of 26 wires. But wait! There’s another side! Rather than making all the wires ride the long side, I can have them cross the short side and pop out of the long side! IMG_0381

FullSizeRender copy 4

I was able to make them lie flat enough that the tray is really steady. No more floating and no teetering! The wiring was still pretty crazy but not nearly as insane as the 26 wires in one bundle. IMG_0382


I also labeled each of the wires that go to the Arduino to make things easier to plug in. Unfortunately I have black electrical tape and only purple Sharpe. At least it’s something.

Now the next problem to solve is how to hide all the wires and the breadboard… cardboard? I’ll figure it out tomorrow.

Oh! And I reached an important milestone today! I finished my first roll of electrical tape on just this project!!!IMG_0379

Egg Tray In Progress

IMG_0374With all the materials in one spot, it was time to start the build. I started by buying a cardboard egg cartoon so that it would be easier to poke holes compared to a hard plastic tray. For my first design, I cut out holes to stick the head of the photoresistor through. I then soldered longer, sturdier wires to leads because they were too weak and too short to stick in the breadboard where they needed to go. The problem was that the sensors kept falling out especially with all the extra weight. Even with electrical tape they would still come loose.

FullSizeRender copy 3This brought me to my next idea and next design. Rather than poke holes for the entire head, I poked holes for the two leads. This sort of worked except that theIMG_0372 sensors were still too loose. Electrical
tape helped and then I bent the leads to try to keep them from going through the holes. The issue is that now I have a floating egg tray. All the wires are coming from the bottom of each egg spot so I can’t set down the tray. My solution had been to conceal it all in a box like I did with the other electronics, but I’m not sure
I like that anymore. RIMG_0359ight now the leads are too long to fit in the box, but if I cut them, it’ll be too tight to be able to fix anything on the breadboard. I could squish them down but then it starts becoming a big mess of cables.

Now comes in my last idea. If I put the light sensors in the side of each compartment, then the wires can be fed through the middle of the tray. This way the tray can sit flat on the table and the breadboard is still accessible. I have yet to implement this design. I’m still concerned about having 26 wires fed down the center of the tray. Plus they’re all white wires so talk about insanity.

I’m still brainstorming. Hopefully I’ll come up with a better solution soon.

Battery Problem Solved!… Or not…

Once I got the new regulator home, I was sure that this would solve my battery problem. But it didn’t. Here’s what happened.

IMG_0367The soldering was simple enough. I needed a few Google searches just to double check that items were what I thought they were but then everything when together smoothly. I plugged in the battery and hooked up the multimeter so I could dial the regulator to 5v. Once I did, I plugged it into the circuit and measured again. It had dropped down to 3.7v just as it did with the other regulator. Not yet discouraged, I started to adjust the knob but it did nothing. Even at full 30v regulator max, it didn’t climb above 3.7v.

So it’s more than just having the voltage drop when the current required grew. I decided to look up the battery specs to see if that could be the problem. I knew that I was trying to draw around 500-600 mA between all the modules, and both regulators can handle up to 1.5 Amps. I found that data sheet and while it didn’t have a “max current” section, it did have a few graphs that gave hints as to how much current they expect to be drawn. The largest current that have graphed is 250 mA. Screen Shot 2015-07-08 at 1.11.54 PM

It looks like I found the problem. The battery I’m using simply isn’t designed to handle as much current as I’m trying to get from it. Looks like I need to find a new battery. Maybe I’ll use a set of AA batteries. I’ll need to figure out a way to get enough voltage and enough current from whatever I end up going with.

Discovering the Electronics Parts Co

I was debating whether to title this The Failure of RadioShack or what I ended up calling it. I decided to go with the more positive one, but both describe what happened.

With my list of required supplies in hand, I skipped on into RadioShack ready to solve the world’s problems. But they failed me! They only had one more package of five photoresistors when I needed eight more, and they didn’t even carry the multiplexer IC I needed! After wondering aimlessly in the store for a while, too distraught to leave, I finally checked out my single sad package. In one last desperate plea for redemption, I asked the kind employee if he knew of a place where dreams come true. He, of course, answered Disney World but then quickly followed up with the Electronics Parts Co down the road. Without delay, my phone was out on the counter, and I was pecking away at the keyboard to find the mysterious location of the aptly named Electronics Parts Co.
Electronics Parts Co

Anyway, they had the multiplexer I needed and I even found a set of three photoresistors. That makes a perfect 13 which is exactly what I need. The most exciting IMG_0364piece I found though was a kit for an adjustable power supply. I simply need to solder it all together then plug in the battery, and I can adjust the little knob to increase the voltage. It looks perfect for my power problem. Now I should be able to simply measure what it is actually giving and increase the voltage until it’s giving what I need it to give.

While the trip might not have been “magical”, it certainly did give me exactly what I needed and more.

Running Out of Analog Pins

Before I could truly rejoice in my new path for the egg sensor, another problem stopped me in my tracks. The photoresistors each require an analog pin on the Arduino in order to run. I only have six analog pins, and two are currently being used by the Hx711 (the milk scale). The SparkFun model of the Hx711 actually has it plugged into digital pins instead of analog pins, so hopefully mine will be able to switch too. I did run across something while researching that talked about the module working in either. However, that still leaves me six analog pins short. So I turned to Google, and Google came through for me.

multiplexer 1I found a blog post talking about a solution for just this problem. He used a multiplexer. For those who don’t know, a multiplexer is a logic piece or integrated circuit that takes in a number of inputs and a control bit or bits and spits out one of the inputs based on which control bit was given. Essentially it is exactly what I need. The one he used was a 4051 from Jaycar. I’m holding out hope that RadioShack carries them. They did have a decent number of ICs when I was there last time. Plus, I already need to go there for more photoresistors.

IR and Photoresistor Testing

Screen Shot 2015-06-29 at 4.26.17 PMSince I have the IR Emitters and Detectors from SparkFun, I decided it was time to test
them. The suggested IR schematic calls for a 270 Ohm resister and 10k Ohm resister per pair, so I made a quick run to RadioShack to get them. While I was there, I ran across two different types of light sensors. I snagged a pack of each to test.

The IR pair wasn’t working with the battery and 5v regulator, but once I plugged the circuit into the Arduino 5v pin, it worked fine. The code was simple enough as it only needed an analogRead to a single pin. However, I didn’t like the physical size of the circuit required. It had a few too many wires for my taste. Basically, it worked but I wasn’t in love with it.

Screen Shot 2015-07-07 at 6.05.08 PMNext I turned to the photoresistors that I bought from RadioShack. SparkFun also sells them which gave me link to a schematic. Luckily I had already bought 10k Ohm resistors, so I didn’t need to make another run to RadioShack. I had to use my breadboard to hook it all up because I couldn’t get both wires into the A0 pin. 🙂 Either way it was a much smaller circuit than the IR circuit. It only required one row of breadboard pins, and the other two sides of the devices go to the power columns.IMG_0356

While the photoresistors or photocells are definitely my top choice, I decided to try to hook up the ambient light sensors. It took awhile to find a schematic for them, but eventually it was SparkFun that came through for me. While their ambient light sensor looked different, I was still confident that the schematic would work. Plus, it’s actually the same as the photoresistor circuit! One quick swap and I was up and running.

The good thing is it worked. However, the range left something to be desired. It was measuring around 170 in the one lamp lit room which is decent, but it only dropped to 150 when I shinned my iPhone’s flashlight directly at it. The photoresistors typically went from around 200 in ambient light to 30 with direct light. Photoresistors win! They have the smallest circuit and a great range of values. Time to go buy more.

Taking Apart the Egg Minder

Time to take stuff apart! It took me a while to find the seven hidden screws under the rubber stoppers, but once I did the whole thing came apart easily. I was just lucky that I had my whole tool set with the six pointed star tip! Thanks, Mom!

I’m really glad I got to look inside but I quickly realized that I wouldn’t be able to hook the system up to my Arduino. However, I did figure out how the system detects the eggs. It uses light sensors. My friend and I had discussed this but hit a snag when we realized the fridge is dark when closed… But the Egg Minder has a simple solution for that! It has one additional light sensor on the side of the tray that detects whether there is light at all. The tray only checks the eggs when the side sensor detects light! Take a look!


Here’s the hidden screws! The right most screw (on the short side) still has it’s rubber cover on. It looked like a plastic covered hole at first. It wasn’t until I poked at it that realized it was rubber and removable.


Inside! The first view of it open. Also visible is the rubber o-ring to keep a watertight seal for washing.


Peeking beneath the PCB and between the egg compartments

FullSizeRender copy 2

The main board unscrewed and flipped up!


Close up with the processor. That should also be the WiFi adapter.


Close up on the board. Wow. Notice each circle. Inside is the light sensor for each egg. Near the center of the board are LEDs. There’s one for each egg which will light up when that is one the oldest egg. 


Each circle with the sensor lines up with the glass/plastic view window to the egg compartment. Each LED lines up with the clear plastic rod that will direct the light to the top of the tray.


This extra board has the LEDs that go off when connecting the app to the hardware.


This is the extra light sensor that detects whether the whole system is in light or not. 


And it’s back together! Good as new.


Cleverness! Here’s the external light sensor. Notice how the clear cover actually covers the sensor with a dark strip. That’s why the packaging says to put the cover on to save battery life. The cover stops the 14 egg sensors from sensing.

Even though I couldn’t use the sensors in the Egg Minder, it still gave me a new possibility for my egg tray.