Mikrocontroller based screen masking - AVS Forum
Forum Jump: 
Reply
 
Thread Tools
post #1 of 63 Old 03-15-2009, 10:42 AM - Thread Starter
Advanced Member
 
Gunnar's Avatar
 
Join Date: Oct 1999
Location: Lillehammer, Norway
Posts: 933
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
I`ve been experimenting with using a PICAXE based prototyping board as a screen masking controller. The board has a L293 H-bridge chip as well that can start/stop and reverse two motors, each max 600mA. I use a PC-mouse as a position feedback device.

It is IR-remote controlled, and so far has the following functions:
-jog up/down, left/right
-12 programmable presets.
- Position is stored in eeprom when you press "Save" and then one of the preset buttons.

The PICAXE has built in decoding for a subset of Sony TV-remote codes. It will not interfer with other Sony equipment, and if you have a Sony TV you will probably not use it at the same time as your HT-screen anyway..

Yesterday I tried it on my simple masking system, and it works well. Only vertikal masks so far. I downloaded ir-codes for an old Sony TV from Remote Central, and made some labelled buttons for the codes for my old Pront remote.

The vertikal masking system consist of a upper and lower roller from 1" steel tubing, which holds the masking fabric. The fabric has a "channel" for the "straight edge". This is just a 12x48mm wooden list. The lower list is pulled up by the top roller by wire, and the top list moves down by gravity. Both ends of both lists rides in pieces of curtain track. The motor is connected to the top roller by wire. Both rollers have a counterweight to balance the system. It moves easily, and even at 5V my 12V motor can move the masks.

Next I will make a printed circuit board with all the needed inputs/outputs, voltage regulators osv.. i will probably add two mikrocontrollers for dedicated pulse counting/decoding for the vertikal and horizontal masks to allow them to move simultanously. Also, it would be nice to make a codewheel, or maybe a codestrip to get rid of the mouse. Especially if others would be interested in building something like this.



Gunnar
LL
LL
Gunnar is offline  
Sponsored Links
Advertisement
 
post #2 of 63 Old 03-15-2009, 08:58 PM
Member
 
TeeCue's Avatar
 
Join Date: Feb 2008
Location: Missouri
Posts: 171
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Great job Gunnar, looking forward to the schematics.

Teecue
TeeCue is offline  
post #3 of 63 Old 03-15-2009, 11:49 PM
Advanced Member
 
HDGTX's Avatar
 
Join Date: Dec 2007
Location: SE TN
Posts: 681
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Great info! Looking forward to hear & see more about your project. Any more photos of your set up ? Which Picaxe board did you start out using ?

John
HDGTX is offline  
post #4 of 63 Old 03-16-2009, 09:23 PM
Member
 
TeeCue's Avatar
 
Join Date: Feb 2008
Location: Missouri
Posts: 171
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Gunnar,

Check this site out :

http://mitros.org/p/projects/encoder/



Teecue
TeeCue is offline  
post #5 of 63 Old 03-17-2009, 03:02 AM - Thread Starter
Advanced Member
 
Gunnar's Avatar
 
Join Date: Oct 1999
Location: Lillehammer, Norway
Posts: 933
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Interesting! I have looked at the reflective sensors, and it would be much easier to use. Just make a simple black/white paperstrip and tape it to one of the rollers. But to get quadrature encoding two sensors are needed. It would probably work just fine without quadrature encoding, but then there is always the risk of false counts when the sensor is at or near a transition black/white. With quadrature encoding this is eliminated.
Must probably try this to find out if it`s a problem.

John:
I`m using the PICAXE 18X microcontroller on a RKP18Motor prototyping board, see http://cgi.ebay.co.uk/RKP18Motor-L29...742.m153.l1262

The kit comes without the microcontroller, but the L293 H-bridge chip and everything else is included.

Gunnar
Gunnar is offline  
post #6 of 63 Old 03-18-2009, 09:08 AM
Advanced Member
 
HDGTX's Avatar
 
Join Date: Dec 2007
Location: SE TN
Posts: 681
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Gunnar, Thanks for the link. You may have answered that question before on another AVS thread, sorry about asking twice.

Here are a couple of links to low cost DC motors with built-in encoders. They do have very low current draw.

BG Micro: Faulhaber 3-12 Vdc motor for $ 7.95 US
http://www.bgmicro.com/index.asp?Pag...D&ProdID=12829

Electeronic Goldmine: Faulhaber right angle motor $11.95
Very similar motor to that one above, except has a right angle gear:
http://www.goldmine-elec-products.co...?number=G16279

TeecEE, that was an interesting link about encoders, thanks!


John
HDGTX is offline  
post #7 of 63 Old 03-18-2009, 01:39 PM - Thread Starter
Advanced Member
 
Gunnar's Avatar
 
Join Date: Oct 1999
Location: Lillehammer, Norway
Posts: 933
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Nice and cheap motors! But I would like only about 15RPM. I found one that looks the same as the one I already have, but this one is 15RPM: http://cgi.ebay.com/New-12V-DC-15-RP...3%3A1|294%3A50

I think I will replace my 1" steel tubes with 40mm pvc-tubes. These are normally used for electrical wires. I want to try a reflective sensor, and I think the bigger tube would be better for an "optical strip". I made a strip today using Excel. Just made every other cell black and white. Then copied and pasted the strip into Photoshop, and scaled to the tube circumference. I also found sensors that I think will work. About $1 each.

Gunnar
Gunnar is offline  
post #8 of 63 Old 05-08-2009, 02:47 PM - Thread Starter
Advanced Member
 
Gunnar's Avatar
 
Join Date: Oct 1999
Location: Lillehammer, Norway
Posts: 933
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Finally some progress!
I have made a schematic of my revised controller. There are many changes from the first one, that I`m currently using:

-Two dedicated MCUs for the pulse counting for the vertical/horisontal masks. With two the masks can move simultanously, and pulses are not lost during motor freewheeling.

-Terminal blocks for all input/outputs

-More inputs/outputs that allow the limit switches to be connected to the MCU. This can be used during calibration.

-Changed the motorcontroller to L298HN, which allows 2A motors.

-127 IR-codes available for eg. PWM speed control of the motors, more presets etc..

-Onboard 5V regulator for logic supply.

Else I got two 15RPM motors from eBay. I also got reflective sensors that will replace the mouse encoder. The resolution will not be as good as the mouse, but hopefully good enough.

I`m waiting for the electronic parts, but the circuit board is not done yet.

I have attached the motors to short rollers (se pictures), and the plan is to use this setup to simulate the masking system when doing the programming. I will attach black/white paperstrips and the reflective sensors to the rollers for position feedback. Hopefully this will be more DIY-friendly than the mouse hack..
I want to use two sensors on each strip to get quadrature encoding. Placing the two sensors correctly will probably require an oscilloscope, or maybe a small test program in one of the MCUs

Gunnar
LL
LL
LL
Gunnar is offline  
post #9 of 63 Old 07-02-2009, 09:07 PM
Newbie
 
vfxmorley's Avatar
 
Join Date: Dec 2007
Posts: 10
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
hi Gunnar.

great system! I going to attempt to build one myself, But i do have a question though. As the pin layout/configuration is different between the L293 and L298 how did you deal with that? is there a difference between the standar L293 and the L293HN version?

Id love to see a more detailed version of the controller layout. any chance you could upload a higher res version (i cant read the fine print!)

Thanks

dave
vfxmorley is offline  
post #10 of 63 Old 07-14-2009, 04:14 AM - Thread Starter
Advanced Member
 
Gunnar's Avatar
 
Join Date: Oct 1999
Location: Lillehammer, Norway
Posts: 933
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Dave, you got mail.

I`ll make everything available to anyone when (if..) it works as planned.
The pinout of the 293 and 298 is different, but I will not use the PICAXE prototype board anymore. The new board is designed for the 298 motorcontroller.

I thought of offering this as a kit, but I`m not confident that I can make the mechanics good enough/simple enought to be useful as a kit. The electronics will be easy to build. Through hole design. Cheap also..

See attached picture. This is a first attempt. I used the Protel autorouter. Didn`t have time to do it manually.
The two upper left terminal blocks are inputs for the position sensors. Next block on the left is the download socket for programming the MCUs. The 6 jumpers are used to select which MCU to program. Next block on the left is 12v input. The board has onboard regulator for 5V logic supply. One more might be needed, didn`t calculate exactly power consumption. Next block on the left is for the IR-sensor. This is of the 3-pin type that has a built in demodulator. The 6 right blocks are for two motors and 4 limit switches.

Gunnar
LL
Gunnar is offline  
post #11 of 63 Old 07-14-2009, 11:18 PM - Thread Starter
Advanced Member
 
Gunnar's Avatar
 
Join Date: Oct 1999
Location: Lillehammer, Norway
Posts: 933
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
The HN version of the 298 doesn`t need external diodes.
Gunna
Gunnar is offline  
post #12 of 63 Old 07-23-2009, 03:21 PM - Thread Starter
Advanced Member
 
Gunnar's Avatar
 
Join Date: Oct 1999
Location: Lillehammer, Norway
Posts: 933
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Made a paperstrip with black/white fields, and mounted two reflecting sensors on a piece of Veroboard. The sensors worked with the paperstrip, but the pulses can`t be used directly. You can see the raw pulses from one of the sensors on the upper trace of the oscilloscope picture. To make the pulses square, and make the low state low enough, I made a schmitt-trigger with suitable reference voltage and hysteresis. The lower trace show the pulses after the schmitt-trigger. The paperstrip was about 1mm to short, and you can se on the picture that one of the pulses is wider than the others. It is easy to make a new one.. I used Excel to make the strip with the number of fields that I wanted, and I then pasted it into Photoshop where I scaled it to fit the diameter of the tube. As you can see the paperstrip has two coloumns of fields (thanks to Marius for this tip). This makes it easer to place the sensors. If the phase difference needs to be adjusted, all that is needed is to push the veroboard strip slightly upwards or downwards.

Else I think that this will work fine. I`ll make a small board for the sensors with the schmitt-trigger. As can be seen on the picture the schmitt-trigger is made from an OP-amp. I used a LM358 that I had in my drawer. I`ll use SMD-components on the sensor-board. The sensors have circular cross section and diameter 4mm, so all that is needed to mount on the veroboard is to drill a 4mm hole.
LL
LL
Gunnar is offline  
post #13 of 63 Old 08-12-2009, 11:49 AM
Member
 
moreilly's Avatar
 
Join Date: Jun 2009
Posts: 62
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Very interested in this thread! Wondering how the progress is coming along?
moreilly is offline  
post #14 of 63 Old 08-15-2009, 01:10 PM - Thread Starter
Advanced Member
 
Gunnar's Avatar
 
Join Date: Oct 1999
Location: Lillehammer, Norway
Posts: 933
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Only progress lately is that I made a layout for the small board for the reflecting sensors and Schmitt trigger. Too many other projects that must be finished during our short summer!
LL
Gunnar is offline  
post #15 of 63 Old 01-21-2010, 12:50 PM - Thread Starter
Advanced Member
 
Gunnar's Avatar
 
Join Date: Oct 1999
Location: Lillehammer, Norway
Posts: 933
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
I made a circuit board for the controller, but when the components showed up, the footprint for the h-bridge was different than the one in the Protel library (grr..) And I also noticed a few other things that I didn`t like. I should have used bigger diameter pads to make it easier to drill the holes. So I have made a new layout with bigger holes. I also did a few changes to the circuit. Added current limiting for the motors. Nice to have, especially if something bad happens, or I want to stop the motors quicker by shorting the inputs. I also added a 12v trigger input to make the masking system turn on when I turn on my preamp. Hopefully I will etch and drill the new board in a few days.

I also did some mechanical changes to my system. Like many others I used a system where the lower mask was pulled up by the upper roller, and the upper mask moved down by gravity. This give a slight error, since the diameter of the upper roller increases when the fabric rolls on. So, the upper mask will move faster and faster as the fabric rolls on. The opposite happens with the lower mask. So the masks will not open/close symmetrically about the screen center. I also got problems with binding. I tried to use gorilla tape as Scott did on his system, but It didn`t work for me.

So I made a continuous loop of cable with pullys as has been suggested and also implemented of some on this forum. The upper pullys have two wheels.

I use the old rollers, except that I put in a spring from an old roller blind in each roller. The spring keeps the fabric tight when the mask rolls in or out. I used counter weights before.

The masks are attached to the cable, see pictures. This works very well as a manual system as well. Just lift/lower one of the masks to the desired posistion and it stays where you put it. The other mask will of course move the same distance in the opposite direction..

I plan to use the same pully system for the side masks, but there is probably room to use panels instead of rollers. It`s alot of cable and pullys, but it is easy to adjust since each end of each mask can be adjusted. Also, I don`t think it will change much after initial adjustment.

The pullys come from blinds on a demolished building at my work.. The double pullys are modified single pullys. The system would move easier if I could find pullys with bearings, but it is still ok. I will need a little stronger motors than before.

Gunnar
LL
LL
LL
Gunnar is offline  
post #16 of 63 Old 01-21-2010, 09:57 PM
Advanced Member
 
HDGTX's Avatar
 
Join Date: Dec 2007
Location: SE TN
Posts: 681
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Gunnar,

I have seen pulleys with bearings at my local hardware store. They are used in sliding glass patio type doors - check there or a Home Dept or Lowes, if you have such.

John
HDGTX is offline  
post #17 of 63 Old 01-22-2010, 09:10 AM - Thread Starter
Advanced Member
 
Gunnar's Avatar
 
Join Date: Oct 1999
Location: Lillehammer, Norway
Posts: 933
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Thanks! Unfortunately no Home Depot here in Norway, but I asked for pulleys there last autumn when visiting Rochester NY. I actually got some there, but not with bearings. But I`m sure patio doors is about the same here, so maybe..

Gunnar
Gunnar is offline  
post #18 of 63 Old 01-23-2010, 10:43 AM
AVS Special Member
 
petew's Avatar
 
Join Date: Oct 2000
Location: Albuquerque, NM USA
Posts: 2,037
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 4 Post(s)
Liked: 38
Here is a source for loose rollers.

High Desert Theater - work in progress
Building Bass - Subs

Surrounds - Easy as Pi

Storage - unRAID unDELL

petew is offline  
post #19 of 63 Old 01-24-2010, 05:14 AM - Thread Starter
Advanced Member
 
Gunnar's Avatar
 
Join Date: Oct 1999
Location: Lillehammer, Norway
Posts: 933
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
My antivirus (Avast) prevent me from opening that page. Reports a virus.

Gunnar
Gunnar is offline  
post #20 of 63 Old 01-29-2010, 11:52 AM - Thread Starter
Advanced Member
 
Gunnar's Avatar
 
Join Date: Oct 1999
Location: Lillehammer, Norway
Posts: 933
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Made the circuit boards, and have just started the soldering work. the picture shows the component side of the board. There are no components on the solder side. The small boards are for the two encoder circuits. Each board will have two reflective sensors and a Scmitt trigger for shaping the encoder pulses.

Will take a few days before I have time to finish it, and I also need to order a few more parts.

Gunnar
LL
Gunnar is offline  
post #21 of 63 Old 02-11-2010, 02:32 PM
Advanced Member
 
HDGTX's Avatar
 
Join Date: Dec 2007
Location: SE TN
Posts: 681
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Hi Gunnar, Wondering how your project is coming along?

Here is a link to McMaster-Carr web site & their selection of pulleys:

http://www.mcmaster.com/#pulleys-for...s-rope/=5ry4vi


Have you thopught about using timing belts & pulleys in place of cords? The timing belts would not slip at all while in use. Just a thought.

http://www.mcmaster.com/#pulleys-for-belts/=5ry5j1



JOhn
HDGTX is offline  
post #22 of 63 Old 02-12-2010, 10:50 AM - Thread Starter
Advanced Member
 
Gunnar's Avatar
 
Join Date: Oct 1999
Location: Lillehammer, Norway
Posts: 933
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
McMaster Carr really has a lot of nice stuff. I don`t know if they ship to Norway.

I have thought of using timing belts, but at the moment I`m planning to use threaded rods with a moving piece w/nut that is connected to the wire for moving the masks. I think this will work. Did you think of replacing the wire rope with timing belts? Where would you put the pullys? Timing belts are incredible durable. I just took apart our old kitchen machine (Kenwood), and the timing belt has not ever been replaced. My mother got this machine in 1971! The last time it needed some service was in 1992..

I`m almost done with the soldering work, but I`m still waiting for a few parts. The board seems ok, but there are a few things that I want to change. Especially if it works as intended, and others are interested in building the board. Maybe using SMD-components to make it smaller. Most of the terminal blocks could be replaced with eg. RJ-45 connectors.

The important thing now is to verify that the board works.. If it does I will put the controller,two motors, limit switches and encoders on a piece of board to use during programming of the controller.

Gunnar
Gunnar is offline  
post #23 of 63 Old 02-12-2010, 10:53 PM
 
camarillo_cinema's Avatar
 
Join Date: Mar 2004
Location: Camarillo, CA
Posts: 626
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
You may want to try optical encoders from US Digital for positioning.
camarillo_cinema is offline  
post #24 of 63 Old 02-13-2010, 05:30 PM
Advanced Member
 
HDGTX's Avatar
 
Join Date: Dec 2007
Location: SE TN
Posts: 681
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by camarillo_cinema View Post

You may want to try optical encoders from US Digital for positioning.

Hey Don, good to hear from you.
HDGTX is offline  
post #25 of 63 Old 02-13-2010, 07:21 PM
 
camarillo_cinema's Avatar
 
Join Date: Mar 2004
Location: Camarillo, CA
Posts: 626
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Thanks, John. Good to be back.
camarillo_cinema is offline  
post #26 of 63 Old 02-14-2010, 12:13 PM - Thread Starter
Advanced Member
 
Gunnar's Avatar
 
Join Date: Oct 1999
Location: Lillehammer, Norway
Posts: 933
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
I had a look at the US Digital page. I think I found a datasheet there for an encoder that is compatible with an old encoder that I have. The encoder is built into nice Pittman motors that were used in a HP plotter. I think the codewheel have 2-300 slots, so if I want to use it I need to interface it with something that can reduce the count rate. Especially If I make the linear drive as planned. One revolution of the motor will give about 1.5mm travel of the mask, so I really only need one or two counts/motor-rev.

Gunnar
Gunnar is offline  
post #27 of 63 Old 02-14-2010, 11:37 PM
 
camarillo_cinema's Avatar
 
Join Date: Mar 2004
Location: Camarillo, CA
Posts: 626
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Check out the P4. Nice encoder for the price. Resolution from 100 CPR to about 300. This is more than adequate for accurate positioning and speed control.
camarillo_cinema is offline  
post #28 of 63 Old 02-17-2010, 10:30 AM - Thread Starter
Advanced Member
 
Gunnar's Avatar
 
Join Date: Oct 1999
Location: Lillehammer, Norway
Posts: 933
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
This reflective encoder also look interesting. This one can probably be used directly without any extra circuitry, which I had to make to make my sensors work (grrr..).. The one used in my Pitman motors looks like this. I`ll see if I get time to hook it up to an oscope tomorrow.

Gunnar
Gunnar is offline  
post #29 of 63 Old 03-29-2010, 02:14 PM - Thread Starter
Advanced Member
 
Gunnar's Avatar
 
Join Date: Oct 1999
Location: Lillehammer, Norway
Posts: 933
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Hooked up the encoders from the Pittman motors to an oscope today. The pulses are very clean, but the scope shows about 30kHz pulse frequency at 12V, which is to much.

It would be nice to use the built in encoders instead of my DIY reflective sensor encoder. But I need to use some external electronics anyway, since the CPR has to be reduced. Should be easy to do with eg. a binary counter. It would be better to have the encoder on the driven part (the nut of the linear drive) to eliminate error from backlash. But then I`d need a different type of encoder..

I also powered up the controller for the first time today. No smoke so far! But I need to load some code into it to verify that it works.

Gunnar
Gunnar is offline  
post #30 of 63 Old 04-01-2010, 07:22 PM
Newbie
 
master2000's Avatar
 
Join Date: Apr 2006
Posts: 4
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
keep working
master2000 is offline  
Reply DIY Screen Section

User Tag List

Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page


Forum Jump: 

Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off