UniMote MEGA : Templated Control for Moteino MEGA (UniMote MEGA)

Alright, so we’re super into the modular controller idea (see here for original post on the 328P version), and really like this new MEGA unit offered by LowPowerLab, the Moteino MEGA. It’s got tons of room for our programs, routines, and who doesn’t want MOAR? Anyhow, we’ll have to redesign our memory map based on the scads of IO now available. Here is what our available io map looks like:

UniMote Pin Label Name Function
0 0 PB0
1 1 PB1
2 3 PD0
3 8 PD1
4 9 PD2
5 10 PD3
6 11 PD4
7 12 PD5
8 13 PD6
9 14 PD7
10 16 PC0
11 17 PC1
12 18 PC2
13 19 PC3
14 20 PC4
15 21 PC5
16 22 PC6
17 24 PA0
18 25 PA1
19 26 PA2
20 27 PA3
21 28 PA4
22 29 PA5
23 30 PA6
24 31 PA7

Here’s our EEPROM map:

Item Bytes EEPROM Beg EEPROM End
NodeID 1 0 0
NetworkID 1 1 1
GatewayID 1 2 2
Encryption Key 16 3 18
iomode 25 19 43
ioenabled 25 44 68
ioreadfreq 25 69 93
loopperiod 1 94 94
sleepmode 1 95 95
sleepdelay 1 96 96
chanenabled 8 97 104
chanmode 8 105 112
chanposfdbk 8 113 120
channegfdbk 8 121 128
chandeadband 8 129 136
chanpvindex 8 137 144
chansv 8 145 152

With all this space, we’ve also added a load of other features. We’ll detail those here shortly.

2 thoughts on “UniMote MEGA : Templated Control for Moteino MEGA (UniMote MEGA)”

  1. Saw your fantastic write up on adventures-in-moteino-modular-communication-for-cupid-remote using the 328p moteino and now your write up on using the moteino mega.

    Can you use the same ‘sleep – lowpower’ routines on the moteino mega as on the 3280 moteino?
    I ask because the LowPower lib I found does not mention the 1284p processor.

    Found your 328p examples (uni_mote_2p3.ino and unimote_gateway_1p1.ino examples. WOW – excellent code

    I see that you use the LowPower lab to sleep the remote if its in SLEEPMODE. so it will wait for a set period of time to receive packets on serial and radio.

    I still learning the RFM69 and thought that even with the radio in sleepmode it could still receive a packet and trigger the interrupt to the moteino causing receiveDone to return true.
    Is your code not looping back to test receiveDone while sleeping or are interrupts disabled or ????

    I know that on motes that just send and maybe receive acks I can sleep low power but what happens if the radio gets a packet when the processor is in low power mode (aka powerDown). ?

    Thanks

    1. Hi Tom,

      Thanks for the kind words. Sorry for the slow reply; I’ve been away for a bit, quite busy, and then my host decided to lose a couple days’ worth of additions that included a reply.

      I have not yet tried to use any of the low power routines on the 1284P, as I’m really only running the 328P for battery-powered units where I want to conserve power.

      When the device is truly in sleep mode, it is completely dark and will not respond to either radio or serial input. It’s just waiting for the set period of time, after which it will wake up and run its routine. This is why I make sure all communication for this type of node is initiated by the remote node itself rather than the gateway. Things get a little trickier when you need to send a message to a node right away, but typically this is in cases where the controller is always-on anyway. For example, on my temperature controller, I want to be able to send a setpoint immediately to the controller from the gateway. This is no problem if it’s always on.

      Cheers,
      C

Leave a Reply

Your email address will not be published. Required fields are marked *