Must-haves for EASY DIY controller?

It looks interesting. But is it much cheaper that an Arduino? If it has about the same number of pins (and type) a shield could probably be mapped to this layout.

I am not sure the little you would save would be worth the support you would loose. EverthingArduino could probably be adapted, but by the time you spent the time is it worth it?
 
Hydra FTW :D
---
I'm not sure about the SMD parts... My only concern are the people who are new to all this DIY/PCB/Controller business. Especially with a cheap RS soldering iron that Q2 is going to be a pain. And now that I think about it, I don't think you even need it. It is for On/OFF of the LCD right? Just ground that pin (JP1 P16) and connect the +5V of the LCD to an arduino PWM pin and that can not only control the on/off but can also adjust brightness.

On a side note, I've never seen ground done like that and it is confusing the hell out of me :)


Good one though! I say we give it a try soon :)
 
FishMan, the Teensy++ is essentially Arduino-compatible. It's the cheapest thing by far with that level of capability (nearly as much as a Mega but cheaper than a Duemilanove). Anyways just caught my eye so I thought I'd post it. If I was a person who wasn't interested in this Hydra project, or if I wanted an off-the-shelf Arduino with a little more oompf than the Duemilanove, I'd go for the Teensy++ in a second! I might order some just to play with.

Terahz, you've used an MCP port expander to drive an LCD before, correct? I put Q2 there because i saw someone else using it with this port expander. I don't have any other justification, so I'm game to remove it.

I made one big GND pad covering the entire bottom, and split the pads on the top up to just around areas I thought needed extra shielding (the analog portions of the pH circuit, and the crystal). Again, no real justification, just did it that way.

The CAT4101 and ELN shield pcbs should be here in a week or so, so I'll probably make some tweaks to this if people have comments, then plan on ordering these up when those other boards arrive so I can keep things staggered.
 
I think the transistor is OK.

Why is the power regulator (7805 ?) a surface mount (U7)The through hole will give you more room and you can add a heatsink if it is needed.

What does the 7660 voltage converter do. Looks like it feeds U6. Got it -5 supply. Not sure how you got the connection from the schematic.

Is this Arduino shield compatible? I admit I have only skimmed it but I thought they had a lot for I/O (digital, analog, and PWM)

[EDIT]
Did I miss the USB connection for programming or is it a shield.?
 
Last edited:
Terahz, you've used an MCP port expander to drive an LCD before, correct? I put Q2 there because i saw someone else using it with this port expander. I don't have any other justification, so I'm game to remove it.
Yep, I'm driving my LCD with a MCP expander, the only pin that comes directly from the arduino is BKL+. I don't see why add a component if we can do without it.

Did I miss the USB connection for programming or is it a shield.?
The FTDI terminal is for programming using a FT232 cable, if I'm not mistaken.


P.S.: ReefCentral, get your act together, this forum keeps dying like crazy! It's just a forum, not rocket science!!!
 
I think the transistor is OK.

Why is the power regulator (7805 ?) a surface mount (U7)The through hole will give you more room and you can add a heatsink if it is needed.

Better thermal transfer (w/o heatsink) and it's smaller. A through-hole package laid down takes up a TON of room, and a through-hole package standing up is too tall to maintain shield compatibility. At any rate, given the current limits in the different components on the board, that reg shouldn't have a lot of load unless people go crazy using the 5v pin.

What does the 7660 voltage converter do. Looks like it feeds U6. Got it -5 supply. Not sure how you got the connection from the schematic.

Yep, -5v for the pH circuitry.

Is this Arduino shield compatible? I admit I have only skimmed it but I thought they had a lot for I/O (digital, analog, and PWM)

It's more shield compatible than the Duemilanove is. :D The Duemilanove has parts sticking up in awkward areas, this boad doesn't (assuming people use short caps near the voltage regs, which is what we'll spec when we do a BOM). I tried to only consume unimportant pins on the shield itself, so nearly every important pin is preserved for shield use.

[EDIT]
Did I miss the USB connection for programming or is it a shield.?

Terahz has it right, the FTDI header is for programming. This takes up much less room onboard, and avoids having to solder the fine-pitched USB chips used on USB-compatible boards. People can buy an FTDI breakout board for $12, or hack a phone cable for a mere $2.

Yep, I'm driving my LCD with a MCP expander, the only pin that comes directly from the arduino is BKL+. I don't see why add a component if we can do without it.

I'm wondering what the max current draw on that pin of the LCD is, and if that's why the schematic I saw had the transistor (to maintain compatibility with LCDs that had high draw?). Who knows. What size LCDs are you using?
 
I'm wondering what the max current draw on that pin of the LCD is, and if that's why the schematic I saw had the transistor (to maintain compatibility with LCDs that had high draw?). Who knows. What size LCDs are you using?

I'm using a Newhaven Display 16x2 char LCD and I've tried a 16x4 as well. They both draw only 20mA for the backlight, according to the datasheet.

http://mouser.com/Newhaven-Display/...y-Modules/_/N-6j737Z1z0zl2b?P=1z0ypn7Z1z0x81t
 
I was going to go for a 20x4. I'll look at some datasheets. The MCP23008 has a 25mA current limit per pin, but if we move that LCD pin to an Arduino pin we will have more headroom and it shouldn't be an issue.

Out of curiosity, can you look at the pinout I have for matching the MCP to the LCD and see if it matches what you're using?
 
Just ground that pin (JP1 P16) and connect the +5V of the LCD to an arduino PWM pin and that can not only control the on/off but can also adjust brightness.

Just re-read this. I really don't wanna lose more PWM pins. :lol:

Though it sounds like we're gonna need a PWM port expander anyways so might as well start looking for one. I looked for a through-hole I2C PWM chip a few months ago and didn't find anything. :(

PWM demands so far:

1) This pin on the LCD
2) Fan control (can we find another method?)
3) LED dimming (I'm going to need 4 or 5 just for this)
4) Any shield that uses SPI consumes one or two of them I think (i.e. W5100-based Ethernet shields)
 
I was going to go for a 20x4. I'll look at some datasheets. The MCP23008 has a 25mA current limit per pin, but if we move that LCD pin to an Arduino pin we will have more headroom and it shouldn't be an issue.
interestingly enough the 20x4 LCD with white backlight uses only 15ma:
http://mouser.com/ProductDetail/New...=sGAEpiMZZMt7dcPGmvnkBq9RSAvEJGmR8NQyR9CrIfw=
:)
Out of curiosity, can you look at the pinout I have for matching the MCP to the LCD and see if it matches what you're using?
This is how mine is wired:

V0 comes from a trimpot, the rest:

MCP23008 PIN |LCD PIN
GP0 |DB4
GP1 |DB5
GP2 |DB6
GP3 |DB7
GP4 |RS
GP7 |E

GND, VDD, R/W, BKL- don't need pins just GND or +5V
BKL+ is on PB1 on the ATMEGA chip.

Just re-read this. I really don't wanna lose more PWM pins. :lol:
Yeah I hear you. but we don't really need to use a PWM pin. Just that there will be no software dimming/adjusting of the brightness. Only via the trimpot.


3) LED dimming (I'm going to need 4 or 5 just for this)
Do you think it is possible to move that to the LED driver part?

I agree, thought, a PWM expander would be nice.

Programming this beast will be hell with all these expanders :lol2:
 
Programming this beast will be hell with all these expanders :lol2:

If the chip used in the Mega, or any of the other "bigger" chips were available in reasonable packages they'd solve many of our problems. That's what had me thinking off on a tangent above, with regards to the Teensy++. That chip would cut down on our overheads.

I'm thinking that we should just proceed as-is for now. We've still got a few of each type of output pin available. We only have one port expander on the board, and for most people that should be enough - they'll be able to control two or three LED drivers or fans, plus have a few GPIO pins to read float switches, etc. And if we're using a port expander on the relay board anyways, we won't need pins for that. So, I guess it's two port expanders for the core build - one for relays and one on the mainboard for the LCD.

We should flip a coin on the backlight for the LCD though. PWM or digital? I'm kinda leaning towards digital. On/off should be enough for most people, right?
 
I take it the Mega is a surface mount only. Sorry don't have time to look it up right now. I was wondering earlier why you did not use it. If it is not too fine pitch I would consider using. I would configure the board so that it fits a standard shield. And then take/use the addional pins for on board stuff or to a 'Hydra' proprietary connector. This board might be a little bigger, but as long as the shields stack I don't see a problem.

Just thought of this. The teensy can come with pins for bread boardings. Use that part and solder it in as the processor. Will that give us all the pins of the Mega? Give use the surface mount part with through hole soldering.
 
The official Arduino Mega uses the ATMega1280 uc which is available in 100-pin TQFP or CBGA packages. No frikkin' way I'd attempt one of those hand-soldered. :lol: At that point I'd just roll this project into a Mega-specific shield. But the Mega is expensive, and not 100% compatible (see below).

The Mega and Teensy++ introduce other "problems." Many of the peripheral interfaces (I2C, SPI) are on different ports, so it's not a direct match to the Duemilanove, which means some shields don't work on all of the above, even if you bring out headers and consider physical constraints.

I started daydreaming about this project last summer, and at that point I was basically going to do what you suggested - use one of the "breadboard compatible" clones as if it was a processor and "plug" it into a PCB that had headers brought out for shield compatibility, plus custom circuits for a reef controller. I abandoned the approach because it's just too messy. You can't put the plug-in in the middle of the PCB between the headers because there isn't enough clearance, for instance. Plus the pin-mapping problems I mentioned above. So in the end, I think the approach we're using now has some compromises, but maintains compatibility and will meet the needs of all but the most complicated efforts.

And if someone did come across a need for a ton more memory/pins/etc they could just build a cheap Arduino compatible (RBBB, Teensy, etc.) and slave it to the Hydra via I2C or some other serial connection.
 
I sort of figured it was something like that for packaging.

I am not sure I am going to go to all the effort you are for Ph. I am much more interested (right now) in ATO, and daily small water changes. But I will keep throwing my .02 in for what it is worth.

We could match the Duemilanova headers so the shields would work,but it would require a software change. Not being familiar with the software tools, maybe that is harder rhan I think. I think IIC was one of them. Modify the code to use the Mega's pins and then take those out to the normal shield location rather than the Arduino's standard pins..

I assume the shields are stackable. So the header must have an extra long pin going thrugh the circuit board. You could use these to get extra space between the boards. If the are 1/4 inch high then solder one down, insert another and that would give 1/2 to the shield.
 
We could match the Duemilanova headers so the shields would work,but it would require a software change. Not being familiar with the software tools, maybe that is harder rhan I think. I think IIC was one of them. Modify the code to use the Mega's pins and then take those out to the normal shield location rather than the Arduino's standard pins..

If you're talking about matching the Mega's pins to the Duemilanove's layout to get the peripheral interfaces working, it's not really possible. The problem is there's a conflict of aliases. For instance, on the ATMega328p used on the Duemilanove, there are 14 pins the Arduino environment refers to as "digital" pins. Digital 10 -13 are tied to the 328's hardware SPI interface, so if you want to use SPI, you're using "digital 10-13." Meanwhile, the 1280 used on the Mega has the peripherals on different pins - SPI is on "digital 50 - 53." So, if you mapped the Mega's pins to the Duemilanove's headers based on "pin numbers" the SPI stuff wouldn't work, and if you mapped it based on peripheral interfaces, stuff that depended on the assigned pin numbers wouldn't work.

There are still shortcuts around these issues - you can get around some of it in code, which is what most "mega compatible" shields do. By default, the mega maps the default pins to the default headers based on pin number, and the extra pins are broken out way down at the right end of the board. This strikes me as an awkward design, but it would be usable. Still though, if we tried to go with the 1280 chip, we'd be left with either an impossible-to-solder package and the effort of burning bootloaders in-circuit, or spending $50 - $60 on a Mega board, which is more than the whole Hydra mainboard should cost, so it doubles the cost of the project. The components we're using to embed the standard 328p on the Hydra will only cost $6 or so.

I assume the shields are stackable. So the header must have an extra long pin going thrugh the circuit board. You could use these to get extra space between the boards. If the are 1/4 inch high then solder one down, insert another and that would give 1/2 to the shield.

Those are the default pins used on shields to get "stackability."
 
Terahz or others, what's your level of attraction to ethernet functionality?

I'm wondering if we should just make the board another inch taller and include a simple ethernet interface. It might add $5 in parts but would save $20 - $40 on an ethernet shield for those who wanted it.
 
Sounds good to me. I want to be able to access the controller remotely or get information from it when I have internet access.
 
Back
Top