Showing posts with label circuit diagram. Show all posts
Showing posts with label circuit diagram. Show all posts

Thursday, January 7, 2010

Motor Lockout and Timer

I need a remote box to control the RPM of a 20 HP rotor.
Since, the AC Drive provides 90% of the work, the remote box is a pretty easy task.

It has 4 parts:
10-turn rotary potentiometer - vary rotor speed from 0-12000RPM,
Kill switch - big red button that cuts power to the motor if something goes wrong
Something ALWAYS goes wrong
Enable switch - small button that lets command from the AC Drive go to the motor
Lock out - timer that makes sure the command from the AC Drive is zero before letting you use the Enable switch

The diagram is shown below:

The red lines S1, Sc:
If S1 is connected to Sc, then the Drive commands reach the motor.
Ultimately, the circuit will connect S1 to Sc if Enable switch is hit.

Av, A1, Ac:
10-turn pot to control RPM.
This is a basic voltage divider; the Drive senses the reference voltage (Av) compared to A1.

Enable Switch and Panic Button:
The yellow block is a 3PDT 5V relay.
When the coil is energized by pressing the Enable button:
Pole 1 connects the main coil to 5V. Thus the coil stays energized after the Enable button is released.
Pole 2 connects S1 to Sc.
Pole 3 energizes the Green LED.

When the Panic button (normally closed) is pressed, it breaks the circuit and opens the coil.

Once the circuit is enabled, the Panic button is the only way to kill it.

The key is that NOTHING happens if the lockout transistor (NPN) is not energized by the output of the Safety Lockout. This transistor acts as a normally-open switch.

Safety Lockout:
This is borrowed in whole from www.doctronics.com, "retriggerable monostable timer"

The input signal is an RPM pulse train (0-10V), this goes through a voltage divider (0-5V), and an inverter (the monostable likes HI inputs).

The 555 timer is used to create a monostable timer.
The output (pin 3, green line) goes HI when the input (pin 2) has a falling edge.
Output is HI for 15 seconds (1.1*900K Ohms*15microF).
Red LED turns on to indicate Output is HI.

Basically, if there is a pulse train coming in, then the output goes HI for 15 seconds and stops you from enabling the relay. ( If it is already enabled, then there is no effect.)
The problem is that the 15 seconds starts from the first falling edge; additional pulses don't reset the timer.
Enter the "retrigger transistor"
Every time the input is LO (PNP) the capacitor is discharged and must slowly recharge.
This resets the 15-second timer after each pulse.

The actual circuit wired up on the bread board is shown below.
The rightmost button would be replaced by the RPM pulse train.
The center button would be replaced by a "normally closed switch"
And the left LED should be GREEN.



Tuesday, January 5, 2010

Bipolar Stepper Motor circuit

So about 5 years ago, a coworker was going to teach me electronics.
Starting with something simple: stepper motor controller.

List in hand, I bought diodes, resistors, and power MOSFETs. I scavenged a stepper from an old printer. And left in all in a drawer for 5 years.

Finally, I pulled it out of the drawer and started working on it.

The stepper motor turned out to be Bipolar Stepper Motor with 4 wires: 2 independent coils.

The drive circuit is basically an H-Bridge. This allows a low power/low voltage controller (like a PIC) to drive a high current/high voltage (1A @ 12-24V).

Power MOFSET

So I had a lot of trouble figuring out that the Source pin goes to low voltage (source of electrons) and the Drain pin goes to high voltage (absorbs electrons). Basic electricity, but it still took me a while.

Most of the circuits used transistors in lieu of MOSFETs or to control on/off ahead of MOSFETs. Eventually I found a simplified diagram using just MOSFETs.

Basic diagram:

Layout for breadboard:


My actual breadboard:

Of course all of this already exists in a simple IC, L293D Dual H-Bridge. Although, I suppose my set up can handle more current, the 16 pin IC is very clean.




Sunday, May 3, 2009

Surveyor SRV1 Camera

At work, we purchased 2 SRV1 Blackfin Surveyor camera boards for $200 each.

Basically small cameras attached to a powerful processing board. The Blackfin board is designed as a robot controller with built in image processing. In addition to PWM drivers, I think the default firmware does edge detection, blob tracking and centroid.

The documentation is sparse. The setup assumes that you bought the wireless radio, and robot body. But the users forum is great. Friendly folks of different experience levels. And the Administrator/Company owner asnwers tech support at night, same day!
No quibbles there!

Actually, it is supposed to work right out of the box: there is a java console to talk to the camera and transfer images (very slowly).

Well, mine didn't.
I needed to setup a serial connection for initial communication. I didn't have a 3.3V power supply (SRV1 is 3.3V processor).
What I had was
Sparkfun RS232 shifter (RS 232 to TTL, you supply the voltage)
Sparkfun FDTI Usb-RS232 with 3.3V output.

First thought was connect the FDTI Usb-RS232 to RS232 shifter to SRV1, and use 3.3V from FDTI to power the RS232 shifter and SRV1.

Okay, that didn't work. I figured I had screwed up the TX-RX pins somewhere amongst the multiple chips.

Second thought was connect the RS232 shifter to SRV1 (plain jane serial connection) and use the 3.3V from FDTI to power the RS232 shifter and SRV1.
That didn't work either. There are 3 LEDs on the SRV1:
LED 1 (yellow) RX
LED 2 (yellow) TX
LED 3 (red) Power
Boot sequence should be all three, then just 2 and 3.
Only power came on. Quick check showed that the supply voltage dropped to 2.9V
The FTDI Usb-RS232 3.3V couldn't supply enough current.

Well, I thought that I read you could pick off the unregulated battery supply to power it.
I had a 5V powered breadboard, so I tried that.
Oh, wow, all 3 LEDs, then just 2 and 3!
I connected using SRV1 java console, and I got an image! wait, that isn't right?
The image was mostly covered in black/green/pink rows.

I assumed that there was a connection problem in my circuit, so I chewed on that for a while. Finally I signed up for the Users Forum and asked for help.
First question: Are you using 3.3V?

Ug, so I borrowed a variable power supply and dialed in 3.3V. A perfect picture appeared!
Apparently, the blackfin won't boot with less than 3.0V AND the camera gets noisy (green rows) at more than 4.0V.

So now I can begin trying to get the camera system to do real work!