Go Down

Topic: DS1307 reading time (Read 1 time) previous topic - next topic

funkyguy4000

Hmm interesting.  I've heard of them in applications like joysticks and such on sparkfun but i've never bothered to look into what they are. 
Accelerate to 88 miles per hour.

plastygrove

Not exactly a library, but I wrote a complete implementation for the DS1307 using I2C a few weeks ago. Of course, it's more for learning since it's not optimized to use the inbuilt hardware of the Atmega. If interested, here's the link to the post:

http://arduino.cc/forum/index.php/topic,110062.msg829477.html#msg829477
My blog Emptiness in Void. New to Microcontrollers? Learn [url=http://www.arduino.cc/playground/Cod

GoForSmoke

#17
Jul 03, 2012, 05:38 am Last Edit: Jul 03, 2012, 05:41 am by GoForSmoke Reason: 1

I've never done anything with hall effect sensors. I don't understand them.  What do they do?


They sense magnetic fields. When current moves through a conductor (like wire) it makes a field. Alternating current makes the field change directions.

Hall sensors have an axis to them so you might have to get that aligned. They also come in different packages; some are purely on/off and some you can get analog readings through.

In the US the AC is 60 cycles per second and used to drive clocks since before even transistors. It's also just right to upset heart signals which is why a plugged in radio dropped in the tub is usually lethal.
In Europe the AC is 50 cycle which I have read does not fibrillate hearts.

Note: your power line may be 'dirty'/have spikes but those can be coded for. X10 control systems will also add small waves to the power line, those are the things that use house power as control lines for various devices.
I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Riva


If you have electric service inside the house then you have a bedrock-solid pulse source that a Hall sensor should be able to pick up.

I use my mains ring for networking and this may upset things.
http://forum.arduino.cc/index.php?action=unread;boards=5,67,10,11,66,12,15,17,21,22,23,24,25,29;ALL

funkyguy4000

Yea I've read on the X10's
As interesting as they are, I don't think i'll be needing those anytime soon unless I'm going to sense like the earths field. And in that, I'd need a massive low pass filter and a very accurate sensor.
Accelerate to 88 miles per hour.

GoForSmoke

Oh no! That kind of thing makes it harder to read the ac line. Reading the AC with a Hall sensor is non-intrusive, the Hall sensor don't affect the field enough to give coarse or bad readings, it won't affect the current. Besides, with a networking rig you want a UPS or line conditioner. You would read the current between the wall and the power unit, your network be untouched. I even run my PC off a UPS, local power here is sometimes dirty.

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Jack Christensen


If you have electric service inside the house then you have a bedrock-solid pulse source that a Hall sensor should be able to pick up.


Have you done this? How would it be set up? I've only played with Hall effect sensors a bit, but the ones I have (Allegro A1302) don't seem sensitive enough to detect mains frequency without wrapping a coil around them or something.

A more direct approach that I have used, works well:
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

GoForSmoke

Are you shielding one of the wires in the cord? Field strength is going to vary with current drawn  and yeah coil of one conductor would have to work. OTOH with a heavy resistor and a few diodes you could read cycles both ways on 2 pins.
Maybe there's an Op Amp that would make it even more direct and easier and use 1 pin at the same time?

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Go Up