Must-haves for EASY DIY controller?

ok, hit my first questions. In the schematic, U7 (DS1307) is connected to what? I see and SCL and SDA signals from U7 and U6 to U5 - which I assume is the I2c bus. On U6 (main ATMEGA) it looks like those go to Analog inputs?? So the clock chip and the LCD controller just talk on the I2c bus? and out (pin7) goes nowhere?

And the second question is, is there stuff missing on the right hand side of U7? What is C21 connected to? between ground and what?
 
Last edited:
pin 7 on DS1307 is a square wave output pin which is probably not connected because it is not needed or used.


Yah, that's data sheet says, just making sure I'm reading the schematics right

Looks like on the board layout, C21 goes to +5 on one side, so is it just a filter cap between +5 and ground on U7??
 
SQW is normally used for interrupts, i.e. "ping me every second" and doesn't really come into play for the way we'd probably use an RTC, hence it's not connected.

I don't have the schematic up, but C21 sounds likely just a bypass cap. There's pretty much one for every power connection on every IC, between +V and GND.
 
Relays

Relays

2 Relay boards (4 relays each) on second MCP23008 controlled with only 4 wires from Hydra:
Relays_01.jpg


The boards above are the Futurlec opto relay 4 (10A @ 250VAC relays) - http://www.futurlec.com/Opto_Relay_4.shtml I don't think we'll be able to beat that at $14.90 per populated board (thanks for pointing these out earlier in the thread). It is nice that you can daisy chain 2 boards. There is also some proto area on them for the MCP23008. That way the relay box can have only 4 wires to it from the Hydra.
 
2 Relay boards (4 relays each) on second MCP23008 controlled with only 4 wires from Hydra:
Relays_01.jpg


The boards above are the Futurlec opto relay 4 (10A @ 250VAC relays) - http://www.futurlec.com/Opto_Relay_4.shtml I don't think we'll be able to beat that at $14.90 per populated board (thanks for pointing these out earlier in the thread). It is nice that you can daisy chain 2 boards. There is also some proto area on them for the MCP23008. That way the relay box can have only 4 wires to it from the Hydra.


Sweet - I will be trying out one of those next. That board says it needs 12v, are you using 12v for the Hydra board? I thought we needed 9v on that.
 
Last edited:
Yes it needs a 12V, and I'm using a separate PSU for the relays. I've been using a 9V for Hydra, but I'll be stepping down to 7.5V probably.
 
Yes it needs a 12V, and I'm using a separate PSU for the relays. I've been using a 9V for Hydra, but I'll be stepping down to 7.5V probably.

I am going to try and figure out the wiring for your MCP23008/relay setup my self, but I will probably want to check it against yours before I power it up.
 
Looks nice! Time to order some relay boards. Have you tried controlling anything with them yet?

Obi, the four wires are GND, 5v (for the MCP), SCL, and SDA - it's I2C, and we put an I2C header up near the top block of pads to make this sort of expansion easy.
 
I was just checking out the Futurlec site. Anyone know what the header connector listed on this page - http://www.futurlec.com/ConnHead.shtml is called on the Mouser site? I thought I had found items like this on Mouser and when the order came - not even close :sad1: I was looking for something like this to make hooking up the LCD a bit easier (as well as for neating up down the road)

Also what library are you guys who have this operational for the LCD via I2C? I found one that a guy wrote, but doesn't sound like it's complete. I have my +5 supply boarded, main processor, clock circuit, and 23008 connected to the LCD and want to fire it up. Been reading about I2C and want to have a sketch to test what I have so far...
 
Try this
male headers select through hole and apply filter select pin headers and apply filters
or maybe this linkMale Headers
It still leaves a lot, but the 6th one down looks close.

NOTE: You do not have to by the exact size. Sometimes you can get a double row that is like 50 pins long and they just snap where needed. They might be cheaper.

Hope this helps

[EDIT]
50 pin version
 
Try this
male headers select through hole and apply filter select pin headers and apply filters
or maybe this linkMale Headers
It still leaves a lot, but the 6th one down looks close.

NOTE: You do not have to by the exact size. Sometimes you can get a double row that is like 50 pins long and they just snap where needed. They might be cheaper.

Hope this helps

[EDIT]
50 pin version


Yah, not the header - the header connector - toward the bottom of the page of the link I posted. It looks like it's supposed to slip on the standard male header and there are crimp pins you put on wires and then snap into the header connector. I see them all over the place but couldn't figure out what they are called on the Mouser site - was trying to price shop...
 
OK, try female headers -> headers mounting style wire second and sixth down look like that might be the same.

Maybe I did better this time :)

[EDIT]
If might be easier to use a ribbon cable connector. Then you will not have to crimp each pin. They can be hard to get good contact (because of the pressure needed), but I have done 25 pin cables with normal household tools.
 
Zen, you asked about software. terahz and I have basically been sharing via email. I suppose it's time to put some things up on the code site so we can share/get input from a wider audience.

This isn't really as organized or consistent as I'd like, but to get something started: In trunk>software I created "libraries" and "sketches" directories. In the libraries directory I put an LCD library from terahz, which is the one we're both using right now. Also put an etherShield library up, which is a library I found online for the ENC chip. I have this compiling against sample sketches but haven't actually tried to use it yet.

In the sketches directory I put "hydra_test" which is the sketch I was using when I made the post a few days ago of the LCD and RTC working. This sketch has code for those two functions, and should get you started.
 
I followed your lead and went backwards from a male header - on the Mouser site they sometimes have a mating product link on the datasheet - I did that for the molex header and found the part number for the connector. Finally found that part on their site (spaces and dashes...) Looks like as far as compared to the molex connector, the Futurlec site has a better price for these connectors...

Edit: and I agree about the possible difficulties of using these crimp pins... I haven't found any good source for different sized ribbon cables yet and for prototyping/breadboard purposes I think I'll be better off using something that will attach to the header I've already soldered to the board :D
 
Last edited:
Zen, you asked about software. terahz and I have basically been sharing via email. I suppose it's time to put some things up on the code site so we can share/get input from a wider audience.

This isn't really as organized or consistent as I'd like, but to get something started: In trunk>software I created "libraries" and "sketches" directories. In the libraries directory I put an LCD library from terahz, which is the one we're both using right now. Also put an etherShield library up, which is a library I found online for the ENC chip. I have this compiling against sample sketches but haven't actually tried to use it yet.

In the sketches directory I put "hydra_test" which is the sketch I was using when I made the post a few days ago of the LCD and RTC working. This sketch has code for those two functions, and should get you started.

Cool - thanks for the head start.... I'll try uploading to my breadboard over lunch and see what I get.
 
FYI, terahz, I know you've made changes to your lcd library since I got that copy, and I made a few changes to it myself (there were some lines that it was erroring out on, where it looked like you were trying to check a status variable - so I commented them out. It's been a while so I don't remember the exact details).
 
Well, I must be doing something right - or you guys are really succeeding at building an EASY DIY controller...

Running DWZM's test sketch with the current LCDi2c4bit library
 

Attachments

  • IMG00022-20100517-1214.jpg
    IMG00022-20100517-1214.jpg
    82.5 KB · Views: 6
  • IMG00023-20100517-1215.jpg
    IMG00023-20100517-1215.jpg
    97.2 KB · Views: 5
I don't have a battery on my RTC yet, so I just grounded the battery pin on it. Hence it doesn't keep time, so I left the "set RTC" function active in that sketch so it resets the time every time it's uploaded. If you have a battery and you want yours to function correctly, you should set the time accordingly in that function call, upload the sketch, then comment out that function call and upload the sketch again (otherwise, it'll reset the time every time the whole thing resets).
 
Back
Top