Presentation is loading. Please wait.

Presentation is loading. Please wait.

MECH 400 Underwater Glider Design Project May 20, 2008MECH 400 Tips and Tricks1.

Similar presentations


Presentation on theme: "MECH 400 Underwater Glider Design Project May 20, 2008MECH 400 Tips and Tricks1."— Presentation transcript:

1 MECH 400 Underwater Glider Design Project May 20, 2008MECH 400 Tips and Tricks1

2 May 20, 2008MECH 400 Tips and Tricks2 Introduction 1.) Major electrical pitfalls from previous years Electrostatic Discharge Wiring Noise Grounding 2.) OOPic basics Common Blunders Variables and OOPic Math Pulse Width Modulation Events, Virtual Circuits and Gates

3 May 20, 2008MECH 400 Tips and Tricks3 Electrical Tips

4 May 20, 2008MECH 400 Tips and Tricks4 Shady Wiring Practices & ESD Damaged equipment: $$ comes out of your own pocket

5 May 20, 2008MECH 400 Tips and Tricks5 Electrostatic Discharge (ESD) Electro-static discharge –Sources: carpets, other types of floor, chairs in the Fluids lab!!! –Use a suitable workspace, keep food/drink far from your work

6 May 20, 2008MECH 400 Tips and Tricks6 Electrostatic Discharge (ESD) Preventative Measures Wear a $5 ground-strap (with 1MΩ resistor) Use a grounded working surface, or clip on to a power supply chassis Please ask your TA how to set this up, if you are unsure or worried about electrical shock!!!! USE MIDDLE PRONG ONLY

7 May 20, 2008MECH 400 Tips and Tricks7 Creative Wiring 101 Do it right the first time, do it once –Do it wrong: happy hunting Remember wires have mass, and occupy space!!! Last year –One group’s AUV didn’t make it in the water due to creative wiring. They were trouble-shooting on the side of the pool until they ran out of time

8 May 20, 2008MECH 400 Tips and Tricks8 Creative Wiring 101

9 May 20, 2008MECH 400 Tips and Tricks9 Creative Wiring 101 Use solder to make a firm connection Use shrink wrap to avoid shorts Use cable ties to organize or bundle

10 May 20, 2008MECH 400 Tips and Tricks10 Grounding Proper grounding is essential to reduce noise –Cause for many problems last year Put a capacitor between power and ground to minimize the AC noise Avoid ground loops –This is where two grounding points have different potential –Use a central grounding point – don’t daisy chain your grounds Use caution with power leads and chassis ground

11 May 20, 2008MECH 400 Tips and Tricks11 Electrical Noise/Disturbances All circuits are subject to environmental and local noise –Sources: MOTORS, 60 Hz Typical mistakes –Circuits work fine until the system is combined –Long wire runs collect noise –Improper grounding

12 May 20, 2008MECH 400 Tips and Tricks12 Reduce noise by proper shielding –How do you shield? –don't solder the shield at both ends This creates a parallel circuit, commonly known as a ground loop. this will make the problem worse! –The shield will attach to the same connection point as the ground. –Antenna principal: the shield acts as an antenna for noise – you don’t want to be feeding the noise into your sensor.

13 May 20, 2008MECH 400 Tips and Tricks13 OOPic Basics

14 May 20, 2008MECH 400 Tips and Tricks14 Common OOPic/Speed Controller Blunders –Hooking the 9V battery up backwards NO reverse polarity protection on the OOPic –Hooking up the speed controller signal pins backwards to the power pins on the OOPic –Don’t use more power than devices are rated for

15 May 20, 2008MECH 400 Tips and Tricks15 OOPic & Speed Controllers All documentation is online at www.oopic.com –Pseudo C, and some tutorials Try figuring it out first, but ask if you don’t understand

16 May 20, 2008MECH 400 Tips and Tricks16 OOPIc Troubleshooting Know these steps! Problems uploading programs, or no response 1) Serial cable screwed into ports? 2) Check 9V power supply 3) Check voltage regulator for 5V output 4) Check EEPROM is seated properly 5) …and if all else fails

17 May 20, 2008MECH 400 Tips and Tricks17 OOPic Troubleshooting: if all else fails 5) Last ditch effort for OOPIc-R – Reset EEPROM –Power OFF OOPic –Remove the EEPROM chip CAREFULLY!!!! –Power the board back up w/o the EEPROM chip –Start download of program –IDE will tell you that there is no EEPROM and will ask you to reinstall it Make sure it is installed the proper direction (little dot is pin 1) KEEP POWER ON –Install the EEPROM and click OK

18 May 20, 2008MECH 400 Tips and Tricks18 Using Variables on the OOPIC Signed versus Unsigned –16 bit variables: oInt is signed oWord is unsigned –8 bit variables: oChar is signed oByte is unsigned When you define an object be careful to look whether it is expecting a signed or unsigned value for the inputs or outputs. Signed numbers use a 2’s Complement Representation i.e. -x= (2N-x)

19 May 20, 2008MECH 400 Tips and Tricks19 Mathematics on the OOPIC There are not provisions for doing signed math on the OOpic. Addition and Subtraction will still work with 2’s complement numbers. Multiplication and division of signed values can be handled by multiplying or dividing positive values (equivalent to unsigned) and then adjusting the sign of the result. For example: A* ( - B) = - (A * B).

20 May 20, 2008MECH 400 Tips and Tricks20 Pulse Width Modulation

21 May 20, 2008MECH 400 Tips and Tricks21 Pololu Speed Controller 2 Channel, 16 V Max input voltage + protection Things to note: –Two IO Lines + PWM channel per motor –Will have to make a cable (simple) The added benefit of reliability from these speed controllers is worth the additional wiring hassle

22 May 20, 2008MECH 400 Tips and Tricks22 OOPic & Speed Controllers Documentation regarding driver connections are online on the OOPic website

23 May 20, 2008MECH 400 Tips and Tricks23 Polling vs. “Interrupt” style What is polling? What is an interrupt? e.g. teacher checking for hand to raise –Polling: teacher checks each person to see if their hand is raised –Interrupt driven: class manager informs teacher when someone’s hand is up

24 May 20, 2008MECH 400 Tips and Tricks24 Real Time Systems and Polling

25 May 20, 2008MECH 400 Tips and Tricks25 Using Event Detection

26 May 20, 2008MECH 400 Tips and Tricks26 OEvent Features oEvents can be prioritized –See oEvents on the online manual –By default all events have equal priority BE CAREFUL: real time systems are a pain to debug! Do yourself a favor - make a nice flow chart!

27 May 20, 2008MECH 400 Tips and Tricks27 Event Programming

28 May 20, 2008MECH 400 Tips and Tricks28 oEvents and Logic Gates Powerful OOpic Objects that can be used with events

29 May 20, 2008MECH 400 Tips and Tricks29 Questions? Be prepared for lab demos Don’t debug during demo Persons requiring a basic run down or more information regarding the OOPic operation can stay behind and ask questions


Download ppt "MECH 400 Underwater Glider Design Project May 20, 2008MECH 400 Tips and Tricks1."

Similar presentations


Ads by Google