Close

Hardware changes between rev. A and B

A project log for rbServo

CAN controlled hobby servo

rasmusbRasmusB 03/23/2014 at 18:450 Comments

While Rev. A was a success when it came to get CAN traffic working and starting to learn how the ATmega16M1 works, some changes were needed for Rev B.

1) PWM motor control is moved from the PSC (Power Stage Controller) to the PWM generator on TIMER1. This might seem strange since the PSC is explicitly designed for motor control applications. However, before I built Rev A i didn't notice that the PSC is only available on the more expensive ATmega16M1 and ATmega64M1. In an effort to keep costs down, I opted not to lock myself into the more expensive option.

2) I dropped all plans of running an external magnetic encoder over SPI. I had built a 12-bit resolution magnetic encoder, but was having trouble with the mechanical properties. The alignment of the magnet and the sensor chip was extremely sensitive, and I never got it working properly. As a result, the movement range is now limited to the approx. 200 degrees of the unmodified servo instead of the continuous rotation I had planned originally. Also, adding a sensor, magnet and custom shaft to each servo would be pretty expensive.

3) A second LED is added for more useful feedback

4) I had made a mistake by connecting ARef to 5V. This makes it impossible to switch between the different voltage references available to the AD converter, and even trying might damage the chip. Also it makes measuring the internal temperature of the chip impossible.

5) The CAN transceiver was replaced to a model with similar characteristics, but which was available in a smaller package.

The first batch of Rev B PCB:s will be manufactured during next week, and they'll take another two weeks to arrive in my mailbox. During that time, I hope that I'll also get all the components needed as well as the 3D-printed servo lids. I'm expecting the PCB for my debugging adapter during next week as well, without that I can't get my firmware on the chip. A CAN bootloader is planned for the future, but I haven't made any progress on that yet.

Discussions