8 x DC or 4 x Stepper Motor Hat

rpi-8x-small-dc-motor

As mentioned in a previous post I could extend this to 8x DC motors. I realized that the screw terminals I used had a smaller 2.54 pitch version. Connecting 8xL9110 to drive 8 DC motors or 4 Stepper motors are easy and straight forward. This is a draft as I was keen on looking at terminators, but we will add some protection logic and order the Hat.

I have a personal preference to keep motor controllers away from Raspberry PI, but it is quite handy to have a multi motor driver for small motors. I have a robot arm with 5 DC motors that this board is perfect for.

Mini PWM Driver

mini-pwm-driver

I am quite found of these small boards so I reuse the MCU and RS485 interface on various designs. This one uses a ULN2003 to provide 7 PWM ports with up to 16V and 0,5A each. I use a 8 pin 1.27pitch connector. the 8th pin is V+, while the second row is all GND. This allows the board to be used for driving steppers, LED’s or small solenoid style actuators.

ULN2003 can actually handle 50V, but the regulator on the back is LM1117 that only handle 16V. I am actually only planning a 12V system so it will do.

 These boards all have a 120 Ohm terminating resistor mounted. In real life this resistor will not be mounted as I expect to deploy a lot of these boards in the same RS-X network. This one is tagged for Christmas lights, but with two months to go I will need a bit of luck to get the PCB’s in time.

RS-X Cable

rs-x-shield

As you deploy RS485 (or CAN) on larger distances you will need to increase cable quality and lower baudrate. For 15 meter I don’t fuzz, I just twist a pair of cables and hook them up. A good advice is to have standard colours for A+ and B-. For better cable quality you can use a shielded solution like illustrated above.

Twisted pair Shielded cable is quite common and don’t cost to much. Just remember that the shield should be connected to ground only on one side of a cable to avoid creating a ground loop.

RS-X Network

rsx_switch_p8

This is a simple, passive switch anyone can wire on a vero-board. It just connect 8 ports in parrallell.  “GBA+” is easy to remember and means Ground, B(-), A(+) and Power. You use one port as input and 7 as output in a classic star network.

 The only thing you need in addition are 120 Ohm terminators at the optional place. I introduced 120 Ohm terminators on every module, but I either need to not mount them or add a jumper. The same goes for this circuit as it need a 120Ohm resistor with a jumper.

rs-x-network

The illustration above shows a classic star wiring using these switches. In reality you can cover quite some distance with only passive switches like this. I am not worried about short distances like 10-15 meters, but as the network gets longer we need to take more care.

 Needless to say, this is 50 x 12mm in size and you can use the switch as a cable extender or T point as well. The mounting holes are M2.

Mini SW Draft

mini-sensor-sw-2

The Software on the Mini Sensor Module is outlined above. I need to wrap up a tight RS-X protocol as illustrated earlier. I also need a RTOS ported as well as sensor Logic for each sensor.

DHL11 (or 22) uses a bit-bang protocol. We will use an interrupt on this pin with some timing for decoding. It will send us Humidity and Temperature once per second.

The IR module is connected to an ADC and will measure distance. The Light sensor is also connected to an ADC measuring light.  The last sensor is the temperature sensor on STM32F030F4 itself.

The Data Map tionary is a small module that will map variables in the interface with actual variables in the modules. This is set up as a pre-configured table.

I am a bit concerned about 16Kb Flash, so I have the STM32F042F6 as a fall-back.

32 x Servo hat

rpi-32xservo-hat

This Hat takes advantage of the many pins on a LQPF64 to output a 32 channel servo Hat. 32 channels is a bit of an overkill for most, but the channels can be used for output, digital input and some for analogue input as well. A separate PSU connector for the servo’s must be provided.

The only drawback with this board is that it needs to be on top of a stack due to the Connectors. This was designed some time ago, but I have been holding these Boards back a bit.

Small DC Motor Hat

rpi-4x-small-dc-motor

This is the first draft on a small DC motor Hat. It allows 4 motors to be connected at present. I actually want more motors, so I have to find a smaller connector. I have sufficient space for 8 motors, but the connectors limit me. The challenge is that these 5,08 pitch screw connectors are very handy and not so large in real life – so they are harder to replace than it sounds.

5xCom 1.2

rpi5com1_2

Not that much to write home about, but this is the latest 5 port communication Hat. 

  • Simplified CAN driver.
  • Added double mounting holes for terminals to enable both vertical and horizontal terminals 3P 2.54 and 2P 5.08.
  • Adjusted drilling hole sizes to M2.5, the same as RPI.
  • Adjusted positions more accurate.
  • Increased GPIO header holes a little because they are a bit tight.
  • Tagged CAN and RS485 ports better.
  • Replaced XC6206 with LM1117 to get more 3.3V current available.