A couple of months ago, forum member, Kirk Fraser offered to pay me to write an object to interface a Propeller with AustriaMicroSystems AS5055 magnetic encoder chip.
It was a fun job. I posted my progress of writing the code in this thread
As I learned to use the sensors, I became impressed by them.
I had been wanting to learn to use DipTrace for a while so I thought I'd try making some PCBs for this chip.
I had used Eagle a little, but at the suggestion of someone here at Parallax, I switched to DipTrace. I'm very glad I did. It didn't take long for me to know how to use DipTrace better than I did Eagle (I didn't know how to use Eagle very well).
Anxious to get a PCB made, I submitted this board to BatchPCB as soon as I had DipTrace figured out enough to make a footprint for the chip (I've since learned where to find the various footprints in DipTrace) and lay some traces.
I didn't submit the silkscreen layers because I couldn't get the silkscreen items to behave the way I wanted. I've got a little better with the silkscreen but I still can't turn off the patterns' silkscreen component (for example the box around a set of headers).
I sent the above board in on May 2. I think I still have another week or two before I'll receive it.
The above board can use any of the AS5055 communication modes including the 4-wire SPI daisy-chain mode. The above board could be daisy-chained by having the incoming wires connect to the left side of the board and the outgoing connect to the right side.
The holes that aren't on either the far left or far right of the board are for jumpers used to configure the chip.
One application I hope to use this chip for is as an encoder on continuous rotation servos.
A lot of the servos I've converted have potentiometers 1/2" in diameter. I wondered if I could design a PCB with one of these sensors small enough to fit in the 1/2" spot left by the pot.
For my first attempt, I used the sensor in 3-wire, read only mode. I tried to see how many would fit on a 5cm x 5cm board
that Itead Studio uses.
After seeing 16 PCBs fit on one of the 5cm x 5cm boards, I realized the price of the PCB itself wasn't very much with such a small board. A 4-layer board costs more, but a PCB of 0.25 square inches wouldn't cost much per board.
With 4-layers, I was able to add the extra lines needed for 4-wire daisy-chain mode.
The center 1/2" circle could be cut out and it would have the same functionality as the larger board. The pins not inside the center circle are there to make it easier to make connections with the board.
A 2x5 header could be used to connect with a 10-wire ribbon cable. A 10-wire ribbon cable would allow many of these sensors to be easily daisy-chained together.
Because of the need for one boards MISO pin to be connected to the next board's MOSI pin, one of the wires on the 10-wire ribbon cable would need to be cut between each board. The wire cut would need to alternate from one board to the next. A pair of jumpers would need to be set on each board to connect the MOSI and MISO pins to the appropriate wire.
The chip also includes an interrupt pin and an enable interrupt pin that would also require alternating cut wires. There's a second pair of jumpers for connection these pins.
There are other modes these chips can be used in that don't require cut wires. I included pins and jumpers to allow the chip to be used in any of its possible modes.
I included places for the caps and resistor recommended when using long wires with SPI communication. I placed the non-essential capacitors on the top with the sensor. If the extra caps aren't needed, then the top of the board will be flat to make mounting the magnet hardware easier.
I've noticed much of the space of these boards is taken up by the various header pins. I wondered if using 2mm pitched pins would save space on a board and make it easier to make these sensor boards small.
Here's my attempt using 2mm spaced holes.
The 2mm hardware didn't help as much as I had hoped. One problem with the 2mm spaced holes is there is barely enough room for a trace to fit between the pins. I had to reduce the ring size around the holes in order to fit the traces safely between them. I'm not sure if I'll have this board made or not. I'll probably get a few made just to see if the 2mm hardware has any advantages I haven't thought of yet.
While the SPI protocol for these chips isn't very complicated, I think it might be hard for a Basic Stamp to interface with these chips.
I was hoping to find a way to make these sensors a bit more user friendly. One idea was to use a microcontroller with the chip so the sensor could then just send its data as asynchronous serial.
An ATtiny2313 has a built in UART but as very limited program memory. I decided to try using an ATtiny84 with this sensor and bit bang a serial driver for it.
(I had tried to fit the smallest Propeller package on a 1/2" diameter PCB, but I just could not get it to fit with the encoder chip, voltage regulator and EEPROM.)
Here's my attempt at a smart sensor board.
Front of the board.
Back of the board.
Top inner layer (with ground plane).
Bottom inner layer (with 3.3V plane).
I haven't figured out how to make a round board edge or a round copper pour.
I included a 3.3V regulator so the board could use the servo's power supply. One additional wire would be required to use the sensor with a microcontroller.
I included a jumper on this board so the user could decide if they wanted to use the board in serial mode or as in quadrature encoder mode.
The quadrature encoder mode would translate the position data into simulated quadrature encoder pulses. This way someone already setup to receive quadrature encoder information wouldn't have to change there program much when using these sensors.
I haven't figured out how many pulses per second an ATtiny84 could transmit yet. I plan to make the number of pulses sent per revolution configurable. I haven't worked on the software for this yet. I plan to work on the software while I wait for these boards to be made.
I'll likely make one other version of of PCB with this sensor. It will include the last board shown but with mounting holes and a place from additional headers that aren't so close to the sensor.
Now for some questions.
Do any of you see any problems with my last board (last four pictures)?
Any suggestions on other configurations of these sensors?
How do I make a round circuit board with DipTrace? How about a round copper pour?
Any suggestions on a PCB house to use? Itead Studios look like they have pretty good prices but they take 20 days of so to deliver the boards.
Kirk suggested PCBCart. I think they may be more expensive, but they also deliver a lot faster (I think in around 8 days).
I know with Itead Studios, it costs less if I submit multiple boards together and cut them apart myself. I'm not sure what the best (least expensive) method of submitting boards to PCBCart would be.
Thanks for looking and reading.