Robot electronics

Connecting these together was straightforward although laborious. It almost felt like dealing with consumer electronics except that there was the danger of miswiring and damaging them.

This config requires 5 pins for each motor: a-out/in, b-out/in, pwm. That would have required me to allocate all of the pins plus some analog inputs, so I went to look for alternatives.

There are various utilities to extend the I/O on arduino. I could rely of some of them in future, but I ended up picking up NPN transistor and resistors from velleman assortment kits. Since the a-out and b-out just decide which way the motor is turning, I put a NOT-gate to drive b-out using a-out. This freed up one pin from controlling each motor.

I haven't used bipolar junction transistors for anything, so I didn't really know enough about them. My intuition to wire it directly would have produced a short, possibly burning the a-out pin in my arduino. It was a good idea to read a bit online about a component I weren't sure of. Eventually I found out a diagram of exactly what I wanted to build and understood what each component in the diagram did:

not gate

The R1 pulls up the output signal when transistor is cut-off and prevents short circuit when the transistor is saturated. The R2 prevents a short-circuit with the input signal.

I could have also saved a pin by connecting a-out and b-out into PWM channels. It's something I only figured out while writing the blogpost. But I like sparing three of my PWM channels too.

I'm going to use these electronics to drive a delta robot. If I calculated it right, the head should be able to lift 10kg upwards 50cm in a second. It's bit slow for an usual delta but should give me some precision without switching out from the relatively low resolution encoders. The high transmission ratio appears to provide strong hold when there's no load.

The is rigid enough that it should be able to withstand the forces.

Similar posts