Since I know there will be a new release coming on this to take care of the issues with the BootOK signal I wanted to put forth some ideas I've been mulling about for Mightyboost changes.
Felix, you mentioned in some of your projects posts about keeping the mightyboost and the RPi gateway on two different moteinos (mainly for programming so that when the moteino reboots it doesn't cause the 5v out and the thus the RPi to suddenly shut down) and while this approach is fine mostly and while at $12~ that isn't really a cost thing for me it is a size, wire complexity (looks? I'm a vain electronics nerd I guess) and then there is also the marginal additional power draw. So far my idea's include:
- Having the 5v out set to default on.
- This requires a hardware change so that when the moteino is being programmed it would stay on. Maybe reverse the login at the 5v output transistor so that a low would turn on power and a high would turn it off.
- And a software change to handle the reversed logic for the 5v output in at pin 4
- Also a hardware change should include a cap over the pin 4 to transistor so that quick changes in startup before setup rolls through shouldn't toggle it to quickly.
- Changes to how the signal pin is read by the RPi. maybe instead of just High/Low we make it a signal of some sort. If the end game is to use this as the gateway maybe we do away with the Shutdown signal all together and make that part of the serial communication. then we can ack the request and all that and ever handle the BootOK better.
Thanks for your suggestions, sorry for the tardy reply.
I've been pondering over some of these changes myself. I keep going back to the idea of making an integrated board that plugs into the Pi and has all the functionality of Moteino and MightyBoost combined in a compact board, then no need for cables and jumpers. That's a pretty complex project in itself though and I'm trying to push other things forward right now.
MightyBoost is not for everyone though. The reason for the way signals work is that most people equate a 1 with a HIGH/ON and a 0 with OFF, and they expect something to be OFF until they turn it ON. Which makes perfect sense. To deviate from that to allow wireless programming is a bit of a stretch. Besides the logic of the Moteino that runs MightyBoost is very straight forward. If you bundle that with a radio and all the logic for a gateway it's getting crowded. That brings me back to the more integrated approach where everything is on one board that can do all these things.
Agreed about the cap to BJT.
About the serial comm ... not sure that's the best approach because that would tie the serial for those that are not using this as a gateway and need the serial for other purposes. Also there is no way to know when the Pi has completed the shutdown sequence unless you toggle a signal HIGH and then let the kernel unwind the GPIO and bring that down to LOW. This was a very important consideration very early on in the design and also in the design of ATXRaspi which uses the same principle, and also the same script for shutdown.