jm82792
Sep 15 2009, 01:07 AM
Basically I need an excuse to solder something together(I love electronics to an extent),
I wanted to do LEDS but I'm upgrading and don't need a pico.
But I want waves, water movment but don't relish the idea of spending $250 to $400 on a Vortech.
How hard would it be to put together a basic PWM wave controller for the controllable koralias ?
Are there any schematics somebody could show me ?
Could it, since I don't know how to code, be without a controller ?
evilc66
Sep 15 2009, 07:51 AM
You could do it with a series of 555 timers. Use a pair for pwm timing, and another for switching between the two. Using a controller like an Arduino would be far far easier.
spark
Sep 15 2009, 08:45 AM
I would think you would have to use a crystal oscilator or the (frequency) timing would not be correct and cause a lot of issues.
I agree with Evil. No point in re-inventing the wheel. You could purchase a kit to assemble an Arduino as well if you like to solder electronics.
QUOTE (evilc66 @ Sep 15 2009, 06:51 AM)

You could do it with a series of 555 timers. Use a pair for pwm timing, and another for switching between the two. Using a controller like an Arduino would be far far easier.
spark
Sep 15 2009, 09:07 AM
http://www.makershed.com/ProductDetails.as...oductCode=MKMD3QUOTE (spark @ Sep 15 2009, 07:45 AM)

I would think you would have to use a crystal oscilator or the (frequency) timing would not be correct and cause a lot of issues.
I agree with Evil. No point in re-inventing the wheel. You could purchase a kit to assemble an Arduino as well if you like to solder electronics.
evilc66
Sep 15 2009, 09:28 AM
QUOTE (spark @ Sep 15 2009, 08:45 AM)

I would think you would have to use a crystal oscilator or the (frequency) timing would not be correct and cause a lot of issues.
Nah. A 555 timer set up to run a pwm train is more than accurate enough for this. It's actually the same circuit that I posted for the Meanwell driver dimming control, just with an added FET for extra power handeling. The frequency isn't as stable as it would be with an ocsillator, but it shouldn't matter much, as the duty cycle is what ultimately controls the pump speed. There does seem to be some smarts to the motor though, as above about 90% duty cycle, the pump shuts down. This is why you can't run the pumps directly on 12v DC.
jm82792
Sep 15 2009, 03:12 PM
Okay I am not an engineer,
nor am I that knowledgeable I can understand some of what is being said but not all.
If I did solder a Arduino together,
I wouldn't know what to do afterward.
In my perfect idea I somehow flash the memory with the code(I can't code) or "something" then have it work with the input of potentiometers ro some other simplistic control the controller uses as an input.
I"m more of a guy who deals with more visual and less technical technicalities like,
Maya, Blender and such. I'm actually decent at animation, lighting and setting up render parameters

How is the complexity different from using a pair of 555 timers(I used them in a few electronics kits back when i wasn't a teen) verses using an Arduino, when I'm a layman when it comes to coding plus I do not have any familiarity with controllers.
isidro0
Sep 15 2009, 03:27 PM
you will have more options with a microcontroller. To learn code, read through the forum and look at peoples examples, copy some of their projects to get experience, them you can get an idea on how to modify the code to your needs. Its like led diy, you got to just jump in and do it and quit thinking about doing it.
jm82792
Sep 15 2009, 03:40 PM
I fully understand the concept of doing a DIY led array,
but yes I see your point with a controller.
Well I have always wanted to code without ripping my hair out...
Your talking about this forum and the diy reef controller project, correct?
evilc66
Sep 15 2009, 04:01 PM
There are some good sites that you can get started with programming. The Arduino main site has a lot of useful knowledge, as well as the Adafruit site. There are many more as well. Google is your friend

Considering what you are looking to do, the programming will be fairly simple. All you will be doing is setting up inputs for your pots, outputs for your pumps, and a few loops to ramp up and down the speed. Use the Koralia controller as an example, with high and low speed set points, and a timer for how fast you switch back and forth. Once you get comfortable with that, you can add more pumps, and maybe some additional functionality like feeding modes.
jm82792
Sep 15 2009, 04:14 PM
Well I think I'm going to buy this,
should be able to toy with it and then order the stuff to control the koralia later on.
http://www.hacktronics.com/Arduino/Arduino...ml?redirected=1Saw a 5 minute youtube video introduction,
seems simple and not what I expected in complexity.
evilc66
Sep 15 2009, 05:44 PM
Looks like a nice kit to get started. The Wiring programming language that the Arduino IDE uses is very similar to C, but takes all the complexities out of interfacing with the hardware. If you can think logically (e.g. if this happens, this should happen, but only when this happens, etc...)
If you are going to play with the controllable Koralias, you need some circuitry to handle the power requirements, and a 12 power supply. It's pretty easy. All you need is some FETs that will basically act as digital relays to interface the 5v logic signal from the Arduino to the 12v power supply to the pumps.
I have actually been contemplating doing the same project for a while since I got my controllable Koralia set at the begining of the year. I wanted to set up a pair of K1s on the 30g cube with my own controller. I'll help you as much as I can on getting things running. I need to go back and measure the frequency that the Koralia controller uses.
jm82792
Sep 15 2009, 06:09 PM
Yes I know they you need an indirect method of controlling the pump,
kinda like a relay but instead FETs since they can handle lots of power on the cheap.
I can get a wallwart power supply easy.
I'm going to order the kit and really and I mean really look forward to playing with it.
I like the idea of simple, free and competitive with other non free closed source products.
It somewhat mirrors Blender,
Blender has many features that are better or the same as Maya, XSI and such and instead of spending a couple grand it's free, in this case it's cheaper and more simplistic.
Should I spend the extra $12 for a prototyping face shield ?
Otherwise that's my only question.
http://www.adafruit.com/index.php?main_pag...de4bfd8df11db85What I'm going to buy, company seems to have a good reputation.
http://www.adafruit.com/index.php?main_pag...products_id=193
Vancouver Reefer
Sep 15 2009, 07:27 PM
Hi JM,
The arduino is a great piece of kit. I got into my Arduino last xmas and now im very deep into my controller build. There is tonnes of information on Arduino projects on the net and its very easy to interface and expand your ideas with it.
Have a look at my signature for the link to my webpage on my controller. Im using PWM on quite a few things and you might be able to get some info or ideas from there.
There are quite a few of us on here which are using Arduinos and would be glad to help out with any questions you might have
VR.
jm82792
Sep 15 2009, 10:00 PM
Cool!
I just read the whole thing,
pretty complex but impressive

Just order the budget kit,
includes leds, a potentiometer or two, some resistors plus I added on a buzzer and a basic temperature sensor.
Best of all it was only $60 shipped to Hawaii.
KDris
Sep 15 2009, 11:03 PM
On that other fish site, someone analyzed the Koralia's on an oscillosope. The controllable Koralia's are actually a 24V AC square wave. So you would also need an H-bridge after the PWM circuit and before the Koralia to switch between +12V and -12V.
jm82792
Sep 15 2009, 11:33 PM
Not sure what H bridge is, (This ? I don't think so but
http://library.solarbotics.net/circuits/dr...varHbridge.html]
but I do know what square wave AC is.
Could you give me the link for that(H bridge and RC ?)
I'd like to do it right so i don't fry a koralia after I spend the time understanding arduino.
evilc66
Sep 16 2009, 09:31 AM
QUOTE (KDris @ Sep 16 2009, 12:03 AM)

On that other fish site, someone analyzed the Koralia's on an oscillosope. The controllable Koralia's are actually a 24V AC square wave. So you would also need an H-bridge after the PWM circuit and before the Koralia to switch between +12V and -12V.
Not sure about that. When I measured my setup, I was pretty sure it was a 12v DC square wave. I'll see if I can get the scope on it tonight.
jm82792
Sep 17 2009, 05:48 PM
Current conclusion from this thread is that it's DC PWM.
http://reefcentral.com/forums/showthread.p...mp;pagenumber=2Found the following tutorials from arduino site that will help,
Fading a LED with PWM, Blinking a LED,
Calibrating a Potentiometer and a few others.
Got some algebraic formulas I'm drafting that utilizes some basic,
"put input X in from a potentiometer(s) and you can control a few settings."
Like Frequency, length of time per pulse, Location of zenith of pulse within pulse length,
power of pulse zenith, initial delay of slave pump for proper sync and that's it so far

Now to wait for the controller so i can show and not yak on and on......................
KDris
Sep 18 2009, 04:38 PM
QUOTE (jm82792 @ Sep 17 2009, 05:48 PM)

Current conclusion from this thread is that it's DC PWM.
http://reefcentral.com/forums/showthread.p...mp;pagenumber=2Found the following tutorials from arduino site that will help,
Fading a LED with PWM, Blinking a LED,
Calibrating a Potentiometer and a few others.
Got some algebraic formulas I'm drafting that utilizes some basic,
"put input X in from a potentiometer(s) and you can control a few settings."
Like Frequency, length of time per pulse, Location of zenith of pulse within pulse length,
power of pulse zenith, initial delay of slave pump for proper sync and that's it so far

Now to wait for the controller so i can show and not yak on and on......................
"For those who were interested in the idea of hooking these pumps up to the much cheaper Tunze controller, I have found that this will not work. These pumps run on 12V AC, not DC (the Tunze uses DC). I drew up a design for a basic controller that will control one pump for about $50 and can be easily and cheaply modified to control more pumps. The parts are on their way, and I'll post my results in a few days."
--Taken from within linked thread
Evil I'd definitely been interested in your findings as it seems like there's a lot of confusion surrounding these. From what I understand though, they take in 12V DC and output a 12V AC square wave. So essentially they are using a PWM coupled with an H-bridge. However this shouldn't complicate the coding much at all, the actual circuit will just have to be slightly more complex.
another quote from within
"
I have a decent knowledge of some areas of electrical engineering, but motors and control methods are not within what I'd consider my area of expertise. However, I thought that PWM was typically used to essentially simulate an AC waveform without having to actually create a sinusoidal wave. So, any electrical motor that runs on a PWM signal should also run on sinusoidal AC, and vice versa. I fed the Koralia pump a 12V DC signal and just got a brief click, as if it was making a partial turn. I then fed it a 12V AC signal, and it worked just fine.
My previous statement that the Tunze controller and Koralia pump wouldn't work together was based on the assumption that the Tunze uses a plain DC signal. I haven't yet received the Tunze controller I was going to hook up to the Koralia pump, so maybe it will work if it uses PWM. However, based on the relative prices of their controllers and pumps, I'm inclined to think that maybe the controller does put out a plain DC signal that controls electronics inside their pumps that convert the DC input into a PWM signal that drives the motor.
Regardless, the 12V AC signal seems to drive the pump just fine, so I'm planning to build a variable frequency controller to run the Koralia. The design I've put together would just switch between two frequencies (i.e. two speeds) at controllable intervals. It certainly doesn't have as many options as the Tunze or Hydor controllers, but it's enough to create alternating flow patterns, which is all I really want."
jm82792
Sep 18 2009, 08:01 PM
I'm no engineer so I'm waiting for somebody who knows what they are doing to tell me what I should be doing

I read the whole thread but I don't have much physical knowledge with this kind of stuff,
so some of the terminology is foreign.
jm82792
Sep 19 2009, 10:13 PM
Got the arduino.
Man all I can say is that it's really easy taking code for led blinking,
pwm fading and other stuff and bend it to what you want.
Plus the code is super simple,
the input output code is almost English in simplicity.
I only have 2 pots,
gotta order more.
Pretty sweet,
I can control how quickly it revs up and down(plus the set maximum),
length of pulse, frequency and such with the arduino and some potentiometers.
isidro0
Sep 20 2009, 12:39 AM
Like I said, you just got to jump in. Now, the problems is that everytime you order something you need, as soon as you get it you'll need to order more parts.
jm82792
Sep 20 2009, 01:02 AM
Well I'm impressed,
I fell like I know something

Got a couple things going on..
Evil66 do you know for sure if it's PWM,
if it is this will be extremely easy since I'm getting the LED to do what I want with PWM plus some timing.
I'm going to have to probably go with a LCD and keypad eventually,
since using potentiometers for everything won't be practical for adjustment unless you want to modify the code for the proper range to work on "your" tank.
mabviper
Sep 20 2009, 01:10 PM
Sorry to be the bearer of bad news but a simple pwm signal is not going to drive this motor properly. Simple pwm can drive a dc motor like tunze dc controllable but not this one. Like what KDris experienced trying to drive the motor w/ pure dc, pwm or not, all you'll get is a click. If you can make a sinosoidal ac or even a square wave ac (maybe) w/ an arduino, you can definately drive this motor. Varying the ac frequency would allow you to control this drive.
jm82792
Sep 21 2009, 12:15 AM
Well that isn't good.
So if I could get a square or true sine wave AC.
keep it at 90% duty and below I could drive them ?
I just want to not get stuck with a pump I can't use,
the tunzes are ridiculously expensive so that's not an option.
Well I'm lost,
my first leap of faith that probably isn't goign to work.
The controllable tunzes are $200,
MP40 looks pretty good but I'll never spend that much on a tunze or MP.
evilc66
Sep 21 2009, 09:45 AM
I'm going to try and get this on the scope tonight. We will get this cleared up.
mabviper
Sep 21 2009, 09:55 AM
Yeah, sorry about that. It's better to know before you buy it than to know afterwards. Generating an ac signal from dc is fairly complex. Alot of things can potentially go wrong in terms of the circuit, h-bridge, drivers, etc. The software is also pretty complex. Unless somebody makes a working open source circuit and software for this or you're knowledgeable in engineering, specifically in motor control, I would give up trying to make a diy solution for the koralias.
Again totally sorry for the bad news.
evilc66
Sep 21 2009, 10:04 AM
Lets not rain on the parade until I can confirm or deny the AC rumors.
mabviper
Sep 21 2009, 10:17 AM
QUOTE (evilc66 @ Sep 21 2009, 10:45 AM)

I'm going to try and get this on the scope tonight. We will get this cleared up.
Please do. I've only found the schematic pic for the controller. I'd like to see a picture of the scope reading as well. Depending on your reference, you might see some like dc-like from 0 to say 12v but the duty cycle will constantly change.
I'd <3 you so much if you have a digital scope and can show a triggered time slice of around 10ms. I just want to know what scheme they're using to drive it. If I have time, I might be able to get something going but for now, more information is definately helpful.
evilc66
Sep 21 2009, 11:46 AM
You gonna love me long time then

I have a USB scope so I can get you some nice screen shots of the pulse train. I played with the controller for a while after I picked it up and put it on the scope. This is why I'm not convinced that it's an AC square wave. It also doesn't make sense from a hardware cost perspective. Why go to all the trouble of sourcing a low voltage AC motor and designing relatively complex controls for it, when DC motors are dirt cheap and plentiful, and controlling them is about as easy as it gets.
robw
Sep 21 2009, 06:55 PM
QUOTE (mabviper @ Sep 21 2009, 09:17 AM)

Please do. I've only found the schematic pic for the controller. I'd like to see a picture of the scope reading as well. Depending on your reference, you might see some like dc-like from 0 to say 12v but the duty cycle will constantly change.
I'd <3 you so much if you have a digital scope and can show a triggered time slice of around 10ms. I just want to know what scheme they're using to drive it. If I have time, I might be able to get something going but for now, more information is definately helpful.
Where did you find the schematic. I have been searching for info on this for weeks now with no luck, I have found some utube videos of a fellows contoller from Japan but no links of any more info.
Tagging along...
mabviper
Sep 21 2009, 08:50 PM
Hmm, I might have used the term schematic incorrectly. What I found was a picture of the controller showing the circuit. Anyways, last year or so, somebody from RC took a picture of their controller. That pic showed alot of info with respect to how they're driving the motors.
jm82792
Sep 22 2009, 02:10 AM
Well I'm a bozoo,
I have no clue what is in the driver, maybe if I googled every part I could understand it.
evilc66
Sep 22 2009, 05:55 PM
Ok, a day late, but here it is

This is the output at it's slowest speed that I could get without the controller erroring out. If the max speed is lower than the min, it pitches a fit and shuts the pumps down.
The blue horizontal line in the middle (with the arrow on the left) is 0v. Pretty obvious that this is not an AC waveform. Screen is set up for 50uS/div, 5v/div. This shows a 20Khz output frequency with a 15v output voltage, even though the system is stated as 12v.
Trailing edge rings a bit with the duty cycle this low, but tightens up as the duty cycle increases.

This is max output. As you can see the duty cycle isn't quite 100%. More like 95%.
Anyone need to see more? I'd say this wipes all doubt that this will be easily controllable by an Arduino. At a minimum, all you would need is a good FET (J-FET would be a good choice for the high-ish frequency) to drive the pump. An inductor would help smooth the transitions. Maybe I'll give this a shot in the near future.
mabviper
Sep 22 2009, 06:24 PM
That's amazing evil ^^. Can you do an adjustment to the first plot and to 1mS/div horizontally? The first plot shows 20k frequency as a carrier to the AC signal, which should be running at 60hz. If you zoom out to 1ms, you should see something completely different. <3 you for having those plots ^^.
evilc66
Sep 22 2009, 06:33 PM
I'll see what I can do.
KDris
Sep 22 2009, 10:50 PM
QUOTE (evilc66 @ Sep 22 2009, 07:33 PM)

I'll see what I can do.
I stand corrected! and am also very happy to admit so because this makes everything 100x easier. Thank you for your efforts evil.
jm82792
Sep 22 2009, 11:28 PM
Well you just made me extremely happy.
So any schematic on how to exactly use a FET and inductor using arduino's PMW output?,
the part#so that I can order the parts and buy a koralia ?
http://www.arduino.cc/en/Tutorial/PWMSo in my little code I've been working on,
keep the duty cycle from like 95% to 10%(or have it just die?)?
Sorry reading the scope isn't something I'm good at.
evilc66
Sep 23 2009, 08:12 AM
Here is the basic hookup for a FET. The three connection points are Gate (control pin), Source (incoming power), and Drain (outgoing power).
CODE
To Pump
|
|-| Drain
Arduino--10K-----|
Gate|-| Source
|
+12v
Still need to measure the current draw to see what kind of FET is required, but you can easily oversize the FET to about 20A and be safe.
I'd keep the pumps spinning in the low cycle. If you stop them, when they restart, they have to have the props hit the stop pin every time to get the rotation right. Beyond the noise being annoying at best, it will wear on the pump a lot quicker. You may have to play with the low speed to see just how slow they will go before they start cogging (can't keep spinning smoothly), or stop all together.
robw
Sep 23 2009, 08:16 AM
Thank you very much for the scope pics! A picture is worth a thousand words. And that will put the "mystery" to rest. Now to figure out the programming and circuitry.
mabviper
Sep 23 2009, 10:23 AM
Hmm, I would personally hold out on buying a Koralia motor and Arduino to try this experiement. I would still like to see a scope plot at 1ms/div or a bigger horizontal resolution to see the pwm duty cycle change w/ respect to time.
Yes, right now it shows a clear DC signal. However, what I saw from the controller pics, I can personally point out to you guys the components to make an H-bridge DC to AC inverter. At this resolution all you see is the frequency of the carrier signal. I also have a Koralia controllable motor at home that I bought from somebody in these forums a while back. A simple dc pwm will not drive it.
If you want to know more of what I'm talking about, I've searched out links to read. I tried websites but no luck so PDF files will have to do

Just look at the pics/graphs, you don't have to read the whole thing ^^.
AC pwm generation 1Focus on how the DC duty cycle changes with respect to the slower sine wave.
AC pwm generation 2Focus on figures 4 and 8 and some of the experimental graphs they have.
Hope everybody knows that I'm not trying to hirder the development of these controllers. I just want to save you guys time, money and a few white hairs.
evilc66
Sep 23 2009, 10:28 AM
I'll try and get the scope back on it today. Maybe at lunch if I'm feeling adventurous.
evilc66
Sep 23 2009, 11:15 AM
Didn't want to see this, but mabviper was right.

AC carrier wave. This gets a little more tricky, but not impossible.
Schön
Sep 23 2009, 02:01 PM
What about recording the wave of the full program with a soundcard, and then plays it with an mp3 player in a forever loop, and amplifying it to the desired power? I think the arduino hasnt got enough resources to play waves over 20khz in audio format.
evilc66
Sep 23 2009, 02:10 PM
That's a very interesting take on the problem.
20Khz may not be necessary to drive the motors. Hydor may have gone in that direction from a smoothness standpoint at low speed. If we can get a functional circuit working, we can try many frequencies to see what will work with the least amount of processing overhead.
Schön
Sep 23 2009, 02:30 PM
The pump produces a heavy inductiv load, and it changes the waveform of the signal. Evil, did you use the pump when you made the measurement (i think yes)? There can be another source of signal errors, the efficiency of the controller, be optimist, and it is unimportant... If someone finds the original signal, maybe the arduino will be able to play it with the digital converter.
evilc66
Sep 23 2009, 04:34 PM
Scope captures were taken without the pumps connected. It's the only way I could do it without puncturing the pump harness.
Marian
Sep 23 2009, 07:42 PM
... what if we use the buzzer code for Arduino ? If I recall correctly, the routine was capable of both time and frequency ??? like "buzz(pin, freq, duration)"
The interfacing is gone be tricky though. One will need a SSR PMW capable.
cheers,
Marian
evilc66
Sep 23 2009, 07:45 PM
???? Why do you need an SSR?
mabviper
Sep 23 2009, 08:11 PM
Hmm, I guess the sound wave could possible~ work. Basically the motor doesn't care what kind of signal you feed it. It just needs an AC signal at 60hz (speculated) with an rms of 12VAC. So if you can make an audio signal at 60hz, amplify it to the right strength, I think it could possibly work. Now, getting an amplifier to do that is the difficult part (I think, I don't have experience w/ audio amplification).
If you try to compose an ac from a dc signal using an H-bridge (mosfet or igbt based), what's important is the pwm gating scheme. I know the Arduino is capable of generating pwm signals. With some coding, it can also make a sine wave at 60hz using a carrier frequency of say, 20khz. I don't have experience w/ Arduino personally but I'm sure it can be done. The main problem I see is the potential to short circuit the mosfets together simply because most Arduino chips aren't designed for pwm motor control.
If I'm not making any sense, please look at the links I posted earlier. ^^
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.