Skip to main content

EarthRover - Getting on the Bus!

Have you ever wondered how electronics talk to each other in space? Well in this post I’m going to talk about just that and how the EarthRover will be using communications both onboard and to a remote satellite unit!

 

Making stuff work in space is hard work with all the extreme temperatures and g-forces. Then there is a load of radiation that we just don't see here on earth. So having equipment talk to each other in space or on another planet needs a strong, robust and reliable system. The answer comes in the form of a communication bus called SpaceWire.


In the 80’s I used to sit for quite some time waiting for my ZX Spectrum to load a game from cassette only to find at the very last second there was a error and the computer reboots itself! So imagine the type of data a satellite or other space critical mission will have to carry out today. Getting your data corrupted or ending up in the wrong hands could be a disaster! Its not just your data that's important either, the communications between subsystems on the platforms is also critical. One wrong turn could see the Mars Rover in a ditch!


So Spacewire works by having two separate parallel buses one if one fails the other takes over. Each bus uses differential mode signals and encodes the clock and data together in the signals. This however comes with a disadvantage, its not standard or easy for hobby electronics to recreate. So when it came to looking for a bus communications system for the EarthRover, well I had to look for something a little closer to home.


There are lots of different standards that could be used like I2C or SPI but these are not really designed for ‘off-board’ systems even if I have used them myself in this way. RS232 would be better but is only point to point and CAN bus could be a option. However I decided to use a simplex RS485 physical bus. This has very good noise immunity and adding a RS485 line driver to a circuit or development board only needs one chip. This makes using it very easy especially as nearly all microcontrollers have a UART on them.


The choice then is to select a protocol that could be used over the RS485 bus. I have in the past used MODBUS which is free to use and has lots of support on the internet. However after some testing I found a problem. The issue was that it needs a more complex CRC generator and our tests showed that some development boards could not make the grade. It’s important that this design is easy for others to work on or use at a later point in time. So having restrictions would not do so MODBUS had to go.


It came to me however that what we needed was the best bits of each system. Having selected RS485 I looked back at other protocols. I found that each was designed to work with the platform design in mind. This is more evident with SpaceWire so I decided to create EarthBus.


So despite sounding like a London Red Bus I decided that I would create a protocol that was easy to use on all microcontrollers (a simple CheckSum system) and have messages that fit with the requirements of the EarthRover. Its follows a very basic 19200 baud with 8 bit data and parity. Its designed to address a target subsystem as well as carry commands and data.


One of the critical messages would be a way to send firmware updates to a target device. Other quick commands include telling equipment to sleep or ask if they need servicing. At this time only the basic framework is in place but myself and my son have been using it without issue. having control of the data and how it is formated is very helpful even if its a little non-standard.


As the EarthRover grows I will be adding commands and hope to give more of a insight to how the rover will work.


For more information on the EarthRover project please see the first blog here on DesignSpark.


You can also follow the project on facebook.


Thanks

Paul (aka @monpjc)