Low power magnetic hold and release mechanism

How it works:

test

Explanation of the idea:

With the inductor and magnet combined, ferrous metal objects can be held without any power indefinitely. To release the metal object the magnetic field holding it up needs to be temporarily cancelled out. This happens by pulsing current through the inductor which generates a magnetic field separate to that of the magnet. These two magnetic fields are of the opposite polarity meaning the inductors field cancels out the magnets field. The inductor only has to be powered long enough for the item to drop which I haven’t measured but its probably somewhere in the hundreds of milliseconds lets say around 100 milliseconds at a guess. This means you can hold an object for potentially a very long time (months, years maybe I dunno!) and expend a relatively small amount of power releasing it compared to if you’d used an electromagnet to hold the thing up which required a constant power source.

Or you could disregard the above explanation and look to this meme for guidance:
trdsgfd

Automated Plant Waterer

Here is a circuit diagram of the circuit shown in the video:
rect4159-09-4

This is the C program that runs on the dsPIC:

// Program to control automated plant waterer
//wattnotions 2/16/15
#include <xc.h>
#include <libpic30.h>
#include<stdio.h>
//#include <stdlib.h>
 
// Configuration settings
_FOSC(CSW_FSCM_OFF & FRC_PLL16); // Fosc=16x7.5MHz, i.e. 30 MIPS
_FWDT(WDT_OFF);                  // Watchdog timer off
_FBORPOR(MCLR_DIS);              // Disable reset pin

//Functions
void setup(void);
void servo(int pw); // controls the servo angle accepts pulse width in us eg 1500 = 1.5ms pulse
void pump (int n, unsigned long int ms); // flips pins high and low to change direction of actuator motor and pump the handle
// n = number of pumps ; ms = time delay in between pumping motion

//variables
unsigned int pw_cyc;
long int  total_p;
unsigned long int delay_cyc;
int i;


int main(void)
{
	
	setup();
	
	while(1)
	{
		
		for(i=0 ; i<50 ; i++) servo(1800); // off
		pump(10, 300);
		for(i=0 ; i<200 ; i++) servo(1100); //on
	}
	
	

	
	
}

void setup(void)
{
    //configure pins
	TRISD = 0b00000000;
 
}

void servo(int pw)
{
	
	pw_cyc = pw*30;
	total_p = 600000 - pw_cyc;
	_LATD2 = 1;
	__delay32(pw_cyc);
	_LATD2 = 0;
	__delay32(total_p);
	
}

void pump (int n, unsigned long int ms)
{
	delay_cyc = ms*30000;
	for(i=0; i<n; i++)
	{	
		_LATD1 = 1;
		_LATD3 = 0;
		__delay32(delay_cyc);
		
		_LATD1 = 0;
		_LATD3 = 0;
		__delay32(delay_cyc);
		
		
		_LATD3 = 1;
		_LATD1 = 0;
		__delay32(delay_cyc);
		
		_LATD1 = 0;
		_LATD3 = 0;
		__delay32(delay_cyc);
	}
	
}

Testing egg boiled-ness using soundwaves : Experimental results

So I may have gotten a bit carried away before with the whole egg thing. Tried building a working prototype without first doing some experimentation to make sure it is possible to tell how boiled an egg is by using sound waves. I’ve gone back to the basics and done some experimentation. The results are not conclusive really so some further eggsperimentation will be required. I posted about this on reddit and received some great input from several users. One person suggested measuring the time delay between the input and output signal and observing how this changes between boiled and unboiled eggs. In this experiment I measured both amplitude and time lag the results are recorded below.

The experiment:

I bought a six pack of eggs and labelled them individually as seen in this photo:

Individually marked eggs

Individually marked eggs

I made a test rig by mounting two piezos on the end of pens. There is also a place for the egg to sit.
IMG_20150121_154330IMG_20150121_154359

A sine wave with amplitude 9.44V and frequency of 4.46KHz was input into one of the transducers. For this experiment I placed eggs 1-6 in the rig and measured two variables : amplitude ( at receiver piezo ) and the time taken for the sound wave to travel from sender to receiver. This time difference variable will be referred to as delta t in the results. I did this procedure three times for the un-boiled eggs and three times for the boiled eggs. The eggs were boiled for different amounts of time. All of the eggs were placed in one pot, the water was brought to boiling temperature and every two minutes an egg was taken out. So egg 1 was in for 2 mins and egg six was in for a total of 12 mins. Here are some photos of the egg boiling setup:
IMG_20150121_164311IMG_20150121_164505

These are the results from before and after boiling the eggs. The reason I did each test three times was to reduce any errors caused by poor contact between an egg and the transducers and other errors of that nature. Delta T refers to the time lag between the input signal and the output (received) signal it is measured in microseconds. mV refers to the amplitude of the output (received) signal.
g38d34

Taking the difference between each set of numbers gives the following set of data. So to be clear, mV_var refers to the change or variation in output between the unboiled egg and the boiled egg. t_var refers to the change in time lag between the unboiled egg and the boiled egg. T_var is in microseconds still.
g5392

Taking the average of these three tests gives the following results:
g5712

image4369image4358

From the graph on the right, the results looked quite promising up until minute 12 which was egg 6. Egg 6 was the only egg that cracked during boiling. The egg was mostly fine but the reason for the rather low output may be due to the fact that the egg surface had cracks in it. This may be a good reason to repeat this experiment to make sure. Another thing that I’ve noticed is the extremely low amplitude of the received signal, it is normally in the order of tens of milli-volts at best. The piezo transducers used for this experiment are intended for use as speakers presumably for toys and things of that nature. This means that they have a frequency response of only around 1Khz to 7Khz before the sound output drops away to nothing. It may be the case that a higher frequency would pass through an egg much more effectively giving a greater output which would allow for more concrete results. The graph of time lag versus boil time is all over the place, I really don’t know that to make from it. Another thing is that there may be something I’m missing with the data. As in, I’ve graphed change in amplitude and time lag against boil time but this may be the wrong way to think about it. If you have any ideas about this, let me know!

Measuring how boiled an egg is – using sound waves – Attempt #1

Spoiler Alert: This didn’t work out due to the fact that whatever contraption I build tends to fall apart or not work properly when placed in boiling water. I’ll continue to work on the problem. Maybe there is some kind of high temperature, water resistant glue out there that would fit my needs.

The idea is simple. As an egg is boiling it changes from a liquid type state to a more solid type state. Is there a way to represent this change using electricity? Well, maybe. The way I went at the problem was using soundwaves. These soundwaves were generated using these little piezoelectric transducers seen below.

piezo transducers with the back covered with sugru

piezo transducers with the back covered with sugru

The transducers are placed on opposite sides of the egg. One of the transducers is hooked up to a signal generator outputting a sine wave of around 6v and at a frequency somewhere in the 1-5KHz range. This sound wave propogates through the egg and is picked up by the other transducer. The amount of sound energy that reaches the receiving transducer hopefully changes as the egg boils. The amount of sound energy that propagates through will probably either go up or down as the egg boils. At a guess, I would say it would go up because as the egg becomes more solid it can absorb less sound energy meaning more energy passes through to the receiver. This increasing of sound energy reaching the receiver could be measured as an increasing amplitude of the sine wave generated at the receiving piezo. The first rig I built was built just to find out what kind of amplitude might be seen on the receiving end for an un-boiled egg. See below for a picture of the rig:
IMG_1299.JPGIMG_1296.JPG

Oscilloscope output : ch1 is the receiver voltage (approx 30mV) and ch2 is the input

Oscilloscope output : ch1 is the receiver voltage (approx 30mV) and ch2 is the input

With an input of around 6.5 volts, only around 30mV makes it to the receiver. This is pretty small but not small enough to be too off putting. If it was micro-volts then there would be a problem!. The first test rig was held together with electrical tape and rubber bands – not very boiling water resistant so I moved onto test rig #2 seen below:
IMG_1303.JPGIMG_1305.JPG

IMG_1306.JPGIMG_1308.JPG

It’s kinda hard to see from these photos but this is just a tin can that I cut in half. The piezos are held on to the can using sugru. For those that haven’t hear of surgru, its basically a rubber that comes in a soft state, once you open the pack it can be shaped as wanted and in 24 hours it will harden. The sugru packaging says that it can withstand up to 180 degrees which I’m going to have to call bullshit on seeing as the whole thing fell apart after about a minute in boiling water. Also a big problem was the thing bouncing around whilst in the water. This caused the received voltage to jump around and the results were totally unusable. For the next rig I tried to make something that weighed a bit more so it wouldn’t bounce around in the boiling water. I used an old speaker frame as the base and this time tried to have the transducers sitting on top of the egg, not actually in the water. The hot glue sticks I use have a max temperature of 120 degrees C so I decided to give that a go to hold everything together. I present to you rig #3 in all of its glory:
2014-12-08 17.29.212014-12-08 17.29.02

It doesn’t look pretty and it didn’t even get the job done. This also fell apart after a minute or two even though everything was raised above the water. The heat of the steam was enough to melt the glue and once again, everything fell apart. At this point I was getting kinda fed up with the whole situation but then I cam across this stuff:
2014-12-10 12.15.27

“AAAWWWWHHHHHH YEAHHH” was my initial reaction upon finding this in woodies diy store for only €7.99 . This stuff comes in a liquid type state and hardens after a few hours. It’s meant for use on things like oven doors etc. perfect for what I wanted (or so I thought at the time). While I was out that day I came across something else I didn’t even know existed but was exactly what I wanted and needed. It was a microwavable egg container. As in you put an egg in this thing, add some water, throw it in the microwave for a few minutes and you have a boiled egg! I wasn’t interested in the microwave part, just the fact that the container was shaped like an egg and had space for two piezo transducers. See below for the egg holder thingy:

2014-12-10 11.38.212014-12-10 11.39.16

2014-12-10 11.50.112014-12-10 12.15.01

The holes were drilled to let the water in. The transducers were put in place and then the sealant stuff was squirted in to hold everything in place. This rig also failed because the sealant isn’t meant for use in water. All of the sealant dissolved in the boiling water leaving everything covered in a grey goo. Oh yeah and everything fell apart. AGAIN. So I’ve had enough eggsperimentation (lol) for a while. If you have any ideas on a better way to do this, please do let me know!