If I only had a Brain! - Page 5 - diyAudio
Go Back   Home > Forums > General Interest > Everything Else > The Moving Image > DIY Projectors

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 19th August 2005, 08:14 PM   #41
diyAudio Member
 
Join Date: Aug 2005
PHP Code:
start timer.
while( 
timer timeout )
{
    
//do anything you need to keep proj running
    //ie monitor sensors etc.
    
if( timer 10mins >= timeout )
    {
        
StartAlarm();
    }
    if( 
timer 9.5mins >= timeout )
    {
       
StopAlarm();
    }
    if( 
motion detected )
    {
        
reset timer;
    }
}
//shut down projector/lcd/bulb
wait 2 minutes
stop fans

Something like that should work to enable the timer control for the projector.
it would sound the alarm for 30 seconds. you could get rid of that stop alarm and just make the alarm a single beep.

This seems like a really cool idea. Once i get my projector up and running id like to have some automatic fan control and shut-off features.


Quote:
Originally posted by Luca Brazzi


Yeah... thats the one LUXURY us DIYers have over the commercial projector owners!

They would NEVER fall asleep with the PJ on with THAT expensive bulb burning!

HAHAHAHAHAHAHAAAAA!!!

Oh... BTW...

I need to take my time on this one... Ive got my Development Environment in place, however, I need to take some time to think about the algorithm for the timeout. It isnt as easy as it seems to get it right.
  Reply With Quote
Old 20th August 2005, 01:21 AM   #42
diyAudio Member
 
Join Date: Dec 2002
Location: VA
Quote:
Originally posted by mattcosturos
PHP Code:
start timer.
while( 
timer timeout )
{
    
//do anything you need to keep proj running
    //ie monitor sensors etc.
    
if( timer 10mins >= timeout )
    {
        
StartAlarm();
    }
    if( 
timer 9.5mins >= timeout )
    {
       
StopAlarm();
    }
    if( 
motion detected )
    {
        
reset timer;
    }
}
//shut down projector/lcd/bulb
wait 2 minutes
stop fans

Something like that should work to enable the timer control for the projector.
it would sound the alarm for 30 seconds. you could get rid of that stop alarm and just make the alarm a single beep.

This seems like a really cool idea. Once i get my projector up and running id like to have some automatic fan control and shut-off features.



The thing is... its actually a little more complicated than first meets the eye, because the system needs to react to human behaviour.

For example:

When I 1st turn on my projector, its usually because Im planning to watch a movie, or surf the web, or watch TV. Lets say Im planning to watch a movie.... Well... most movies are about 2 hours long... right?

Now... As far as the projector is concerned

Lets say that I told the "brain" to wait 1 hour 50 mins before checking to see if there is any motion, and if it didnt see any motion in the last 10 mins... shut down.

I think thats a better algorithm than telling the "brain" if you see any motion reset the counter to 0 because heck... It might sense motion 1 hour into the movie, then reset the counter to 0, then... it would be another 2 hours before it would alarm!

THEN...

Youve got to think about what happens... if after the first 1:50, it detects motion... should it reset to another 2 hours? OR... should the timeout time decay so that after the initial 2 hours, the time out gets shorter?

Then there is the whole... Watching TV vs Watching movies thing... people exhibit completely different behaviours when doing these 2 activities.

I think Ive settled on a timeout algorithm though... Im just waiting on some parts so I can start building.
  Reply With Quote
Old 20th August 2005, 01:31 AM   #43
diyAudio Member
 
Join Date: Dec 2002
Location: VA
Quote:
Originally posted by scanboy
Luca Brazzi,

it's off your topic in this thread, but do you mind sharing the model # and your placement, in reference to you lamp's arc, of your IKEA Napkin Ring reflector?
Thanks

All I know is that it is an IKEA SOARE Knapkin ring, and it is spherical. The distance of the lamp from the reflector is approximately the radius. I built my light engine adjustable so that I can move the bulb closer/farther away from it easily... Im still experimenting with the position to find out what works best (no hotspots)
  Reply With Quote
Old 20th August 2005, 01:17 PM   #44
diyAudio Member
 
Join Date: Aug 2005
Hmmmm, I didn't realize how complicated you wanted to make the logic.

The way you describe it, its almost like you just want to use a timer, to pick how long it will stay on.
I have an air conditioner with 2 knobs. One with hour markings, and a manual setting. the other knob chooses between delay on, and delay off.
So you can set the knob to 8hrs then choose delay off, and the ac will run for 8 hrs. You can use the delay on to turn the ac on at a preset time. just pick how long you want to wait, then choose delay on. And the manual setting lets you just blast the ac all the time.

A similar setup would let someone pick how long they want to run their projector, and of course you can change the time on the know any time if you need more or less time.... however using the manual setting would bring you back to the current problem.


Quote:
Originally posted by Luca Brazzi



The thing is... its actually a little more complicated than first meets the eye, because the system needs to react to human behaviour.

For example:

When I 1st turn on my projector, its usually because Im planning to watch a movie, or surf the web, or watch TV. Lets say Im planning to watch a movie.... Well... most movies are about 2 hours long... right?

Now... As far as the projector is concerned

Lets say that I told the "brain" to wait 1 hour 50 mins before checking to see if there is any motion, and if it didnt see any motion in the last 10 mins... shut down.

I think thats a better algorithm than telling the "brain" if you see any motion reset the counter to 0 because heck... It might sense motion 1 hour into the movie, then reset the counter to 0, then... it would be another 2 hours before it would alarm!

THEN...

Youve got to think about what happens... if after the first 1:50, it detects motion... should it reset to another 2 hours? OR... should the timeout time decay so that after the initial 2 hours, the time out gets shorter?

Then there is the whole... Watching TV vs Watching movies thing... people exhibit completely different behaviours when doing these 2 activities.

I think Ive settled on a timeout algorithm though... Im just waiting on some parts so I can start building.
  Reply With Quote
Old 22nd August 2005, 03:13 PM   #45
diyAudio Member
 
Join Date: Dec 2002
Location: VA
Quote:
Originally posted by mattcosturos
Hmmmm, I didn't realize how complicated you wanted to make the logic.

The way you describe it, its almost like you just want to use a timer, to pick how long it will stay on.
I have an air conditioner with 2 knobs. One with hour markings, and a manual setting. the other knob chooses between delay on, and delay off.
So you can set the knob to 8hrs then choose delay off, and the ac will run for 8 hrs. You can use the delay on to turn the ac on at a preset time. just pick how long you want to wait, then choose delay on. And the manual setting lets you just blast the ac all the time.

A similar setup would let someone pick how long they want to run their projector, and of course you can change the time on the know any time if you need more or less time.... however using the manual setting would bring you back to the current problem.



What I want is to have projector basically ask me (the viewer) every so often "Are you still watching me?" If it doesnt get a "Yes" answer it shutsdown.

There are several different ways I could program this.

Method 1: When the projector is 1st turned on it will wait X hours before it looks for motion, no amount of motion in the room before that 1st X hours is up will cause the timer to reset. If it detects motion after X hours, the timer resets to 0 and it will wait another X hours before looking for motion again.

Method 2: When the projector is 1st turned on, it constantly looks for motion, every time it detects motion, the timer is reset, if it detects no motion in X hours it shuts down.

Method 3: Similar to Method 1 except the timeout gets shorter after the 1st timeout period has elapsed.

Method 4: Simple timer, no matter what the Projector shuts off after X hours

And there are others, each with advantages and disadvantages....

Ill probably program several different methods, and try them all out...

I think Ill end up liking Method 2 in real world usage... Methods (1&3) only look for motion in a specific "Window" of time, and only during that "Window" can the timer be reset. What if Im on the can during that window? Or popping popcorn? Ill be upset if I return 5 minutes later to a shutdown projector . Using method 2, when I got up to go to the bathroom/etc, my motion would have reset the timer no matter where the brain was in the count down. I wont have any problems unless I spend X hours in the bathroom. Method 4 doesnt take into consideration the fact that people dont always know how long they will be watching TV... I may watch a movie, then turn on the TV and watch a game, I wouldnt want to have to try to calculate beforehand how long I estimate my viewing time to be so I can tell the projector how long to stay on...
  Reply With Quote
Old 24th August 2005, 08:28 PM   #46
mkl2 is offline mkl2  Romania
diyAudio Member
 
Join Date: Nov 2004
Location: Bucuresti, Romania
First of all, reading this thread, I’ve got the impression that you all forgot that the heart of most of our pj’s is an LCD PC monitor or TV. And when the video signal is cut off a modern display shuts itself down. It’ just a matter of (for lack of better words) linking the display, witch will act as a controller, to the bulb and the cooler. The PIC based circuit will only act as an interface between them.
I’m only saying this because I find the motion sensor solution unreliable and unpractical because of different human behaviors.
The basic idea is that I fall asleep, the sensor doesn’t detect motion and shuts off the pj. But let’s say that I have a very agitated sleep or even worst, I’m sleep walking – what then? I’m not even considering the eventual pets; I have 2 cats (and they sleep 20 hours / day) so no worries, but a German-shepherd will keep the pj running for weeks .

Enough criticism. First I would like to split the common setups in 2 categories:
A) video input source – PC/Mac (highly customizable source) vs. external TV tuner/ game console/ stand alone DVD player (little or no customizable).
B) display construction – internal power source vs. external transformer.
OK, bear with me, even it’s not clear now, I do have a point .

IMO, the microcontroller shod do the following:
- keep the fan running for an amount of time (or until a desired internal temperature is reached) after the projector is turned off
- keep the light source on for a very short period of time after the pj’s LCD is turned off. This will force the pj to stay on in case the computer restarts (applicable only if a PC/Mac is used as a video input signal)
- monitor the LCD temperature and adjust the fan speed accordingly. In case a critical temperature is reached and the fan is at max speed, turn off the pj.
- monitor the temperature close to the light source (see first point)
- have a basic diagnostic tool – 3 led, yellow –stand by, green – power on, red – cooling off/ bulb re-strike time. I don’t see the need of an LCD, as will further complicate the design.

So, for the lucky ones with a PC as video source and a pj build around a display with internal PS things couldn’t be easier. A PC ‘knows’ how to turn on and off the display on demand, at a certain hour, after a period of inactivity and much more, all of this by just pressing a few predefined keys. This makes a remote for the pj useless.
OK, the computer can control the display. The display’s internal power source is similar to a computer one. When the monitor is off the ps supplies only a 5V stand-by current, but when the display is switched on, the 12V (and other rails) kick in powering the LCD. This rail could power a relay or a couple of them for the pj’s light source and fan. The microcontroller’s main jobs (other then monitoring the temperature) will be to keep the fan spinning for an amount of time after the projector is turned off and to keep the light source on in case the pc restarts (at restart the pc turns off the display for a couple of seconds and this can shot down the projector).

If the display has an external transformer things can become a bit complicated. If the inverter is separated from the controller board, the relay can be powered from there (there are 2 12V rails). With an all on board design (typical for small displays) there's the need to find a point on the board that has 12V when on and 0V when off. A bit hard but doable.

Now for DVD players as video source. A DVD unit can’t turn off a display, actually it has no idea that is connected to one. But DVD players have an “auto power off” function. When the DVD cuts the video signal, the monitor, after displaying the “no signal” warning will enter in stand-by mode and through the PIC will shot down the projector.
Same thing applies for external TV tuners, as far as the game console I can’t figure a way to fall asleep while playing a video game .

So in the end there is no need even for a timer because it's already integrated in the signal source.
  Reply With Quote
Old 24th August 2005, 10:19 PM   #47
diyAudio Member
 
Join Date: Aug 2005
Hmmm, you have some good ideas there.
I think we could even get away without using a PIC at all, (if you dont mind wiring up some relays and a timer).

First off, use the +12v rail to control a relay.
This relay will turn the bulb on and off.
If we want to run the bulb for a preset time after the display turns off a timer could be added. This makes the circuit a little more complicated but not that much.
Second, we could use a thermostat to control the fans. Provide the fans with +12v all the time from a dedicated AC/DC converter, and turn them on when a certian temp is reached.
Ill mull this over at work tomorrow and post some more ideas.
  Reply With Quote
Old 25th August 2005, 12:16 AM   #48
diyAudio Member
 
Join Date: Dec 2002
Location: VA
Quote:
Originally posted by mattcosturos
Hmmm, you have some good ideas there.
I think we could even get away without using a PIC at all, (if you dont mind wiring up some relays and a timer).

First off, use the +12v rail to control a relay.
This relay will turn the bulb on and off.
If we want to run the bulb for a preset time after the display turns off a timer could be added. This makes the circuit a little more complicated but not that much.
Second, we could use a thermostat to control the fans. Provide the fans with +12v all the time from a dedicated AC/DC converter, and turn them on when a certian temp is reached.
Ill mull this over at work tomorrow and post some more ideas.
True... many functions can be done without the use of a Microcontroller (a stand alone timer here, a thermostat there) However once you start down the path of using individual circuits to perform control functions, you 1) Complicate the required circuitry enormously, and 2) May be headed for a dead end (a situation that cant be handled with your current individual circuits design) at this point you WILL say, "Maybe I should use a Microcontroller to do all of this". Its very hard to reprogram hardwired behaviours.

With a Microcontroller based design, as you think of new functionality to implement, it becomes a matter of reprogramming the Controller, and adding a few external interface components.

The other thing that a microcontroller based design will allow is it can provide "Flexible" logic... What do I mean? Well... Currently I have a 15" Projector using a 250 watt HQI bulb and 4 fans... there are many factors which govern the dynamics of my system which can change on the next projector. Lets say my next projector is a 15.4" Proview with a 400 watt bulb and 6 fans? I want the control system to be able to "Flex" easily to accomodate the new projector design (Heat dynamics/etc) If I design a system that uses stricly dedicated circuits, when I build the next projector I may have to start at square one again instead of just changing a few input parameters to the controller.


Quote:
The basic idea is that I fall asleep, the sensor doesn’t detect motion and shuts off the pj. But let’s say that I have a very agitated sleep or even worst, I’m sleep walking – what then? I’m not even considering the eventual pets
Unless you either A) Flail your arms/legs wildly while you sleep, or B) Sleep walk in the same spot/room back and forth in front of the motion detector, you shouldnt have a problem. As far as the pets go... there are Pet Sensitive Motion detectors on the market.

The other thing your comments bring up is yet another feature that should be implemented which is: A Maximum Projector On Time no matter what motion is detected. This way even if you DO sleepwalk back and forth (or your pets move around) in front of the motion detector all night... the Brain will shut down the projector after X hours no matter if you dont at some point physcially interact with the control system (pushing a button/etc). For example if you dont push the Max On Time Reset Button within 6 hours of turning on the projector, the brain will shut the projector down no matter what the motion detector detects. With this feature, the Motion detector system just becomes a way to shut the projector down SOONER than the Max On Time.

An example would be what happened to me today... I had my PJ on, and decided to go to the store. I completely forgot I left the projector on. What would have happened if something would have happened to me while I was out and I couldnt get back to shut the thing off? With the motion system it would shut down after lets say 3 hours with no motion. If my dogs were wandering around in front of the motion detector while I was gone... the projector would shut down after 6 hours no matter what (unless the dogs figure out a way to push the Max Time Out reset button on the projector)

I like your idea about using the PC video signal as a Power controller though... pretty slick... Write some code on the PC to remove the Video signal, then attach some logic to the LCD to detect when the Video signal is gone, attach a timer for the fans and...Voila.

IMHO though... the only issue with your design is that sometimes computers need to be rebooted, and sometimes they crash/blue screen/etc and some computers boot slower/faster than others. PC's in general are not really good at being reliable controllers because of their complexity. Microcontrollers on the other hand are very simple internally.

Implementing the Max Time On timeout plus the Motion Timeout means I would need several different indicators. Maybe I could just use a beep... and if the Motion timeout is getting ready to expire, it beeps one way, and if the Max Timeout is getting ready to expire it beeps another way. This would alert you as to what you needed to do (Wave an arm to trigger the motion sensor vs push the Max Time On reset button)
  Reply With Quote
Old 29th August 2005, 04:37 PM   #49
diyAudio Member
 
Join Date: Dec 2002
Location: VA
As usual, things start off simple and get more complicated as you hash out the details...

To allow the controller to control the AC power to the Ballast, I am planning to put a solid state relay in line with the ballast AC power.

This means that the controller will have to be responsible for turning the lamp on as well as turning it off. The problem is... how will the controller determine if the lamp has properly started? Im planning to get around this by using a photo resistor or some other light sensor to see if any light is coming from the lamp. So basically the way things will work is: When the projector is plugged in, the controller is energized and starts running, when the power button (controller input) is pressed, the controller enters "Projector Boot Mode" where it will attempt to start the lamp by energizing the ballast, and checking to see if it sees any light. If it sees light then it enters "Projector Running" mode... if it doesnt see any light it waits for a few seconds then tries again. It will stay in "Projector Boot Mode" until it can either start the lamp, or 10 minutes elapse when it will give up trying to start the PJ, and shutdown.

Then there is the fan issue... If the controller is controlling the lamp power, I may as well add the fan power control as well.... I was planning on doing this later...sigh...
  Reply With Quote
Old 11th September 2005, 04:44 PM   #50
diyAudio Member
 
Join Date: Dec 2002
Location: VA
Time for an update...

I got some time to work on the P-Brain...

Almost everything is in place to build this thing...

I decided to use a PIC16F876 as the controller because it has lots of IO pins.

So far this is the configuration...

PIC16F876 running at 20Mhz
120v Solid State Relay for ballast power control
Photoresistor for light detection
On/Off pushbutton
On/Off LED indicator
DS1302 realtime clock
DS1620 temp sensor
Alarm buzzer
Wired Motion detector (I took this off of my home alarm system)
IRF510 Mosfets for Fan speed control (Im going to use PWM to control the fan speed). Im planning to have 4 independently controllable fan circuits

I still need to incorporate a serial EEPROM for data storage.
I still need to incorporate a way to detect fan failure.

  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help my brain hurts kendt Pass Labs 13 14th January 2007 12:57 AM
Point my brain somewhere Madmike2 Pass Labs 26 6th August 2005 06:04 PM
HELP! my brain is melting lolojr1 Everything Else 17 30th January 2005 04:14 PM
Music and the Brain Prune Everything Else 0 2nd January 2005 01:12 AM
Our Music And Our Brain mrfeedback Everything Else 3 22nd June 2003 06:25 PM


New To Site? Need Help?

All times are GMT. The time now is 06:34 AM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright ©1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2