Reef Central Online Community

Home Forum Here you can view your subscribed threads, work with private messages and edit your profile and preferences View New Posts View Today's Posts

Find other members Frequently Asked Questions Search Reefkeeping ...an online magazine for marine aquarists Support our sponsors and mention Reef Central

Go Back   Reef Central Online Community Archives > General Interest Forums > Do It Yourself
FAQ Calendar Today's Posts Search

 
 
Thread Tools Search this Thread Display Modes
  #26  
Old 11/01/2007, 10:58 AM
A.T.T.R A.T.T.R is offline
Addicted to the Reef
 
Join Date: Jan 2007
Location: ft lauderdale
Posts: 988
IF this dosnt break the pumps ( btw this project is on hold till sunday night.. no free time till then unless i bring laptop to work and play with it tommorrow then i only need to order some DPDT SSR ( double pole double throw solid state relays)

all that i plan to be needed is a pic micro controller a 5 volt power source ( regulated) a 120 volt regulated powersource ( most likely going to make one using diodes and capacitors and resistors) dpdtssr and that should be it followed by a week of testing to make sure it dosnt kill the PH

but you need a way to program the chips. and the programer is 60 bucks im sure you can diy one but ill have to look into that. programer isnt really worth buying unless your going to be using these chips for multiple things

possiably if the diy method is to hard i could just order some extra chips and sell them to you guys programed at cost or find some one local in your area to send the code to
__________________
Addicted to the Reef
Chris

"to many tanks not enough r/o"
  #27  
Old 11/01/2007, 12:07 PM
vance.110 vance.110 is offline
Registered Member
 
Join Date: Jul 2001
Location: Galloway, Ohio
Posts: 82
Once (if) this thing gets working I think many of us would be more than willing to pay for your time and parts for those of us who really can't do the programing. I know I would. I'll be honest though i'll probably be a pain asking how to put the controller together also.
  #28  
Old 11/01/2007, 12:08 PM
sfsuphysics sfsuphysics is offline
Resident physicist.
 
Join Date: Jan 2004
Location: San Francisco
Posts: 5,667
One problem that you might be running into is the fact your square wave. AC power has a ramp up/down from positive to negative voltage, when you do a square wave you get a hard switch from plus to minus with no transition. This might make some problems for your controller.

I know when I tried to power my tank from my car via an inverter, that uses a "modified square wave" I blew out every damn one of the inverters I tried.
__________________
Mike
  #29  
Old 11/01/2007, 01:55 PM
stugray stugray is offline
Premium Member
 
Join Date: May 2004
Location: Longmont, Co
Posts: 1,688
A.T.T.R

Could you explain a little better what you are trying to do?

It sounds like you are trying to approximate 120 Volt Alternating Current using a 120 volt DC power source, and turning it on& off with a solid state relay at 60 Hz?

If your idea is as simple as that, it wont exactly work that way.

Unless you use a H bridge driver circuit, you will only get current to flow in one direction. The AC motor requires the current to flow in both directions. If you try to only drive in one direction ( the current ), the motor will not run very smoothly. Even if you can get it to go somewhat smoothly with the square wave DC signal, you would be limited to only half the possible torque from the pump.

However, you could use the PIC controller to generate an AC signal that approximates an AC sinusoid and even vary the frequency of the 60 Hz to slow down & speed up the motor.

Google "H bridge" or DC to AC Inverter design. If you built an inverter ( a computer UPS would work ) and used the PIC to vary the output drive frequency that would work.

HTH

sfsuphysics

I have a "true sinusoid" inverter for a car that can pull ~50 amps from a car battery. I intend to set it up as an UPS with my 8X12V, 12AH gel cells ;-)

Stu
__________________
Some people think that I have Attention Deficit Disorder. They just dont understand that........ Hey! Look a chicken!
  #30  
Old 11/01/2007, 04:52 PM
A.T.T.R A.T.T.R is offline
Addicted to the Reef
 
Join Date: Jan 2007
Location: ft lauderdale
Posts: 988
it will be ac but square wave. and that is why i want to try it first for a week before i say it works or dosnt. if it dosnt then life gets much harder and ill probobly pass ont his idea since i dont want to try to do anything using sine waves O_O not yet atleast
__________________
Addicted to the Reef
Chris

"to many tanks not enough r/o"
  #31  
Old 11/01/2007, 05:19 PM
A.T.T.R A.T.T.R is offline
Addicted to the Reef
 
Join Date: Jan 2007
Location: ft lauderdale
Posts: 988
worst comes to worst ill use the pwm of the pic and do it that way but im hoping this method works

ill probobly first try to use a second set of relays that operate 1/4 way throu each wave and acan be used to step up the current ( start at a lower voltage and then step up.; then back down and do the same for the reverse

itll be more annoying but it will mroe appx a truesine wave and if that fails ill move to pwm and that works by varying the on time ( so the power turns on an off many times in eachwave with varying lengths to simulate th magnetic pull.. or somthing like that .. didnt really read much on that)

anyways back to work i go
__________________
Addicted to the Reef
Chris

"to many tanks not enough r/o"
  #32  
Old 11/01/2007, 09:23 PM
A.T.T.R A.T.T.R is offline
Addicted to the Reef
 
Join Date: Jan 2007
Location: ft lauderdale
Posts: 988
btw 12 amp hour gells cells?? why

go buy a real battery get some 200 ah :P ( ever try to move one of those on a boat O_O weigh over 200 lbs i think
__________________
Addicted to the Reef
Chris

"to many tanks not enough r/o"
  #33  
Old 11/02/2007, 09:11 PM
liveforphysics liveforphysics is offline
Registered Member
 
Join Date: Nov 2005
Location: seattle WA
Posts: 145
The little motor really just wants to see the current take the shape of a sine wave. You could use a simple switched DC H bridge along with a little inductor and cap with sizes sized for the motors windings to feed a nice sine wave to the motor.

Just remember with single phase motors, you can only drop frequency to about 25hz and keep it running normally (depending hugely of course on the motor).

If you get a system like this working, I know loads of people would be excited to use it with Maxi-mods and Koralas.

Best Wishes
  #34  
Old 11/02/2007, 09:26 PM
A.T.T.R A.T.T.R is offline
Addicted to the Reef
 
Join Date: Jan 2007
Location: ft lauderdale
Posts: 988
using an inductor and cap i could do true sine from square?
__________________
Addicted to the Reef
Chris

"to many tanks not enough r/o"
  #35  
Old 11/05/2007, 04:20 PM
A.T.T.R A.T.T.R is offline
Addicted to the Reef
 
Join Date: Jan 2007
Location: ft lauderdale
Posts: 988
i seem to of over come most of my program errors.. running test on a test led board now. so far all frequency randomizers and time randomizers seem to work PERFECT!

problom was i could only have 20 variables per 'bank'
__________________
Addicted to the Reef
Chris

"to many tanks not enough r/o"
  #36  
Old 11/05/2007, 05:48 PM
A.T.T.R A.T.T.R is offline
Addicted to the Reef
 
Join Date: Jan 2007
Location: ft lauderdale
Posts: 988
this graph may not mean much to you but to me it shows that my program is working!

these show the values of some registers changing over time. ( such as hz and time to next change)
__________________
Addicted to the Reef
Chris

"to many tanks not enough r/o"
  #37  
Old 11/05/2007, 10:11 PM
A.T.T.R A.T.T.R is offline
Addicted to the Reef
 
Join Date: Jan 2007
Location: ft lauderdale
Posts: 988
very promising !! 2 virtual pumps running complealty randomly
__________________
Addicted to the Reef
Chris

"to many tanks not enough r/o"
  #38  
Old 11/06/2007, 01:42 PM
A.T.T.R A.T.T.R is offline
Addicted to the Reef
 
Join Date: Jan 2007
Location: ft lauderdale
Posts: 988
ran into a problom.. for some reason the timer fuction stoped working .. but since the timer advances every 256 lines and my code is about aht long.. wont make a diff. ill just do a incf instead


hmm wonder why it stoped.. ill fiddle with it more later
__________________
Addicted to the Reef
Chris

"to many tanks not enough r/o"
  #39  
Old 11/08/2007, 10:39 PM
A.T.T.R A.T.T.R is offline
Addicted to the Reef
 
Join Date: Jan 2007
Location: ft lauderdale
Posts: 988
BLAAA nother problom as of two days ago


the ramdomizer was evening out! it eventualy reached apoint where by the time it asks for the random number again it is the same as the previous
this seems ot happen when time is 254 and HZ is about 58


after two more days of simulation it seems to be solved

still looking localy for DPDT SSR
__________________
Addicted to the Reef
Chris

"to many tanks not enough r/o"
  #40  
Old 11/09/2007, 02:32 PM
truthdesigns truthdesigns is offline
Premium Member
 
Join Date: Jul 2006
Location: Gilbert,AZ
Posts: 991
you lost me about a mile back
__________________
-Justin
  #41  
Old 11/09/2007, 02:42 PM
aquagurl aquagurl is offline
Registered Member
 
Join Date: Oct 2006
Location: Indianapolis
Posts: 65
Me too but I am excited about this! Keep up the good work
  #42  
Old 11/11/2007, 03:16 PM
A.T.T.R A.T.T.R is offline
Addicted to the Reef
 
Join Date: Jan 2007
Location: ft lauderdale
Posts: 988
ok well .. i know have it running 3 simulated pumps going to shoot for a total of 8

BUT each pump is a lil less randomized then the last..

for ex pump 1 is RANDOM as heck
pump 2 seems to adjust the hz up 100 down 99 up 100 down 99 most of the time..

i can get both to be more random but that requires changing the code that keeps thema random ( numbers being advanced at certin triggers... for ex when ever pump 2 changes speed it increases variable ram 1 by 1. and pump 1 increases ram 2 ( my two numbers used to decide the pump speeds.
__________________
Addicted to the Reef
Chris

"to many tanks not enough r/o"
  #43  
Old 11/12/2007, 09:02 AM
ShawnJones ShawnJones is offline
Registered Member
 
Join Date: Jan 2007
Location: Tampa, Florida
Posts: 124
A.T.T.R

Just picked up on this thread. I'm currently designing a aquarium controller but have based my design around the AVR microcontroller instead of the PIC.

It seems to me that if you are just trying to create a square wave that it would be much easier to utilize a 555 for the timing:

555 from Wikipedia

This would eliminate having to program a PIC for just one output. I could understand the microcontroller if you were trying to automate the controlling of the motor based on some type of feedback from the pump or other part of the circuit, but if you are trying to produce a square wave. Here is an example:

555 Square Wave Circuit

Thats just the first one that popped into google, there are many others. If you are using the PIC just to say you used a microcontroller, being a geek, I can understand that, but it is way overkill I think.

You could modify the circuit with a variable resistor to adjust timing, and set the duty cycle to what works for the motor.

Feel free to PM me if you need any help. Looks like a good project, I don't know your level of experience with electronics and electricity, but if you have never worked with line voltage before, please be careful, you don't want to get shocked, or worse, start a fire.

Shawn
__________________
We can't stop here! This is bat country!!

- Duke


allmyheroesletmedrown
  #44  
Old 11/12/2007, 10:34 AM
A.T.T.R A.T.T.R is offline
Addicted to the Reef
 
Join Date: Jan 2007
Location: ft lauderdale
Posts: 988
555 timer wont allow any randomization


if i wanted to just set a fixed speed that would be pointless( just buy a smaller pump)

this is actualy goign to vary the speed of hte pump over time
__________________
Addicted to the Reef
Chris

"to many tanks not enough r/o"
  #45  
Old 11/12/2007, 10:55 AM
ShawnJones ShawnJones is offline
Registered Member
 
Join Date: Jan 2007
Location: Tampa, Florida
Posts: 124
Ah... I see. Now I understand the uC issue. Let me know if you need help.

Shawn
__________________
We can't stop here! This is bat country!!

- Duke


allmyheroesletmedrown
  #46  
Old 11/12/2007, 12:25 PM
A.T.T.R A.T.T.R is offline
Addicted to the Reef
 
Join Date: Jan 2007
Location: ft lauderdale
Posts: 988
plus. ( not trying toeven start to think of this as of now) in the future i would like to upgrade to a better pic ( one with a lil more storage) and then use one of the pins as a digital input ( from a nother pic that will be part of a controller ) adn use those two togehter to create things like. calmer nights and so on) ( and stormy nights and blablablabla) may not use a pic in the controller part... i dont know yet. it isnt going to be TOO hard tho.

my end goal is to make a system that is expandable and cheep. so if any one wants to build it they can build what they want and if they want to add on it would be as simple as an ethernet cable connecting another box ( or how ever they decide to mount them)
__________________
Addicted to the Reef
Chris

"to many tanks not enough r/o"
  #47  
Old 11/12/2007, 02:32 PM
stugray stugray is offline
Premium Member
 
Join Date: May 2004
Location: Longmont, Co
Posts: 1,688
A.T.T.R,

Here's a silly question: Why dont you use a zero-crossing SSR and REAL AC power and just turn the pumps on and off for fractions of a second randomly?

I am just guessing that trying to simulate an AC signal using a 120V DC and pulsing the SSR at 60 Hz just seems like way too much trouble, and .... its likely not going to work.

As for where to get cheap SSRs, check www.mpja.com

Stu
__________________
Some people think that I have Attention Deficit Disorder. They just dont understand that........ Hey! Look a chicken!
  #48  
Old 11/12/2007, 02:35 PM
A.T.T.R A.T.T.R is offline
Addicted to the Reef
 
Join Date: Jan 2007
Location: ft lauderdale
Posts: 988
turning the pumps off for a fraction of a second isnt going to help slow the pump. same reason you cant use a dimmer switchs ( one that uses a triac not one that adds resistance)
__________________
Addicted to the Reef
Chris

"to many tanks not enough r/o"
  #49  
Old 11/12/2007, 02:42 PM
stugray stugray is offline
Premium Member
 
Join Date: May 2004
Location: Longmont, Co
Posts: 1,688
As a matter of fact it would work.

If you pulse an AC motor on for 1/2 second ( 30 AC cycles ), then off for 1/2 second ( 30 more AC cycles ), then you are effectively driving the pump in a pulse width type of fashion.

This will give an equivalent of 1/2 the max torque.

As long as the pump cannot reach full speed in 1/2 of a second then you can drive the speed to whatever average speed you want.

If the pump CAN reach full speed in 1/2 second, then run the pulse widths to 1/3 on 2/3s off. If that doesnt get what you want, you can adjust to any fraction of time on, any any fraction off. You can get pseudo-speed control that way if it doesnt wear out the pump in a few hours.

And it's completely different than using a dimmer switch. A dimmer reduces the Amplitude of the AC signal, NOT the frequency NOR the on/off time.

Stu
__________________
Some people think that I have Attention Deficit Disorder. They just dont understand that........ Hey! Look a chicken!
  #50  
Old 11/12/2007, 02:49 PM
A.T.T.R A.T.T.R is offline
Addicted to the Reef
 
Join Date: Jan 2007
Location: ft lauderdale
Posts: 988
your talking about cutting off ac power partway into a wave.. that is what dimmers do. they only alow parts of the sine wave out.



wait nm your saying allow 60 hz for 1/2 second then NO power for 1/2 second..

still seems extreamly rough on the pump
__________________
Addicted to the Reef
Chris

"to many tanks not enough r/o"
 


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 On

Forum Jump


All times are GMT -5. The time now is 08:41 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Use of this web site is subject to the terms and conditions described in the user agreement.
Reef Central™ Reef Central, LLC. Copyright ©1999-2009