Welcome! Log In Create A New Profile

Advanced

Electronics problem?

Posted by Joost 
Electronics problem?
May 26, 2007 04:54PM
Hi all,

I have tried to test my universal board - as in connect it to the comms, attach a motor and see if it works, but it doesn't do much. What I know that works is the following. I have successfully flashed a PIC 16F628A with a hex file - did this multiple times, seems that it works correctly (although I am not sure of the hex file has compiled correctly). Things can be written to the PIC, verified etc. I can also communicate between PIC and the host software. When running the stepper test, it "finds" the board (I added some println statements and can see there is communication and acknowledgment from the univ. board)

What I would expect is that when moving the slider in the stepper test, the LED would flash - but it doesn't. I did a quick setup on a breadboard, using the schematic for the universal board, with the following components and connections (all # are PIC pins) and measured voltages using a multimeter on the pins between the [..] while running the stepper test. The input voltage is 5.10V:

#1 -> nothing [0V]
#2 -> R4K7 -> +5V [5.09V]
#3 -> R220 -> LED -> +5V [0.26V]
#4 -> R10K -> +5V [5.09V]
#5 -> GND [0V]
#6 -> nothing [5.09V]
#7 -> Rx [goes up and down between 4.91V and 5.03V]
#8 -> Tx [goes up and down between 4.85V and 5.10V]
#9 -> nothing [2.55V]
#10, #11, #12, #13 -> nothing [all 0V]
#14 -> +5V and via 0.1 microF to GND [+5.01V]
#15, #16, #17 -> nothing [all 0V]
#18 -> 4K7 -> +5V [5.09V]

The LED still doesn't flash and there are no voltages on pins #10,#11 and #1, #17. Anyone has a clue on how to resolve this ...?!

Joost
Re: Electronics problem?
May 26, 2007 07:10PM
As a follow-up on this, I have been wondering if it could be the hex files that I use. I have attached the files that SDCC compiled (followed to the Wiki instructions), and hope that someone can either conform that they are correct, or maybe post the correct ones ... ?

Joost
Attachments:
open | download - extruder.hex (8.4 KB)
open | download - stepmotor.hex (8.5 KB)
open | download - stepmotorb.hex (8.5 KB)
open | download - stepmotorc.hex (8.5 KB)
Re: Electronics problem?
May 26, 2007 07:24PM
One idea: to check that the issue is not with an incorrect .hex file, try using one downloaded from SourceForge, instead of the one you compiled yourself?

[sourceforge.net]

Jonathan
Re: Electronics problem?
May 26, 2007 08:11PM
Hey Jonathan,

Thanks for this. I thought the binaries were in SVN, but couldn't find them. The ones on SF are different from mine, so I will try them. First attempts give some errors when flashing; hopefully I can solve that.

Joost
Re: Electronics problem? - Follow up
May 27, 2007 01:13PM
I have - based on Jonathan's advice - flashed the PIC with the binaries on Sourceforge. Instead of PikDEV I used ic-prog and my JDM programmer (had to install Windows, but that was a minor issue). The PIC seems to be flashed and verification is successful. This should mean that the firmware now is OK and in the PIC.

I tried to rebuild the universal board on a breadboard, and did some additional measurements and tests, and also added a stepper motor. Now there is something happening, but it is not what is is supposed to be.

When running the stepper test, I can measure (fluctuating) voltages on pins 1 and 2 to the stepper (P9 in the schematic) between 6 and 9V. Pins 3 and 4 of P9 stay around 0V. Also, I hear a ticking noise from the motor (reducing the speed in the stepper panel also reduces the ticking frequency). But the motor does not rotate. I am still wondering if I am missing some PIC connections (they are as described above but now also connections between #9, #10, #11, #1 and #17 to the L298N as in the schematic). It feels like there is a small thing missing, but I can't figure out what it is - and that starts to annoy me ;-)

oost
Re: Electronics problem? - Follow up
May 27, 2007 07:06PM
Try testing communication first. I assume that you can loopback tx to rx and see what you type using serial comm program. If that is good, use poke and see if you can get the version to come back from the controller see troubleshooting under [reprap.org]
I had all kinds of problems before I put .1 uf decoupling cap on my test circuit.
You don't need much to communicate with the pic either, just tx rx gnd and +5.
It won't do much but talk, but it keeps you focused on the basics smiling smiley
Re: Electronics problem?
May 29, 2007 12:28PM
I have now spend more time with my universal stripboard/breadboard then I planned, and still with very limited results. So in order to be able to track down what goes wrong and where (PIC? firmware? board?), I was wondering if there is (existing) documentation describing what the PIC is supposed to do under given circumstances. For example, I noticed the voltage on pin 9 goes up when the Stepper Exerciser dialog in the java app is activated.

What I have working is the communication between board and PC/the Java application. The device is identified and I can send commands from the Stepper Exerciser to the PIC and get confirmation back. So the PIC seems to run (at least part of) the firmware.

I also get (PWM?) signals out of pins 10 and 11 (attached a very small piezo loudspeaker which gives ticking noise in the same frequency as signals are send from PC to PIC) but not on pins 1 and 17. Reducing the speed of the X axes in the Stepper Exerciser also reduces this ticking frequency. But the other pins don't do much...

So in short: is there documentation what the voltages on the pins are under what circumstance (what comes in/out) and what triggers specific voltage changes? What I did find on the Wiki is the API [reprap.org] and info on the firmware for the SNAP part [reprap.org] but nothing on voltages. This could really help me eliminate maybe one the many black boxes in the system ...

Joost
Re: Electronics problem?
July 28, 2007 06:19PM
Hello Joost,

I have the same problem with my stepper controller.

When changing the axis position the universal controller led is blinking. And it also stops when I remove the endstoppers, or when the software thinks it is in position. But when connection the steppermotor it wil not turn. You hear the steppermotor at that moment. It is like the 2 poles are trying to pres in opposite direction so the moter can't turn. My powersuplie seems ok, the voltage the voltage stays 5V and 11,7.
Re: Electronics problem?
July 29, 2007 02:32AM
Alexander,

It's probably easier and clearer to start a new thread about your issue, instead of guessing that it is exactly the same as Joost's issue from two months ago!

Anyway: Did you check that you have set the torque for the X Axis stepper to 75% or higher? The default for this used to be 50%, which is too low for some steppers, but is apparently OK for the official Nanotec ones.

If that is not the problem, and your stepper is really pressing against itself, you should probably re-check the wiring from the L298N to your stepper -- you could have the wires to one coil reversed?

When reporting problems here in the forums, it is very helpful to state what version of each board you have, what version of the RepRap host software, and (in your case, since the issue concerns a stepper motor) what make and model of stepper motor you are using.

Jonathan
Anonymous User
Re: Electronics problem?
July 29, 2007 07:47PM
Check the wiring of the stepper motor on its's website. It appears that in two differnt stepper motors, (both 6 lead unipolar, wired bipolar) that Red=1, Blue =2, (same coil) and Green =3 and Black =4, (second coil) seem to be wired correct. If one coil phase leads are A and A', Then the second coil in B and B'. A should be on first pin, A' on the second pin, B on the third pin and B' on the forth pin. If you follow this order, it should rotate a step the coils are switched as in the following

Bipolar Motors

Figure 1.3 Pin1 1a ---/\/\/\--- 1b Pin2

Pin 3 2a ---/\/\/\--- 2b Pin 4

Bipolar permanent magnet and hybrid motors are constructed with exactly the same mechanism as is used on unipolar motors, but the two windings are wired more simply, with no center taps. Thus, the motor itself is simpler but the drive circuitry needed to reverse the polarity of each pair of motor poles is more complex. The schematic in Figure 1.3 shows how such a motor is wired, while the motor cross section shown here is exactly the same as the cross section shown in Figure 1.2.

The drive circuitry for such a motor requires an H-bridge control circuit for each winding; these are discussed in more detail in the section on Control Circuits. Briefly, an H-bridge allows the polarity of the power applied to each end of each winding to be controlled independently. The control sequences for single stepping such a motor are shown below, using + and - symbols to indicate the polarity of the power applied to each motor terminal:

pin 1 Terminal 1a +---+---+---+--- ++--++--++--++--
pin 2 Terminal 1b --+---+---+---+- --++--++--++--++
pin 3 Terminal 2a -+---+---+---+-- -++--++--++--++-
pin 4 Terminal 2b ---+---+---+---+ +--++--++--++--+
time --->
As you can see, coil one on 1 positive, 2 zero and coil2 off. then coil 2 on and coil 1 off, Now coil 1 reversed, coil 2 off. Now coil 1 off and coil 2 reversed. This is a complete step, now repeat, FOREVER!
Anonymous User
Re: Electronics problem?
July 29, 2007 07:48PM
Check the wiring of the stepper motor on its's website. It appears that in two different stepper motors, (both 6 lead unipolar, wired bipolar) that Red=1, Blue =2, (same coil) and Green =3 and Black =4, (second coil) seem to be wired correct. If one coil phase leads are A and A', Then the second coil in B and B'. A should be on first pin, A' on the second pin, B on the third pin and B' on the forth pin. The A and A' indicates the magnetic field direction. If you follow this order, it should rotate a step the coils are switched as in the following

Bipolar Motors

Figure 1.3 Pin1 1a ---/\/\/\--- 1b Pin2

Pin 3 2a ---/\/\/\--- 2b Pin 4

Bipolar permanent magnet and hybrid motors are constructed with exactly the same mechanism as is used on unipolar motors, but the two windings are wired more simply, with no center taps. Thus, the motor itself is simpler but the drive circuitry needed to reverse the polarity of each pair of motor poles is more complex. The schematic in Figure 1.3 shows how such a motor is wired, while the motor cross section shown here is exactly the same as the cross section shown in Figure 1.2.

The drive circuitry for such a motor requires an H-bridge control circuit for each winding; these are discussed in more detail in the section on Control Circuits. Briefly, an H-bridge allows the polarity of the power applied to each end of each winding to be controlled independently. The control sequences for single stepping such a motor are shown below, using + and - symbols to indicate the polarity of the power applied to each motor terminal:

pin 1 Terminal 1a +---+---+---+--- ++--++--++--++--
pin 2 Terminal 1b --+---+---+---+- --++--++--++--++
pin 3 Terminal 2a -+---+---+---+-- -++--++--++--++-
pin 4 Terminal 2b ---+---+---+---+ +--++--++--++--+
time --->
As you can see, coil one on 1 positive, 2 zero and coil2 off. then coil 2 on and coil 1 off, Now coil 1 reversed, coil 2 off. Now coil 1 off and coil 2 reversed. This is a complete step, now repeat, FOREVER!

Edited 1 time(s). Last edit at 07/30/2007 09:46AM by englewood.
Sorry, only registered users may post in this forum.

Click here to login