Moteino MEGA update

I wanted to give those interested an updated about my efforts with Moteino MEGA (atmega1284p based Moteino). The issues are now apparently resolved and the atmega1284P is playing nicely with the RFM69 radios and the Windbond FLASH chips I am using and I am looking forward to making the first batch of MEGAs in the near future. It was mainly a SPI timing issue and the 1284P core. I was also able to rewrite DualOptiboot based on Optiboot V5.0, and can confirm that wireless programming is working on the 1284P, I will post the updated bootloader soon. There will be minor but important updates to the RFM69 and SPIFlash libraries. I will release all these in the near future along with the MEGA and its own Moteino MEGA Arduino core. Hopefully this will be a useful and stable platform for those in need of more GPIO and the extra features of the  larger atmega1284p microcontroller.

SwitchMote R2 Kit released

Update: The assembly and user guide for SwitchMote R2 has been drafted and is published here. SwitchMote is now available at the LowPowerLab webshop. The guide for R1 is still available here. Pricing is overall about the same as before, unfortunately the isolated Recom PSU used in the kit is a very pricey component, but people asked for isolation and certified components, so here we are.

SwitchMote R2 coming soon

UPDATE: It is now released (release notes). Assembly & guide is here. Kit available at the shop.


You asked and I’ve listened.
SwitchMote R2 is coming soon as a 100% kit, and should address most safety concerns and shortcomings of R1. I gave up the previous non-isolated design because of different considerations. The switching regulator was not able to work reliably beyond 185V from a half wave rectified input. Then lots of people talked about isolation and supporting loads higher than the 100W on R1. Well I came up with a design that is only slightly bulkier, and is fully isolated (3kV) through a UL certified PSU that supplies 5V @ 400mA for the electronics, uses a very compact coil relay with up to 5A @ 250V load. The design is also much more balanced and I’m happy with the result, the back cover plate uses 4 mounting spacers+screws, allows programming through the FTDI female connector. You can solder your wires directly to the PCB if you are required or you can use the traditional screw terminal. And lots more to talk about but more details will be included in the assembly and usage guide. And yes it works at 240V, doing timed testing right now:

The non-isolation part was of concern because of liability and because I am not a huge company to back it up. To prove my point, look at the tear-down photos of this IRIS switch, it uses a non-isolated design, will you buy it? Continue reading

PowerShield R2 released

Due to some intermittent voltage drop issues on the first revision of PowerShield I refactored the design and released a new PowerShield R2 based on the LTC3525 fixed 5V booster that should address this issue. This is a much more expensive chip than the TPS61220, others have used the Linear Technology boosters with success so hopefully it’s more reliable, but price will reflect this. It also means there is no switching between 3.3V and 5V output any more. For 3.3V projects, a Lipo can be connected directly to Moteino and the onboard regulator will provide up to 250mA of current to the Moteino itself and any other peripherals attached. There are also some other changes, notably the charging current has been set to 212mA (4.7K PROG resistor on the MCP73831), down from 500mA (2K PROG). The battery connector has been rotated 90 degrees and a notch underneath it was added to allow the wires to be flush to the enclosure sidewall. The rotation was done to allow the USB charging side to be inserted in the wall of an enclosure without the wires interfering with that. This should be ideal for MotionMotes or similar projects where a PowerShield+small Lipo are used instead of a 9V battery. Then the MotionMote could be plugged in and recharged whenever it runs out of juice, without opening the box. Continue reading

Moteino MEGA prototype

UPDATE: The issues are now resolved. See this post for updates.

Hello folks. I’ve been trying to develop a new Moteino variant, one based on the ATmega1284P chip. I dubbed it Moteino MEGA since it has significantly more memory, IO and functionality than the 328P. All went well except when trying out with RFM69 radios, I can only transmit but not receive. So I’m writing this post in hope that someone else tried the RFM69 library with an Atmega1284P and has some tips to spare. I’ve been using the maniac-bug 1284p arduino core and from all I can tell the external interrupts are set correctly in this distribution. I used my Node sample sketch with appropriate RFM69 settings. The receiver is a regular Moteino. The Moteino MEGA is calling sendWithRetry(…) which sends the packet 3 times until it gives up. All three packets are received at the gateway, and all 3 ACKs are sent back. I modified the RFM69 lib to attach the interrupt routine to INT2 if it’s a mega1284p. But the interruptHandler() in the library does not trigger on the Moteino MEGA. I pulled the logic analyzer and it looks like the INT2 (D2, wired to RFM9’s DIO0) goes HIGH when it’s expected (and stays HIGH quite long, weird), but the interrupt routine is not called. That’s where I’m stuck. At this point I’m not sure where the issue is but I tried a simple interrupt handler program which seems to trigger just fine:

boolean interrupt = false;
void blink()
{
  interrupt = true;
}

void setup()
{
  pinMode(LED, OUTPUT); //LED=15
  attachInterrupt(2,blink,RISING);
  Serial.begin(115200);
}

void loop()
{
  if (interrupt)
  {
    Serial.print("X");
    for (byte i=0; i<10; i++)
    {
      digitalWrite(LED, HIGH);
      delay(25);
      digitalWrite(LED, LOW);
      delay(25);
    }
    interrupt = false;
  }
  
  digitalWrite(LED, HIGH);
  delay(500);
  digitalWrite(LED, LOW);
  delay(500);
}

I hope to get past this hurdle and be able to release this new board since some people asked for more memory and IO. I have yet to port DualOptiboot to it but I need to solve this mistery first. Maybe there’s a bug in the 1284P core. Or something I’m omitting, just out of ideas right now. If anyone has an idea why this is happening please let me know. Thanks!

UPDATE: I tried an RFM12B with the atmega1284P and the good news is it works with my RFM12B library. The bad news is that after about 15 minutes of running the sample send sketch it stops working and the atmega1284p appears to be completely nonresponsive, even to the AVR programmer. I’ve tried this with 2 chips, both died after about 10-15 minutes of continuous transmission. So I’m baffled. The power supply is the same as the regular Moteino – 3.3V and nothing heats up, radios wired the same except to INT2 instead of INT0, same 16mhz resonator. Chips were from digikey so I don’t think they are counterfeits. Any hints anyone?

Moteino Power Shield now available

I kept talking about it here and there in the forum and the blog. And finally now it’s for real. Parts have been sitting around for weeks and I finally managed to free up some time and get a few assembled, take some shots and put it up on the shop. I know a lot of people asked “how about if you have projects that require 5V because of some special sensors”. So this little board came about for that specific reason. And since I was at work generating 5V from almost nothing, why not add a lipo charger, a voltage level detector, a little prototyping area and a switch (but maybe not the kitchen sink) ?

The charger chip is the popular MCP73871, charges at 500mA via USM mini-B and has a charging status LED. The booster is the mighty TPS61220 adjustable output boost regulator. The output voltage is 5V by default. It can be switched to 3.3V if wanted, by means of a solder jumper:

Even though it works, you should avoid trying to get 3.3V output from a 3.7V lithium battery, because … well … it defeats the purpose of it. Try getting 3.3V output from something much less than that, say a AA/AAA cell, that will put this board to good use.

I’ve started using this to power MotionMote from a small 400mA battery since the PIR sensor requires at least 5V, and Moteino will work great with 5V input (on “VIN”). So that’s a great application, and battery voltage monitoring comes included, sweet. The little lipo won’t last a long time (actually I don’t know how long … we’ll see), but when it does, I can see it from the incoming battery level indicator, and then just quickly recharge it. Not awfully inconvenient. The battery voltage monitor is just a VCC-1Meg-470K+0.1uF-GND circuit which divides the voltage and feeds it into Moteino analog pin A7 where you can read it as analog and interpret it according to what battery you got hooked up. A formula that I use for batteries up to 9V is:

int batteryReading = analogRead(A7);
float battV = ((float)batteryReading * 3.3 * 9)/(1023*2.976);

As you can see there’s also a small prototyping area. The Moteino can be mounted above or below, your choice, just keep the power pins aligned of course. The switch should be OFF to avoid loads when charging and let the charger exert its love on the battery uninterrupted.

At this point it hasn’t been extensively tested but I’ve had no issues using it in my projects. And hey this little board will resurrect your AA batteries from among the many dead you surely have around (you didn’t throw all those away right?). Getting 5V/3.3V from as low as 0.7 is not too hard for the Moteino Power Shield.

Eagle schematic and layout are available on Github.

SwitchMote released!

SwitchMote is now finally released and available as a kit in the shop!
Thanks to all the followers for their patience!

There is now a guide page for SwitchMote that includes assembly details, technical specs, and of course relevant disclaimer and warnings. Anyone attempting to buy SwitchMote should read that guide and agree to the terms of purchase before doing so. LowPowerLab assumes no responsibility for how SwitchMote is used.

The guide is a work in progress and more details are added as they become available. Code is not yet published as it needs some final touches, but should be ready in a few days.

SwitchMote has been in development for months and went through several prototype revisions. But it paid off. The current version is stable and more user testing will hopefully lead to turn out even better features and fine tune the future revisions.

SwitchMote project update and demo

I put together a quick video to show the progress of SwitchMote and a simple demonstration of how it works and how it can be used in home automation. My goal is to offer a smart wireless light switch controller that allows syncronization with other units independently (without the need of a gateway/coordinator) to create light scenes, and increase the usability of a regular light switch.

Continue reading

What’s up at LowPowerLab?

Haven’t had much time to blog lately, too much stuff going on all fronts. That’s not to say LowPowerLab is idle, no no…. On the contrary the shop is keeping me busy and I have a few new projects I am working on. I am trying to bring a few kits to fruition.

First and foremost I’ve spent a lot of time developing an integrated solution for SwitchMote. I want this thing to come to life and just be awesome, I think I’ve spent way too much time on it to just let it die. I now have another prototype including a shield with 3 user buttons and 2 LEDs per button, which can all be used in any way, or left unpopulated if only 2 or 1 buttons are desired for a light switch. The point of having multiple buttons is being able to control or synch with other SwitchMotes or … do anything else you want like say … interact with GarageMote. I’ve managed to get a cover plate also that will be mounted on the wall to cover the switch box. I used the same diffused white I laser cut for the MotionMote project. I like that diffused white a lot, but there’s many possible colors on inventables.com to choose from. For now I am continuing to develop this project, write code, adding some basic mains protection and getting all the physical engineering of this thing right. So far I’m pretty happy, it’s a pretty good improvement over the first prototype I had:

Continue reading