Re: I can has teh interwebnetz?
Interesting solution to an annoying problem. +rep
Are you sure you're renting the modem from Verizon? I thought I was too, but when I canceled my service with them I discovered that I had gotten it for free when I signed up with them. ...on a completely unrelated note, if you want a DSL modem to tear apart and modify for a more seamless solution, I have an extra one that I don't anticipate I'll ever use in the foreseeable future.
Re: I can has teh interwebnetz?
Well, when we signed up for our WiMax service, it said the main "brick" was theirs; the USB modem is ours to keep because we bought it! Sooooo.....
Re: I can has teh interwebnetz?
You have to rent Verizon modems now?? I've never had to pay for them before.
Re: I can has teh interwebnetz?
Well not "rent" but it's included in the bill. IIRC you need to send it back if you cancel service. If it's ours to keep I may just say F-it and tear it apart and do it nice and clean-like and just chock this up to a learning experience with etching :D
Re: I can has teh interwebnetz?
OK so after doing some reasearch, it appears that I own the modem. They bill you at the time of service startup. This changes things I believe :D
From this link:
http://www22.verizon.com/foryourbusi...packageb_e.asp
Quote:
Modem billed at $99, plus applicable taxes at time of order.
I think I'll pop it apart and see if I have room to put the components inside it, and just use a relay instead of a servo on the internal connections to switch it on and off. I'll report back after work tonight....
Re: I can has teh interwebnetz?
Ah that must be a new thing.
Re: I can has teh interwebnetz?
Hehe :D Brilliant solution to a bugging problem :D +rep for you & to crenn for the codage :D, wish I could get motivated to learn a bit of coding & diy electronics to do some interesting stuff but wow it must take a long time to learn.
Re: I can has teh interwebnetz?
That's the beauty of Arduino....it's quick and REALLY easy. I had ZERO experience with coding until I got mine, and basic things are a breeze to me now. The more complex I need crenn for though :D
Re: I can has teh interwebnetz?
It's done! :banana:
I got all the parts cut out and glued together
Here you can see the tab to act as a guide for the actuator arms
I ended up having to put a small piece of wire to hold the main actuator rods together. They were moving outwards and missing the on/off switch completely.
And the final shots. In the second pic you can see the sensor shroud I made out of black foam poster board. This shields all but the internet indicator light from the light sensor.
and the final code (thanks again crenn!!)
Code:
#include*<Servo.h>
#define dropouttime 30000
#define offtime 120000
#define connecttime 180000
enum {
waitingDrop='A',
dropDetected='B',
waitingConnection='C'
};
enum{
turnOff=79,
turnOn=119
};
int photocellPin = 0;
int photocellReading;
char state = waitingDrop;
char laststate;
unsigned char servoval = turnOff;
long looptimer, servotimer;
Servo servo;
void setup()
{
Serial.begin(1200);
servo.attach(9);
servo.write(servoval);
delay(2000);
servoval = turnOn;
servo.write(servoval);
servotimer=millis();
looptimer=servotimer;
}
void loop()
{
if (((millis()-servotimer) > 50) || (state != laststate)) {
servo.write(servoval);
servotimer = millis();
}
laststate = state;
if (state == waitingDrop) {
photocellReading = analogRead(photocellPin);
Serial.print("Analog reading = ");
Serial.println(photocellReading);
servoval = turnOn;
if ((photocellReading <= 100) && ((millis()-looptimer) > dropouttime)) {
state = dropDetected;
Serial.println("Dropout detected");
looptimer = millis();
}
else if ((photocellReading > 100) && (state == waitingDrop)) {
looptimer = millis();
}
}
else if (state == dropDetected) {
servoval = turnOff;
if ((millis()-looptimer) > offtime) {
Serial.println("Turning Modem On and waiting for connection");
state = waitingConnection;
looptimer = millis();
}
}
else if (state == waitingConnection) {
servoval = turnOn;
if ((millis()-looptimer) > connecttime) {
state = waitingDrop;
Serial.println("Waiting for Dropout");
looptimer = millis();
}
}
else {
Serial.print("States: ");
Serial.print(waitingDrop);
Serial.print(dropDetected);
Serial.println(waitingConnection);
Serial.print("Invalid state: ");
Serial.println(state);
if ((millis()-looptimer) > dropouttime){
state = waitingDrop;
looptimer = millis();
}
}
}
Re: I can has teh interwebnetz?
Video of this thing in action? eh?