Author Topic: Moteino CuPID HAT  (Read 18436 times)

ColinR

  • Full Member
  • ***
  • Posts: 176
Moteino CuPID HAT
« 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/ >>

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:
  • DS2483 1Wire bus master
  • Serial, 1Wire, and a number of GPIO/ADC screw terminals/headers
  • R4 Moteino footprint
  • 3 x 8P8C (RJ45-like) IO ports, pinout as here: http://interfaceinnovations.org/images/cupidcontrols/cupid_io.jpg
  • 8 analog/PWM/DIO (from Moteino) also attached to IO pins above (shared with Pi GPIO)
  • HAT programmable EEPROM (per the standard)

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
« Last Edit: February 28, 2015, 07:58:30 PM by ColinR »
CuPID Controls :: Open Source browser-based sensor and device control
Interfaceinnovations.org/cupidcontrols.html
cupidcontrols.com

ColinR

  • Full Member
  • ***
  • Posts: 176
Re: Moteino CuPID HAT
« Reply #1 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


« Last Edit: February 16, 2015, 11:25:42 PM by ColinR »
CuPID Controls :: Open Source browser-based sensor and device control
Interfaceinnovations.org/cupidcontrols.html
cupidcontrols.com

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Moteino CuPID HAT
« Reply #2 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.

ColinR

  • Full Member
  • ***
  • Posts: 176
Re: Moteino CuPID HAT
« Reply #3 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.
CuPID Controls :: Open Source browser-based sensor and device control
Interfaceinnovations.org/cupidcontrols.html
cupidcontrols.com

ColinR

  • Full Member
  • ***
  • Posts: 176
Re: Moteino CuPID HAT
« Reply #4 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.

« Last Edit: February 16, 2015, 11:18:43 PM by ColinR »
CuPID Controls :: Open Source browser-based sensor and device control
Interfaceinnovations.org/cupidcontrols.html
cupidcontrols.com

ColinR

  • Full Member
  • ***
  • Posts: 176
Re: Moteino CuPID HAT
« Reply #5 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
CuPID Controls :: Open Source browser-based sensor and device control
Interfaceinnovations.org/cupidcontrols.html
cupidcontrols.com

ColinR

  • Full Member
  • ***
  • Posts: 176
Re: Moteino CuPID HAT
« Reply #6 on: February 16, 2015, 05:28:24 AM »
sneak peek:

« Last Edit: February 16, 2015, 05:33:46 AM by ColinR »
CuPID Controls :: Open Source browser-based sensor and device control
Interfaceinnovations.org/cupidcontrols.html
cupidcontrols.com

ColinR

  • Full Member
  • ***
  • Posts: 176
Re: Moteino CuPID HAT
« Reply #7 on: February 16, 2015, 05:48:30 AM »
CuPID Controls :: Open Source browser-based sensor and device control
Interfaceinnovations.org/cupidcontrols.html
cupidcontrols.com

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Moteino CuPID HAT
« Reply #8 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?

ColinR

  • Full Member
  • ***
  • Posts: 176
Re: Moteino CuPID HAT
« Reply #9 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
CuPID Controls :: Open Source browser-based sensor and device control
Interfaceinnovations.org/cupidcontrols.html
cupidcontrols.com

ColinR

  • Full Member
  • ***
  • Posts: 176
Re: Moteino CuPID HAT
« Reply #10 on: February 19, 2015, 03:58:09 PM »
CuPID Controls :: Open Source browser-based sensor and device control
Interfaceinnovations.org/cupidcontrols.html
cupidcontrols.com

ColinR

  • Full Member
  • ***
  • Posts: 176
CuPID Controls :: Open Source browser-based sensor and device control
Interfaceinnovations.org/cupidcontrols.html
cupidcontrols.com

ColinR

  • Full Member
  • ***
  • Posts: 176
CuPID Controls :: Open Source browser-based sensor and device control
Interfaceinnovations.org/cupidcontrols.html
cupidcontrols.com