Wednesday, 22 February 2012

The MOSFET driver battle

Honestly, it's a hell of a tiring and mind screwing job :@

The trouble with MOSFET drivers is that they never work .... and when they do, you never know why :/
So here goes the standard circuit of IR2110 which works like a charm
  
Important Technical Note: The Low side supply voltage MUST NOT EXCEED 12V ... all over the internet we found +15V but it blows out the low side IRF1404. There are 12V protection zener diodes between every mosfet's gate and source. The bootstrap capacitors are 47uF electrolytic with 0.1uF ceramic cap in parallel. Bootstrap diodes are 1n4007 because the schottky ones would blow. The PWM frequency is 2.1 kHz approx. that explains the beeping sound when the motors run. Anti-parallel diodes on 22ohm(or 10ohms because we were out of 22 ohms) resistors at all high side gates are schottky.

Even probing the high side output of mosfet driver with repect to ground can "sometimes" damage it. It is better to see its waveform referenced to that MOSFET's source terminal.

Special Thanks to the segfault guy and application notes that helped us a lot. :)

Tuesday, 24 January 2012

It's alive !!!!!

Adding the integral and derivative controls, some gain adjustments through hit and trial and here we go......

Quite jerky, but it's an achievement ! Weeeeeeeeeee :D ok, back to work now !

Friday, 20 January 2012

This is what we're talking about....infact, something like this

The opamp shortcut proved to be worth it (will put schematics later) ! The motor controller gave a smooth control response. Charged with excitement, we connected both motors to the same hbridge. Adjusted the gains for pure proportional control, the motors moved in the tilted direction.

Temporary mounting for the IMU

Sticking it all together with electric tape :D

Adding a little counterweight..... otherwise it would keep leaning and hence moving towards one side
Couldnt find anything except pliers, so here it goes
This is balanced without power. Let's plug in the power and do some gain fine tuning with our trusty USBTiny.

Monday, 19 December 2011

4 N-Channel MOSFET H-bridge

It's actually IRF1404, nice little HEXFET costing Rs. 90.
But driving it ........ very challenging !

We tried IR2110, but mosfet driver blues were taking to much time so we jumped to a shortcut we accidentally learned at NERC 2010. Using an external battery to drive the high side mosfets :D

This is what the mosfet driver gave us
A headache ! and this ....

 Total disaster :(  we can bet you can't make an oscilloscope do that :P

Sunday, 4 December 2011

Tilt Measurement

Intertial Measurement Unit and the complementary filter....
Testing the IMU with voltmeter
To estimate the correct angle of the platform, we needed the complementary filter. A DKU-5 (USB to UART-TTL) cable was used to transmit the raw accelerometer and gyro values to MATLAB. Voila ! Angle estimation turned out surprisingly well (with a lot of programming feats of course).

Here's the real time MATLAB plot result
White = accelerometer, blue = gyro, green = filtered angle

Tuesday, 22 November 2011

Electronic startup !

Motor Controller nightmares... right

Works perfect in theory
Toner transfer method FTW !
 

 Well, in reality, it doesnt..... The circuit smoked out badly since both relays dont switch at precisely the same time.

Sunday, 20 November 2011

3d model on Autodesk Inventor

Illustration
Looks good in pictures, let hope it turns out that way
Rendered image of the Bottom view
You can also play around with the 3d model : 3d movable model at Autodesk Freeweel

Tuesday, 1 November 2011

Fix the motors and let it roll....

Washers ...... a very important invention :D used here to align the chain with wheel sprocket and for equal force distribution of motor mounting.

Thursday, 27 October 2011

The timing chain experience

Motorcycles use a small timing chain for ignition timing and who knew they would be ANSI-25... When we visited our local cycle wala, he was kind enough to shorten chains for us with a lot of questioning and unwanted advice

He couldnt just believe a vehicle could balance by itself
"بھائی بندہ منہ کے بل گر جائے گا ہاہاہا ! "

We got what we needed - this chain was available in the market and we had to shorten/extend it to get the desired length

How about opening a bicycle repair shop ? :D

Wednesday, 12 October 2011

Shershah, Saddar, Lighthouse and PNEC Workshop

That reminds me, Karachi has become too polluted :(

One visit to Shershah kabari market was enough to stop hoping for two exactly same geared motors of our requirements although there were some pretty nice power gates, conveyer drive and german industry discarded motors(27Amperes, handling this current would be hell).
See how an expert does it ?

We purchased 250W,24V,14A electric scooter motors for PKR 1000 each. Says 2500 rpm on the plate but the tachometer measures 3000 rpm on 24v, unloaded speed maybe....It has an 11 tooth ANSI-25 sprocket. Meant to be coupled with electric scooter wheel.
This one turned out to be defective (tried placing the magnet back with epoxy but didnt work) and we had to make another covert strike on Shershah to get two more. It's always better to choose easily replaceable parts...

And here come the wheels from lighthouse... straight to the floor of EPE projects lab
The wheel had around 78 teeth. That gives almost a 7:1 gear ratio (78:11) but comes with a freehub (the ones that drive in one direction freewheel in the other). This was taken care of by expert advice from Majeed bhai :D
The freehub was disabled by welding around the bearing that allows unidirectional movement

Axle - the stick that does wonders....and of course the legendary phatta (plank)
Got the axle made to our designed dimensions from lathe machinist from Ranchor Lines (possible explanation Run=battlefield, Chor=Leave - maybe some general retreated to that place :P ) and the 10-layer ply from our very own pnec mechanical workshop.

The Operation Theater Table

Wheels and axle fitted, let's fix the motors


Assumption is the mother of screw up !!!





The roller chain looked so tiny, we completely overlooked the possibility it would be longer than needed :(

Sunday, 1 May 2011

Codename: Bhai Sahab 2.0

What we need:
  1. Wheels
  2. Motors
  3. MEMS Accelerometer & Gyroscope
  4. Motor Controllers
  5. Batteries
  6. Lots of nuts&bolts,transistors,resistors,diodes,microcontrollers....

and all that in Karachi, the hub of Pakistan :)
Cost -  high Rs. 50,000 maybe more... but certainly not this:
Enough has been said on gyros and accelerometers by everyone who tried making a balancing vehicle/robot. First thing ordered is the IMU Combo Board - 3 Degrees of Freedom - ADXL203/ADXRS613 from creative electron, a sparkfun distributor here in Pakistan.

What actually restricts the design are the motors. Motors capable of carrying a person's weight are not really easy to find, it's wise to find the motors and make your design around it. Here's what's possible
-Wheelchair Motors (110 - 120 rpm) - can be trusted for carrying a person
-Survey Shershah scrap market for geared motors (unreliable, impossible to find two motors exactly same)
-Use motors,chain-sprocket used in electric scooters

Friday, 18 March 2011

Thinking about thinking

Got any ideas about where students make the best projects in the world ? MIT ?
and we have the idea of a self balancing vehicle :D If you cant find it, Learn To Google (LTG) :P

So this is it, simply put: A segway !

And we're supposed to make it ? Yes!
Can we ? If so many people can, surely, we can too.
How ? Good question !

Tuesday, 1 March 2011

Inception ;)

There are Final Year Projects, there are hobby projects and then there's a combination of both. We - ABA, WH and UR - decided to make one such project in March 2012. And here we go.....