Assignment 3 - Microcontrollers

Yes, I am the GURU for Microcontrollers. We will be starting with the PIC LOGO environment, with more advanced topics available as sections and on your own. The PIC Logo environment is a way to program a PIC microcontroller without needing to know C or PIC assembly. The way it works is:

- A LOGO Virtual Machine (VM) is loaded into the memory of the PIC microcontroller. This is PIC code that can interpret the simple LOGO language and run the LOGO instructions.
- You can then type LOGO commands directly into the Tower Development Environment program's console, and they will be sent into the PIC, run, and the results will be displayed back at the console, or
- You can make a text file containing your LOGO code, and transfer it into the PIC using the Tower Development Environment.
- In either case you can type commands into the console in order to have them evaluated in the PIC's LOGO interpreter environment.

Here are some resources for these topics:

You can also find much good information on this topic at Brian Clarkson's knowledge base page here.

The fingertip's virtual landscape

The idea for this project was to create a "virtual landscape" to touch. From the bicycle-wheel led display example we were reminded of the persistence of vision principle of the human vision system. Basically, if lights blink on and off quickly enough and they trace out pieces of some pattern, our eyes integrate all of the flashes into one image, even though they are seperated from each other slightly in time.

Does the same principle apply to touch? Could we create a system which allowed a person to feel a "landscape" that didn't actually exist? That's what we had in mind with this microcontroller project.

The design was simple: Hook up four solenoids in a carriage such that each solenoid sits under one of the user's fingertips. Allow the user to push the carriage back and forth horizontally, and as the carriage moves, push the solenoids up and down to simulate a terrain at each point in the travel.

Here are some photos from our efforts:

Technical details:

To drive the solenoids, we needed more current than we could safely get from the pin of the pic. (If you look at the datasheet for any microcontroller it will tell you in the electrical specifications part how much current can be drawn and sunk from/by a pin) We knew that loads like solenoids (much like motors, other inductors etc..) need a fair amount of current - and that 4 or more solenoids would need a lot! So we had a situation where we needed the following:
  • To be able to use the PIC to trigger the sending of current through the load (solenoid)
  • To supply the actual current to the load (solenoid) from an external power source.
The problem could have been solved in several ways. Basically, the description of what we needed called for something like a transistor (allows/disallows current through it based on a signal voltage). We had heard of MOSFET's also - which are similar to transistors.

In the end, there was a very nice solution. We found a solenoid driver on digikey.com (Digikey part #: DRV101T-ND) that has the following features:

  • - Can turn on/off current based on a signal voltage to one of its pins.
  • - Will PWM duty-cycle the current (basically cycle it up and down periodically rather than leaving it on continuously) after a certain duration of steady voltage, so that your solenoid doesn't burn out because of too much steady current.
Here is the datasheet for the solenoid driver that we used. It has wiring diagrams which explain how to wire it up in relation to the rest of your setup. One hint that we got was as follows:

Question:

Since we used 2 different power supplies to drive the different parts of our circuit (one for the pic/breadboard, and one to drive the solenoids), are there any rules for getting the voltages to play well with each other?

Answer:

Common ground. On the big power supply (the one providing current to the solenoids) we wired the negative and ground (earth ground) to each other, and then to the ground on our little breadboard. That way they all had the same ground as a reference point.

Photos and videos

Back to main page


This site was whacked using the TRIAL version of WebWhacker. This message does not appear on a licensed copy of WebWhacker.