y


Paul Gröneveld @ Fab Academy 2016 >>> Output devices

<<<< go back

Goal

This week our assignment is about output devices. Two weeks ago we were working on input devices. Input in this case means devices that can give analogue or digital input to the micro controller (chip). On the micro controller there will be code that decides what to do with the input from the devices. On the output of the micro controller different devices can be connected directly or indirectly. These will be operated by the software code on the micro controller.

After talking with Emma, our local instructor, it became clear that my project needs many stepper motors and maybe a servo motor as output devices. At least two stepper motors will be necessary to operate the H-bot. To grip and rotate a frame from the hive another two stepper motors are needed. And last but not least all drawers (five) need stepper motors. In the picture below the positions of the motors are indicated with red circles.

y


It is possibly the best to start working with the two stepper motors from the H-bot. The concept of an H-bot is that with two static stepper motors two linear directions can be regulated. In the picture below the cooperation between the two motors is explained.

y


Together with Emma, our local instructor, the idea was developed to start working with a Fabkit, that I already made. The two stepper motors can be connected to the Fabkit by using "Driver boards" in between. The motors also need more power (and voltage) than a USB from a pc can provide. So an additional power supply (power board) is needed. Basically there were two ways of realizing this configuration. (A) Have a separate power board connected to a power supply (12V). The powerboard will provide 5V to the Fabkit and Driver and 12V to the Motor driver and Motor. Of course GND is on all boards as well. The picture below shows this configuration.

y


Option B is to combine the powerboard onto one of the Motor Driver boards. This would save some wires and connections and one separate board. The picture below shows that configuration. However I decided to continue with option A.

y


To elaborate more into configuration A the sketch below was made. This was enough information to start working in Eagle.

y


Now it is time to start working in Eagle in order to design the schematic and the layout of the board. First I start with the Powerboard and than with the Motor Driver.

Powerboard

Design Powerboard

The schematic of the board is based on an input socket from the power supply, a regulator, a capacitor, a 4 pin header and a 6 pin header.

BOM: - 1 x power supply socket - 1 x regulator 5v, 100mA - 1 x capacitor 1nF - 1 x 4 pin header - 1 x 6 pin header

The GND line is shown below.

y


The board design is shown below.

The GND line is shown below.

y


The POWER (12V) line is shown below.

y


The VREF (5V) line is shown below.

y


Make Powerboard

The board was milled on the LPKF-milling machine. The footprint for the power supply connector was drawn manually.

y


Moter Driver

Design Motor driver

The schematic of the board is based on the BOM below.

BOM: - Bi polar stepper: - 1 x 1nF Capacitor - 1x resistor 10k - 1 x power connector - 1 x t44 - 1 x 6 pin header - 2 x IC4 bridge - 2 x 0.1 uF capacitor - 2 x 10 uF capacitor - 1 x 4 pin header

The GND line is shown below.

y


The board design is shown below.

The GND line is shown below.

y


The POWER (12V) line is shown below.

y


The VREF (5V) line is shown below.

y


The phase 1 in 1 line is shown below.

y


The phase 1 in 2 line is shown below.

y


The phase 2 in 1 line is shown below.

y


The phase 2 in 2 line is shown below.

y


Make Motor Driver

The board was milled on the LPKF-milling machine.

y


Mistake in the board design

While I was soldering I saw that the traces between the motor driver and the motor connector are too thin. The current that the motor needs goes through these lines. I could solder 8 wires to the two boards to improve this connection / cross section.

y


Wiring and connecting boards

The power supply was connected to the Powerboard. Before connectiong it to the Fabkit I measured if the 12V and 5V was on the right traces, and it was.

y


The Motor Driver was connected to the stepper motor. With a multi meter the two couples of wires from the stepper motor were determined. This by measuring the resistance. The power supply connector is a wire that jumps from the power board to the two motor driver boards.

y


The next step is connecting the motor driver board to the powersupply and the Fabkit.

y


The second stepper motor has a similar Motor Driver Board and is connected in the same way. Just ignore the spindle attached to the motor.

y


The second motor set is also connected to the Fabkit and power board.

y


Failure

Right after plugging the main socket into the power point there was a kind of a flash and the smell of burned plastic. This is not good at all... I disconnected the Fabkit immediately

y


After measuring what was going on on the boards (by measuring the Voltages and Resistance) I discovered the regulator was fried. The 12V was still there but the 5 V was dead. The reason for this failure was a 180 degrees alignment error from the power connector from the power board to the Motor Driver. The connector has 3 pins, GND, 5V and 12V. By rotating the connector 180 degrees the 12V goes onto the GND. ...... I am not sure what damage this did to the other components on the boards.

I replaced the regulator and the 5V is up again.

y


To give the components some more support while working and travelling with is a wooden board was made for it to hold the parts together.

y


Co lateral damage

Because I am afraid the chip on the Fabkit is also damaged by the wrong wire connection I do a check on the programming of the chip.

First I tried to program the Fabkit through the FTDI connection cable. This used to work with the distance sensor of week 11. But now it did not work. The error message is given below.


avrdude: Version 5.11, compiled on Sep 2 2011 at 19:38:36 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2009 Joerg Wunsch

     System wide configuration file is "C:\Users\saxion\Downloads\arduino-1.0.4-windows\arduino-1.0.4\hardware/tools/avr/etc/avrdude.conf"

     Using Port                    : \\.\COM5
     Using Programmer              : arduino
     Overriding Baud Rate          : 115200

avrdude: Send: 0 [30] [20] avrdude: Send: 0 [30] [20] avrdude: Send: 0 [30] [20] avrdude: Recv: avrdude: stk500_getsync(): not in sync: resp=0x00

avrdude done. Thank you.


Next I tried to get access with the FabTiny*ISP I made and the special cable I made in week 11. This used to work back then in week 11. Only negative messages from the command manager, as shown below.

y


In the command manager I can not get access to the chip. The result is shown below.

y


y


=> This all may indicate that my Fabkit is damaged, so I decided to replace the Fabkit with an Arduino Uno. To do this I First connected the Arduino Uno with the USB cable to my laptop (Windows 7). Through the IDE Arduino Software I could not get access to the Arduino Uno board. My laptop could not recognise the USB for the Arduino Uno board. Googling on this there could be something wrong with the USB drivers for the Arduino USB. Later I will try to reinstall an other version of Arduino IDE in order to solve the driver problem.

Back at home I tried to use the Arduino Uno on my desk top PC, Windows 7. This is the latest version of Arduino IDE 1.6.8. Also here I could not upload a sketch to the Arduino Uno.

Further development

In week 15, I managed to get the stepper motor running in this set-up. The details are explained here.

The video below shows already the result.

Conclusion so far:

  1. Designing and making the boards turned out rather well. However there are mistakes in the design.
  2. Wiring the boards needs caution! Measure first all traces on resistance and check voltages board by board.
  3. Connecting to the chip to be able to programm the board is a nightmare. This is not going well at all...
  4. Here again I did not get into programming due to above mentioned problems. This is also a worry because I still don't have the experience in it.
y


Here is the responce on the bootloader.

Files to use:

Download files here.

Files directly from this site:

BasicStepperDriver_pgr1
steppermotor_oneref
stepperpgr201606141202
stepper_bi
stepper
powerboard
motordriver