LowPowerLab Forum

Hardware support => Projects => Topic started by: ColinR on January 15, 2015, 04:05:17 PM

Title: Moteino CuPID HAT
Post by: ColinR on January 15, 2015, 04:05:17 PM
<<edit: see http://www.cupidcontrols.com/2015/02/cupid-v2-rf-hat-pi-b-pi-2-moteino-in-action/ (http://www.cupidcontrols.com/2015/02/cupid-v2-rf-hat-pi-b-pi-2-moteino-in-action/) >>

Hey all,

I'm getting pretty tired of sticking my Moteinos onto my CuPID boards using tape, velcro, and whatnot, and the Pi B+ has been out for a while, so I'm thinking about making a CuPID HAT for it. For the uninitiated, a HAT is an add-on board that conforms to a set of standards agreed upon by the RPi Foundation: http://www.raspberrypi.org/introducing-raspberry-pi-hats/

This what I've been doing for some time now: http://www.cupidcontrols.com/2014/02/making-of-a-cupid/

So the idea would be to incorporate most of the features, and also add a footprint for an R4 Moteino, which I use for sensor gateway:

I'm still planning doing a replaceable fuse and separately powered USB ports on a board, but it will have to be separate, due to size. Anyway, if anybody has ideas or things that would be interesting, let me know.

Colin
Title: Re: Moteino CuPID HAT
Post by: ColinR on January 17, 2015, 06:12:17 PM
Ok, I had a go at this and I'll probably send this off for a prototype.

In the end, I omitted a number of headers, due to space considerations. I left the 1Wire data header, since it's not available on the 40-pin, and tucked a 3.5mm header row for screw terminals if the Moteino isn't populated.

I used dual SMD (1206) and 0.3" DIPs for all passives, which result in a board that is hand-solderable, but can also be reflowed (except 8P8C jacks, Moteino, and 40-pin connector, which are exclusively through-hole.

I modified my pinout on the first 8P8C so that it matches the most popular 1W adapter, the DS9490R, so all 1Wire devices designed for it on either 6P6C or 8P8C can be used, for example those by iButtonlink that are supported by OWFS. It also results in 1W and 5V/Gnd being on different pairs, minimizing capacitance, which can be a problem for 1Wire networks.

8ADC pins from the moteino (A0-A7) are shared with 8GPIO output pins on COM2 and COM3 8P8C. This allows you to decide what you want to read from where. I may swap a few of these out to correspond with interrupts or PWM on the Moteino, but for now it seems like ADC is probably the most valuable.

4 total of the GPIO/ADC inputs have optional pull-up and pull-down resistors. These will also allow monitoring Vcc by installing both as a voltage divider.

The SPI header is also in place, for use with SPI devices inside the enclosure, namely the CuPID indicator board (http://www.cupidcontrols.com/2013/12/turn-on-the-spi-lights-spi-output-shift-registers-and-leds/).

Four DIO from the Moteino, DO-D3, are broken out on a header.

Happy to field questions.

Cheers,
Colin


(http://www.cupidcontrols.com/wp-content/uploads/2015/01/DIP-PCB_480.png)
Title: Re: Moteino CuPID HAT
Post by: Felix on January 19, 2015, 08:56:31 AM
Nice work, a little hard to follow the traces, schematic would be better here, but I think it's pretty clear what you're doing. I wonder if integrating a connector for a spi/i2c display (maybe like the OLEDs I use in OLEDMote) would be useful in some instances.
Title: Re: Moteino CuPID HAT
Post by: ColinR on January 19, 2015, 12:36:27 PM
Good point regarding schematic. I'll take a look at your pinout. I did just pick up a few of those displays after reading your post the other day.
Title: Re: Moteino CuPID HAT
Post by: ColinR on January 19, 2015, 01:04:56 PM
It's just a tough call all around to decide what to break out. I should really break out a few DIO from the Moteino as well, but space! Then, do I break out I2C from Pi or from Mote? I'd guess from Pi, but what if a Moteino user wants to use existing code? So many tough calls.

(http://www.cupidcontrols.com/wp-content/uploads/2015/02/CuPID-Hat.png)
Title: Re: Moteino CuPID HAT
Post by: ColinR on January 22, 2015, 06:08:44 PM
Going to add a few DIO from Moteino and then send this out.

If anybody wants one, I'll have a few kicking around.

C
Title: Re: Moteino CuPID HAT
Post by: ColinR on February 16, 2015, 05:28:24 AM
sneak peek:

(http://www.cupidcontrols.com/wp-content/uploads/2015/02/cupid_smaller.jpg)
Title: Re: Moteino CuPID HAT
Post by: ColinR on February 16, 2015, 05:48:30 AM
(http://www.cupidcontrols.com/wp-content/uploads/2015/02/cased_small.jpg)
Title: Re: Moteino CuPID HAT
Post by: Felix on February 16, 2015, 07:11:43 AM
Very very pretty :)
I increased the attachment size threshold - 400kb, any chance you could replace the schematic image with a larger one or re-attach it?
Title: Re: Moteino CuPID HAT
Post by: ColinR on February 16, 2015, 11:22:24 PM
Done.

I've tested everything out except the EEPROM. There was as miswire for the DS2483 on the SLPZ pin (note the yellow jumper wire), but all else is good.

This guy has an updated pinout, making the 1Wire compatible with all existing hardware that is wired to 8P8C (RJ45-type) or 6P6C plugs.

I've also run all the initialization routines and everything compiles and runs great on both the B+ and the Pi 2, for both apache/mod_wsgi and nginx/uwsgi setups. Preliminary benchmarks seem to indicate the speed is similar between the two.

Colin
Title: Re: Moteino CuPID HAT
Post by: ColinR on February 19, 2015, 03:58:09 PM
Programmed the EEPROM. Strangely painful:

http://www.cupidcontrols.com/2015/02/hat-eeprom-readwrite-configuration-for-rpi-b-rpi-2/

C
Title: Re: Moteino CuPID HAT
Post by: ColinR on February 28, 2015, 07:58:40 PM
http://www.cupidcontrols.com/2015/02/cupid-v2-rf-hat-pi-b-pi-2-moteino-in-action/
Title: Re: Moteino CuPID HAT
Post by: ColinR on April 03, 2015, 04:12:26 AM
These are now up in the web shop as boards, kits, and complete units.

http://shop.interfaceinnovations.org/index.php?route=product/product&product_id=59

http://shop.interfaceinnovations.org/index.php?route=product/product&path=33&product_id=61

C