growing pains

A project log for Moti, a smart servo

Moti is a smart servo that simplifies the design of intricate robots.

Nicholas StedmanNicholas Stedman 09/06/2014 at 22:500 Comments

Once upon a time, I said this about having written the firmware as one huge file: "While it wasn’t as bad as you’d think, it’s clearly not ideal." This is the understatement of the year. It is as bad as you'd think. Disentangling, and refactoring into different libraries is slow, painful and messy! But at least it's getting done. I'm also looking forward to writing fresh code for the new hardware. 

On a related topic, in my haste to get the boards done, I overlooked an issue. The Micro's UART joins to the RS485 bus for daisy chaining. But this is also the port by which the Micro is programmed (and potentially communicated with while running) by another UART (eg. FTDI), so potentially two TX lines are tied to one RX (the micro's). Now imagine one goes LOW during transmission, the other is still HIGH, and so not only will the transmission fail, but the two competing lines may short out if they are unprotected. The remedy (working so far) is to add a couple of shottky diodes to prevent either of the TX lines from pulling the micro's RX HIGH, which is instead provided by a pull-up resistor. It's working, as I've been able to bootload the firmware onto the Processor hooray for that. However it looks like at least another board revision is in order.


In other good news, I received a Hackaday Prize T-shirt for Moti having done well in one of the open votes rounds. So thanks!