a day ago •
Here's a rendering of a fully assembled moti:
and here's an exploded view:
The exploded view shows how the product assembles together. You can see how the magnetic spindle has a shaft that fits in the output gear. It's the same size as the potentiometer shaft used used in conventional servos. The spindle spins right above the magnetic encoder IC which is on the bottom side of the pcb. The spindle maintains it's rotation axis by fitting a nipple (?) into a registration hole in the pcb. The design has changed a little since this model was generated but it's still quite close.
Drawings were done in Solidworks. The same designs are used to generate .stl files that have been used to 3d print the case bottom and the housing for the magnetic spindle.
4 days ago •
I've been working on the firmware without actually doing a whole lot of coding. I'm kind of circling from the outside to suss it out without rushing in. My ideal is to improve the quality and so I'm looking into best, or at least better practices. Recently, I've been reading Making Embedded Systems. I recognize the risk of brown-nosing here as it's written by one of the judges, but it's also on my mind right now. See, I have no formal training in engineering, and in order to improve I need to see things in practice. This book contains some really nice design patterns for better organizing firmware, and shows examples of how to implement them. The book I discussed previously, turned out to be a bit too theoretical, which is fine if you have the training but left me wondering "ok, but how?"
Anyways, some of what I've been working on includes the following diagrams. For the record, these kinds of diagrams are not discussed in the book. The first two are use cases. This one represents a sequence of actions, and invoked methods that occur when someone remote controls a Moti-enabled robot:
The second shows a sequence of events that occur when someone is recording a sequence of manual manipulations of a Moti enabled robot, and then plays them back:
These diagrams are not exhaustive. There's more steps involved. However it's enough to suggest that the model for breaking code apart could work. Okay, so having done the use cases I went on to make a UML class diagram. Now, I can imagine that many think it's a waste of time, but for me I wanted to try using one of the tools available to clarify each class and their relationship before writing them.
One thing I realized making the class diagram was that I could decouple the network hardware from the network protocol. Maybe that in itself made it worthwhile.
Anyways, it's all still new to me so If you see anything wrong with the diagrams please let me know. It's been a fun exercise and quite the opposite of how I usually dive right in...I kind of feel like George Costanza:
By the way, if you want to use the same tools I did, try draw.io for the class diagrams, and the very cool web sequence diagrams for you guessed it, the sequence diagrams.
5 days ago •
I just discovered that Austria Microsystems (AMS), my preferred source for magnetic encoders have recently released the AS5600. It looks very promising compared to the AS5050A I have been using. It costs $1.65 (per 1000) versus $2.98 for the 5050, and has 12 bit resolution versus the 10 bit of the 5050. It also requires fewer external components, and can run at 3 or 5V levels. This means I can eliminate a voltage regulator, a level shifter, and several passives. Switching to the 5600 should reduce the BOM cost by at least a couple of dollars. It even uses I2C or Analog out, instead of SPI + interrupt line, so even fewer IO pins will be consumed.
At any rate, I will continue developing with the 5050 for now, and later swap to this newer chip. In theory, it shouldn't be too complicated to switch from one to the other, because Moti has a modular design where the encoder is broken out on it's own board.
In fact, the flip side of the Moti encoder board was designed to the AS5161, which turned out is not appropriate for Moti. However, its SOIC-8 package, and the layout of the power pins and analog out pin are the same as the 5600, so I may be able to start working with it right away!
Hmmm, it would be pretty awesome if I can use just an A2D pin to capture position, because then the encoder board could perhaps be swapped for a pot if the user wanted to try Moti circuits in regular servo motors.