Showing posts with label education. Show all posts
Showing posts with label education. Show all posts

Tuesday, June 5, 2018

CRT and Magnets Exhibit



This Cathode Ray Tube + Magnets exhibit started off with a couple of CRT monitors that were gathering dust in storage. I was asked to consider putting them out in the main space of the makerspace. I decided I would only allow this if they did something. I set out to decide on what that something would be. It turned into a fun, easy, accessible to all ages exhibit that we now turn on for all the tours we lead through this makerspace. It is a great way to quickly and cheaply construct a meaningful interactive science exhibit to add to your collection.




Here's a document I put together to explain what's happening. I taped this to one of the TV antenna (the antenna is not used) so it stays front and center to the exhibit and people are encouraged to actually read it. Here's a lower quality image of the same document so you can see it embedded in the post.


Here's the bill of materials:

  • CRT television. You may have to turn to eBay or Craigslist. These may only get harder to acquire with time.
  • If the CRT has VHF/UHF inputs, you'll need a box like this one to convert the signal to composite video: https://www.amazon.com/dp/B0014KKV7W/
  • For the camera, the backup camera is cheap and outputs a composite video signal over RCA connectors. https://www.ebay.com/itm/CMOS-Car-Rear-View-Reverse-Backup-Camera-Parking-Night-Vision-Waterproof-7-LED/291918612347
  • If you'd like to place the camera elsewhere, you can get a cheap 2.4GHz transmitter like this one https://www.ebay.com/itm/2-4G-Wireless-Video-Transmitter-Receiver-Kit-for-Car-Rear-Backup-View-Camera/163041336550
  • A powerful neodymium magnet. You want something strong enough to have an effect and a good size to be easy to handle. Something like 0.5 inch diameter and 0.5 inch height seems like a good size to me, but I'd suggest just seeing what's available and trying it. You can always stack up multiple smaller magnets.
Assembly is just a question of plugging everything in to power and getting the signal in to the TV. Note that the backup camera requires a little work to plug in; it is designed to be hooked up to a 12V car battery connection point. You will need a 12VDC wall adapter if it does not come with one. You will need to make sure you have the red/positive connector and black/negative connector going to the right places. You will probably need to solder at least one connection, or use another strategy to connect the wires.

The magnet should be protected with something soft to avoid it hitting against metal and breaking or pinching fingers. I used two furniture feet and some masking tape. I also suggest putting it on a string so it doesn't wander off.

Cable management was the longest part of the project. I zip-tied all the extra length of cabling in back of the assembly. A single switch controls the extension cord to which the entire unit is plugged in. Note the CRTs make a high pitched noise that some people don't like to hear all day, so I don't leave it on all the time, since the main room of the makerspace is also a meeting and study space.

The cameras are taped to the top of the CRT and pointing at brightly colored pieces of paper. This is important because the magnet effect is not nearly as visible on black & white images.


An additional, optional modification I made to the back up cameras was the removal of the infrared lights that it contains in order to provide better visibility at night. The camera was very warm and when the IR lights activated, which sometimes happened if the exhibit experienced low light conditions, the image was washed out. I opened the unit and de-soldered the IR LEDs. My original plan involved putting gaffer's tape over the IR LEDs, but that seemed to make the camera heat up even more. There is a sensor inside the unit and in bright lighting the infrared LEDs are not activated, so this is not necessarily something that needs to be addressed for the exhibit to function.


It is also important to note that the backup camera is designed to mirror images. Note the sign in the image above is printed as a mirror image in order to show up correctly on the display. The backup distance overlay is another artifact of the choice to use a backup camera; I find it is fun and adds to the color distortion effect since it is displayed in bright colors.

Wednesday, February 15, 2017

Simple Educational Robot Arm with Inverse Kinematics

The point of this project is to test a lesson that covers the theory and construction of a simple, two degree of freedom robot arm that moves in a plane and is controlled by specifying the X and Y position of the end of the arm (the 'hand'), rather than by specifying the angles of the two servos directly.


I ran most of this lesson last year at a summer camp, but due to limited time/high variance in math background of the students, we weren't able to reach the point I wanted to reach. (Really what happened is that I volunteered to have another class join my class for three hours for an activity, which meant a lot of my prep time ended up being soldering leads on more potentiometers...)

This activity seemed promising so I went through it again, at a less hectic pace this time, to try and make a list of the tricky 'gotchas' that would be useful to provide as hints if the goal was to have most of the students complete the project in the class time allotted.

Students who have completed a class covering trigonometry should have sufficient mathematical background to cover the math, which is described nicely on this page: http://www.learnaboutrobots.com/inverseKinematics.htm

A partial list of the tricky parts students may get stuck on (beginners tend to try to build the whole thing at once; a few compound problems can make it very difficult to debug):
  • Constructing the arm so it is sturdy enough to last until demonstration time.
  • Including math.h and finding documentation for C trig functions
  • Keeping track of radians vs degrees
  • Measuring link lengths accurately and setting up the physical arm to match the model (the arm should physically be perfectly straight  line if both servos are at their max range
  • Mapping the analog inputs (reading from the potentiometers) to a reasonable range of the X and Y axis, in accordance with the units chosen for specifying the link length in the code
  • Dealing with floating point error--floating point operations are not the optimal solution here but the goal here is to avoid adding more complex C programming concepts onto an already dense lesson. See the code for more detail. A good summary of the issues can be found here: http://www.engblaze.com/faster-code-fridays-avoid-floating-point-math/
  • Using a separate power supply or filtering the Arduino power supply. The arm can otherwise get stuck in a cycle where servo moves, drawing a lot of power momentarily, which causes the analog inputs to jitter (and the onboard LEDs to flicker), which causes a new reading which causes the servo to move... Most students will use the separate power supply if it is provided, but it is also common for students to forget and tie everything to a single rail.
Here's an illustration of an issue that will happen if the student mounts the second link so that it cannot fold inwards. The green area on the left shows where the end of the second link (the 'hand') can reach. The shape is awkward to navigate. The right hand side shows the area reached by a better choice of angle limits for the second link. If it can fold inward, similar to how a human forearm/elbow/upper arm works, then it is easier to use. (This image assumes links are equal length).



I did mount the second servo flipped downwards, to reduce overall height of the assembly. That was a mistake in hindsight, because it means the arm can collide with itself.

Here's a video of the test arm I built, demonstrating that it more or less works correctly.



Finally here's the sketch. It isn't clean or commented...but I've decided it is better to share these things than to never get around to it at all.

Arduino Sketch for this project

Friday, October 16, 2015

Museum Exhibits Preparation

I'm preparing a robotics exhibit for a local museum that is opening up soon. To that end, I learned how to weld just now (I'm not very good yet. Also now I'll smell like welding all day).

The exhibit is simple--drive a small remote controlled car around a map of the city, from a monitor that tracks the car and displays a birds-eye view camera image, auto-rotated to the car.

The biggest hurdles:
  • Light weight and high capacity battery (but low max discharge rate--which is fine, I don't need a high discharge rate)
  • Sleep mode for the wireless radio and microcontroller to conserve battery when nobody is using the exhibit (chose the Wixel here, for reasons I'll cover in another post)
  • Safety against, stall, over-current, under-voltage, and other battery damaging conditions
  • Making sure the parts the user touches (console, perimeter wall) stand up to the forces users will likely put on these


To adjust thresholds for my wake-up circuit, I finally installed drivers for the portable oscilloscope I have: http://www.gabotronics.com/development-boards/xmega-xprotolab.htm

First impressions: Quick-start was very easy. Installed drivers and software on Windows to get this screenshot, but you don't need to, as the scope has a tiny display.



In the image above I am bringing a flashlight closer and farther from the sensor. The green shows the phototransistor circuit output directly. The red is the output of the comparator circuit (LM358N, CNY70 if you want the parts. Just what I keep in stock, not chosen for any other reason. Don't turn on the CNY70 LED for this application, durr).

I was able to get it to robustly sense when I walked under the fluorescent light fixtures in this building, holding it at chest height.

More on this later.

EDIT: One more fun image.


My fluorescent bulb desk lamp apparently pulses on/off with a cycle taking 7ms or so. The other pattern (where the waveform is getting "pinched" and then expanded) is aliasing from the slow sampling frequency of the oscilloscope (or at least the points drawn in the software) at this large time scale and the 7ms lamp pulse.

Tuesday, May 13, 2014

Planning a Course

I'm teaching two courses this summer. I have full control of the curriculum and of a budget assigned to the course for supplies. In the process I came up with a list of purchases that provide 'the best bang for your buck.'

Rapid Prototyping On the Cheap: Often in the classroom there is no access to advanced tools or expensive fabrication equipment. There isn't even access to the basic stuff sometimes. And finally, you often have to purchase it all ahead of time, which can be annoying for courses where the students are supposed to design something. Here's my list for cheap and versatile building materials. These can be great for science, robotics, architecture, etc. Nothing revolutionary, but it can be nice to have a list.
  • Foam board, paper products like cardstock, and corrugated plastic. With clever designs like T-beams and I-beams you can make these into formidable structures. If you can find a delivery dock willing to work with you, you can source all the cardboard you'd ever need. Or dig through a recycling bin.
  • Scissors, utility knives, and other simple cutting tools.
  • Hot glue. Don't forget to get a lot of glue sticks; they go fast.
  • Tape of all sorts. Scotch tape, masking tape, and duct tape are great. If you want something a little fancier, 3M sells filament tape in various flavors (different layouts of filament, different widths). Filament tape is a concept similar to ripstop fabric.
  • Popsicle sticks, and old favorite.
  • Straws are cheap and great for forming lightweight structures. The strawbee is pretty clever if overpriced. If you have access to a computerized cutting tool, just churn out a bunch of them yourself from a sheet of plastic.
  • Stiff wire. Don't forget the wirecutters.
Electricity and Magnetism: There are so many advanced and cheap experiments out there for E&M. Electrical components can be bought individually even from major distributors like Digikey or Mouser. It will almost always cost you less than buying some kind of kit. The selection from these major distributors can be overwhelming but with a little research (just look at what is in the kits) you should be able to master their very useful search tools and winnow the selection down to what you need.
  • Telephone wire is solid core wire. There are multiple strands in the main cable, each with its own color coded sheath. They work great with a breadboard. Specialized breadboard jumper kits are the biggest ripoff ever.
  • Copper enameled wire. It comes in a variety of gauges and is used for things like motor windings and speakers (making motors and speakers are very easy experiments to run in a classroom).
  • Velostat is a pressure sensitive material you can use to make cheap bend sensors. You can source a sheet from Adafruit and a variety of other sources online, depending on how much you need.
  • Magnets. Cheap good fun. I have found that Ebay is the best way to find cheap neodymium magnets. These ship from China so expect a slightly longer shipping time.
  • Foil, foil tape. Reflects light and heat, conductive, flexible. Great stuff.

Fancy Equipment for the Masses: This is a list of the more sophisticated equipment you can get that has really reached consumer level pricing.
  • Thanks to a spate of new designs funded by Kickstarter, thermoplastic and even resin 3D printing is starting to be available for as low as a few hundred dollars. The landscape on what is available here changes pretty quickly and there is a lot to consider, so you'll have to do your reading. Filament is available for as low as $30/kg in some colors.
  • Low cost oscilloscopes, function generators, and logic analyzers. Products like the Xmega Xprotolab and the Salae Logic Analyzer offer a lot of features suitable for many applications at very low prices.
  • Arduino is hugely popular and for good reason. It is a microcontroller on a board with friendly features that make it very easy to get started with. At the heart of the Arduino is a chip called the Atmel AVR (or in some cases, a more sophisticated ARM chip). The convenience and low cost of the Arduino boards mean that even experienced users often choose to buy the board rather than to make one themselves (with the know-how you can buy the AVR yourself for a few bucks, put some circuitry around it, and flash the Arduino bootloader onto it).
  • The Wixel is a $20 board featuring a microcontroller, wireless radio, and USB. There are lots of ways to add simple wireless capabilities to your project but the Wixel is one of my favorites. It is one of the cheapest solutions AND it includes a fully programmable microcontroller, so you can either use it as your all-in-one microcontroller solution or slap it on an existing development board like the Arduino.