Pages: 1 [2]   Go Down
Author Topic: DS1307 reading time  (Read 1777 times)
0 Members and 1 Guest are viewing this topic.
Wisconsin
Offline Offline
Edison Member
*
Karma: 4
Posts: 1001
I LOVE THIS STUFF!!!!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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. 
Logged

Accelerate to 88 miles per hour.

India
Offline Offline
Jr. Member
**
Karma: 1
Posts: 54
Silicon Addict
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

My blog Emptiness in Void. New to Microcontrollers? Learn [url=http://www.arduino.cc/playground/Cod

Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 99
Posts: 4836
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: July 02, 2012, 10:41:37 pm by GoForSmoke » Logged

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

Norfolk UK
Offline Offline
Faraday Member
**
Karma: 71
Posts: 2613
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged


Wisconsin
Offline Offline
Edison Member
*
Karma: 4
Posts: 1001
I LOVE THIS STUFF!!!!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Accelerate to 88 miles per hour.

Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 99
Posts: 4836
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

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

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4094
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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:


* schematic.png (2.71 KB, 844x238 - viewed 19 times.)
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 99
Posts: 4836
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?

Logged

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

Pages: 1 [2]   Go Up
Jump to: