Reef Central Online Community

Go Back   Reef Central Online Community > General Interest Forums > Do It Yourself
Blogs FAQ Calendar Mark Forums Read

Notices

User Tag List

Reply
Thread Tools
Unread 09/20/2014, 03:33 PM   #1251
SorsCode
Registered Member
 
Join Date: Apr 2009
Location: St. Louis, MO
Posts: 132
d0ughb0y - how hard would it be to convert this to a Due? Just to get the extra memory? I know it only runs on 3.3v, but that shouldn't be a big deal. Thoughts? Just want your opinion before buying one and trying.


SorsCode is offline   Reply With Quote
Unread 09/20/2014, 03:50 PM   #1252
Moomin1967
Registered Member
 
Join Date: Aug 2014
Location: West Sussex, UK
Posts: 128
Ok, have moved to port L 6&7 and it works.

Might try some diagnostics on A11 and 12.

Thanks

void initATO()
{
//ATO1 PortK bit3 PCINT19 analogue pin 43
//ATO2 PortK bit4 PCINT20 analogue pin 42
DDRL &= ~ _BV(PL6);
DDRL &= ~ _BV(PL7); //Data Direction Register Bit 6 input | Bit 7 input
PORTL |= _BV(PL6);
PORTL |= _BV(PL7); //pull UP on bit 6 & 7
}

inline uint8_t getATO1()
{ return PINL&_BV(PL6); }

inline uint8_t getATO2()
{ return PINL&_BV(PL7); }
void checkATO()
{
if (conf.outletRec[ATP0].mode == _auto)
{
if (getATO1()==0 && isOutletOn(Return))

{
_outletOn(ATP0);
return;
}
_outletOff(ATP0);
}
}


Moomin1967 is offline   Reply With Quote
Unread 09/20/2014, 04:57 PM   #1253
d0ughb0y
Registered Member
 
d0ughb0y's Avatar
 
Join Date: Mar 2008
Location: sf bay area
Posts: 5,165
Quote:
Originally Posted by SorsCode View Post
d0ughb0y - how hard would it be to convert this to a Due? Just to get the extra memory? I know it only runs on 3.3v, but that shouldn't be a big deal. Thoughts? Just want your opinion before buying one and trying.
I am not familiar with ARM processor architecture, but it will be a major change for sure.

maybe one day when I have time, I'll read the ARM processor datasheet.



Last edited by d0ughb0y; 09/20/2014 at 05:06 PM.
d0ughb0y is offline   Reply With Quote
Unread 09/20/2014, 04:59 PM   #1254
d0ughb0y
Registered Member
 
d0ughb0y's Avatar
 
Join Date: Mar 2008
Location: sf bay area
Posts: 5,165
Quote:
Originally Posted by Moomin1967 View Post
Ok, have moved to port L 6&7 and it works.

Might try some diagnostics on A11 and 12.

Thanks

void initATO()
{
//ATO1 PortK bit3 PCINT19 analogue pin 43
//ATO2 PortK bit4 PCINT20 analogue pin 42
DDRL &= ~ _BV(PL6);
DDRL &= ~ _BV(PL7); //Data Direction Register Bit 6 input | Bit 7 input
PORTL |= _BV(PL6);
PORTL |= _BV(PL7); //pull UP on bit 6 & 7
}

inline uint8_t getATO1()
{ return PINL&_BV(PL6); }

inline uint8_t getATO2()
{ return PINL&_BV(PL7); }
void checkATO()
{
if (conf.outletRec[ATP0].mode == _auto)
{
if (getATO1()==0 && isOutletOn(Return))

{
_outletOn(ATP0);
return;
}
_outletOff(ATP0);
}
}

great!


d0ughb0y is offline   Reply With Quote
Unread 09/20/2014, 05:12 PM   #1255
d0ughb0y
Registered Member
 
d0ughb0y's Avatar
 
Join Date: Mar 2008
Location: sf bay area
Posts: 5,165
I'm done with webpage code for pwm fan. I just need to open up my chauvet case and do the wiring and burn the bootloader. I'll probably do the bootloader tonight, then do the pwm fan wiring tomorrow.


d0ughb0y is offline   Reply With Quote
Unread 09/20/2014, 05:40 PM   #1256
Moomin1967
Registered Member
 
Join Date: Aug 2014
Location: West Sussex, UK
Posts: 128
Quote:
Originally Posted by d0ughb0y View Post
I'm done with webpage code for pwm fan. I just need to open up my chauvet case and do the wiring and burn the bootloader. I'll probably do the bootloader tonight, then do the pwm fan wiring tomorrow.
I'm gutted didnt understand I need an IVR Mk2 for the Mega, so no hav one on order.

Pity the tiny doesnt work


Moomin1967 is offline   Reply With Quote
Unread 09/20/2014, 05:52 PM   #1257
d0ughb0y
Registered Member
 
d0ughb0y's Avatar
 
Join Date: Mar 2008
Location: sf bay area
Posts: 5,165
As far as I can tell, the tiny works (that's the usbasp from ebay link I gave recently, I use one exactly like that).
The verify fails, but I think the bug is in the verify code, since I tested all functions of the bootloader (that's the real verify imho) and they all work.

you can also use another arduino to burn the bootloader. You need to burn a sketch to the arduino you are going to use as programmer, then put a capacitor on the reset line so it does not reset, then connect the ICSP pins to the mega. I've tried this a long time ago and it works. So if you just want to burn the bootloader once, and have an extra arduino laying around, you can use the arduino as ISP method.


d0ughb0y is offline   Reply With Quote
Unread 09/20/2014, 06:02 PM   #1258
Moomin1967
Registered Member
 
Join Date: Aug 2014
Location: West Sussex, UK
Posts: 128
Quote:
Originally Posted by d0ughb0y View Post
As far as I can tell, the tiny works (that's the usbasp from ebay link I gave recently, I use one exactly like that).
The verify fails, but I think the bug is in the verify code, since I tested all functions of the bootloader (that's the real verify imho) and they all work.

you can also use another arduino to burn the bootloader. You need to burn a sketch to the arduino you are going to use as programmer, then put a capacitor on the reset line so it does not reset, then connect the ICSP pins to the mega. I've tried this a long time ago and it works. So if you just want to burn the bootloader once, and have an extra arduino laying around, you can use the arduino as ISP method.
Well it is the usbasp, hmmm, I'll have another read up.


Moomin1967 is offline   Reply With Quote
Unread 09/20/2014, 06:06 PM   #1259
Moomin1967
Registered Member
 
Join Date: Aug 2014
Location: West Sussex, UK
Posts: 128
Quote:
Originally Posted by d0ughb0y View Post
I'm done with webpage code for pwm fan. I just need to open up my chauvet case and do the wiring and burn the bootloader. I'll probably do the bootloader tonight, then do the pwm fan wiring tomorrow.
Let us know how you get on.


Moomin1967 is offline   Reply With Quote
Unread 09/22/2014, 09:14 PM   #1260
d0ughb0y
Registered Member
 
d0ughb0y's Avatar
 
Join Date: Mar 2008
Location: sf bay area
Posts: 5,165
I had to do other things last weekend, so did not get to do much on the controller.
I did burn the bootloader to the mega in my chauvet. The serial upload works, but the ethernet upload does not. I will have to swap the ethernet shield out with the one I tested with. The one I tested with is the original arduino ethernet shield. The one in the controller is a sainsmart brand. Once I swap it out, I can debug it better to figure out why it did not work. The watchdog timer reboot works, so I added an 8 second watchdog timer in my main loop. I don't know if this is going to be feasible since there are times when the webserver can take longer than 8 seconds to complete a transfer. I think there is a way to programmatically extend it, so I'll extend it to 1 minute once I figure out how to do it.

I cannot use the DB9 as I originally planned for the pwm fan connections, since the mega and ethernet shield is right up that side where the DB9 connector used to be. I am now thinking if I should just control 1 fan and use the PWM stereo jack right now that is unused (I have to change it to trrs jack). Or to just completely remove the uln2803 since I will never use outlets 9-16 anymore and use that DB9 connector on the other end for the lines for the 3 pwm fans. I do have a 12v 2a power supply in the chauvet so it should be able to handle 3 fans.

I will build another setup with my spare mega and ethernet shield with circuit on breadboard and use this as my test setup.


d0ughb0y is offline   Reply With Quote
Unread 09/23/2014, 12:03 PM   #1261
d0ughb0y
Registered Member
 
d0ughb0y's Avatar
 
Join Date: Mar 2008
Location: sf bay area
Posts: 5,165
I am receiving the 5 temp sensors today. The cond kit comes tomorrow (sparkfun economy shipping is really slow)

I will start wiring my test setup today so I can test the 5 temp sensors and 3 fans with the full program. And also for testing the cond stamp when it arrives tomorrow.

As to the netload bootloader, it is not an ethernet shield problem, as I am unable to upload even using the standard ethernet shield. It almost seems like something is blocking udp traffic in my local network. I am using my work laptop, and I know recently they really tightened the security policy, to the point that I cannot print to my networked inkjet printer at home. So I would not be surprised if it disabled udp traffic. I'll have to try another machine. At least the USB upload still works. I noticed when usb upload is occurring, the LED stops blinking. I'm going to make it blink, maybe at a different rate. I like to know that the controller is not hung during program upload.

regarding tftp, I can see the simplicity in the protocol, and can be implemented in very small compact code, but it is still subject to limitation of udp. I'll check the feasibility of usng http put upload. The nice thing with http is, it can be configured with http proxy to pass through firewall.



Last edited by d0ughb0y; 09/23/2014 at 12:13 PM.
d0ughb0y is offline   Reply With Quote
Unread 09/23/2014, 12:09 PM   #1262
Moomin1967
Registered Member
 
Join Date: Aug 2014
Location: West Sussex, UK
Posts: 128
I'm going to have a play with the bootloader this evening.

M


Moomin1967 is offline   Reply With Quote
Unread 09/23/2014, 02:39 PM   #1263
Moomin1967
Registered Member
 
Join Date: Aug 2014
Location: West Sussex, UK
Posts: 128
Ok, got my head round how the bootloader needs installing and configuring on a mac, and that an AVR mk II is requried, I'm getting programmer time out errors with the USBasp.

As you rightly pointed out could use another Arduino as bootloader but will wait for avr to arrive.

Glad I did this on a spare Mega.


Moomin1967 is offline   Reply With Quote
Unread 09/24/2014, 01:25 PM   #1264
Moomin1967
Registered Member
 
Join Date: Aug 2014
Location: West Sussex, UK
Posts: 128
D0ughb0y,

Would you mind sharing which version of the IDE your using?

Thanks

M


Moomin1967 is offline   Reply With Quote
Unread 09/24/2014, 02:23 PM   #1265
Moomin1967
Registered Member
 
Join Date: Aug 2014
Location: West Sussex, UK
Posts: 128
Did your Cond kit arrive?


Moomin1967 is offline   Reply With Quote
Unread 09/24/2014, 03:06 PM   #1266
d0ughb0y
Registered Member
 
d0ughb0y's Avatar
 
Join Date: Mar 2008
Location: sf bay area
Posts: 5,165
I'm using 1.0.5, though I tested this before in 1.5.5 and it works fine.
yes the cond kit arrived.


d0ughb0y is offline   Reply With Quote
Unread 09/25/2014, 01:31 AM   #1267
d0ughb0y
Registered Member
 
d0ughb0y's Avatar
 
Join Date: Mar 2008
Location: sf bay area
Posts: 5,165
I just tried on 1.0.6 and it also works fine.

I spent the past few days trying to get the netload ethernet upload to work without success. I really cannot figure out why all of a sudden it stopped working. The shield is not sending out any data. I know the shield is working since udp test sketch works and I know the bootloader is burned properly.

maybe someone else can try to see if it will work on their setup. I'll probably put this project on hold so I can resume working on the controller.


d0ughb0y is offline   Reply With Quote
Unread 09/25/2014, 02:45 AM   #1268
Moomin1967
Registered Member
 
Join Date: Aug 2014
Location: West Sussex, UK
Posts: 128
Quote:
Originally Posted by d0ughb0y View Post
I just tried on 1.0.6 and it also works fine.

I spent the past few days trying to get the netload ethernet upload to work without success. I really cannot figure out why all of a sudden it stopped working. The shield is not sending out any data. I know the shield is working since udp test sketch works and I know the bootloader is burned properly.

maybe someone else can try to see if it will work on their setup. I'll probably put this project on hold so I can resume working on the controller.
Ok, well I got the botloader uploaded to both my mega's seems the issue was impatience, and nothing more.

I can upload serial, but same as you NETLOAD is not working. I disabled firewall on mac, and have no local port blocking on my router, so UDP blocking cant be an issue.

I have tried using TFTP rather than Curl. I'll try it again later with verbose enabled and see if acks are being sent received.

I checked the stored data with the NETEEProm Write and read utility, the only odity is I cant change the tftp port away from 46969

M



Last edited by Moomin1967; 09/25/2014 at 02:51 AM.
Moomin1967 is offline   Reply With Quote
Unread 09/25/2014, 10:00 AM   #1269
d0ughb0y
Registered Member
 
d0ughb0y's Avatar
 
Join Date: Mar 2008
Location: sf bay area
Posts: 5,165
I think I mentioned in a previous post the mega upload of bootloader takes 3 minutes. And if verify is enabled, that is another 3 minutes, hence I turned off verify.

you need to use netloadinit.ino to set the network settings.
once you set that correctly, then try again.
you may need to change the if condition to force an eeprom update.

I will put this on hold while I continue working on the controller. Sometimes just I need to take a break when nothing is working. I know I checked and compared the code with the w5100 datasheet and it is correct. it is actually quite straightforward. I loaded ariadne bootloader which I know works, just slow, and even that does not work anymore. So I don't think it is the software, and I can't say it is the hardware since udp test program works. The only difference with the test program is it uses w5100 interrupts, while the bootloader code polls the registers. I might just implement http put to upload the file if I can't get tftp to work again. It's probably something simple I am overlooking.


d0ughb0y is offline   Reply With Quote
Unread 09/26/2014, 03:06 AM   #1270
teslo
Registered Member
 
Join Date: Oct 2002
Location: Ljubljana
Posts: 91
Quote:
Originally Posted by d0ughb0y View Post
I will put this on hold while I continue working on the controller. Sometimes just I need to take a break when nothing is working.


It's probably something simple I am overlooking.
Yes sometimes we work so hardly on one problem so we don't see where we create an error.
Still after few days we again check same code and we ask ourself:
"How as I didn't check this and find this error..."

So better to take few days off this problem try to solve other things and then return back.


teslo is offline   Reply With Quote
Unread 09/26/2014, 11:41 AM   #1271
Moomin1967
Registered Member
 
Join Date: Aug 2014
Location: West Sussex, UK
Posts: 128
Could fans be driven from the PCA9685 board and a driver cct?

M


Moomin1967 is offline   Reply With Quote
Unread 09/26/2014, 04:46 PM   #1272
d0ughb0y
Registered Member
 
d0ughb0y's Avatar
 
Join Date: Mar 2008
Location: sf bay area
Posts: 5,165
Quote:
Originally Posted by Moomin1967 View Post
Could fans be driven from the PCA9685 board and a driver cct?

M
not quite.

the pca9685 can do 1khz pwm, the pwm computer fan requires 25khz pwm.

so the answer is you can if you can tolerate a sound coming out of the fan.

watch this video
https://www.youtube.com/watch?v=IUKnb1bAsqA

around time 2:48

I'm surprised he produced and sells a product he knows operates out of spec.

I've tried running the pwm below 25khz and can hear the sound.


d0ughb0y is offline   Reply With Quote
Unread 09/27/2014, 05:30 AM   #1273
teslo
Registered Member
 
Join Date: Oct 2002
Location: Ljubljana
Posts: 91
Of course but you hear sound out of the motor coil ? Like in laudspeaker ..

But if you put small capacitor and resistor between pwmoutput from pca and driver then to driver will come analog voltage and in this case motor should't produce any sound.

Or I am wrong?


teslo is offline   Reply With Quote
Unread 09/27/2014, 01:35 PM   #1274
wgraham
Registered Member
 
Join Date: Aug 2004
Posts: 292
Got my conductivity probe and sensor, hook it up and no problems with it. Also I unhook the 5 volt power supply from my sensors and temp probe and so far the reading are not going to zero and to the temp. I measure the voltage from the supply and it was 5.12volt don't see why that would affect my readings


wgraham is offline   Reply With Quote
Unread 09/28/2014, 05:28 AM   #1275
formula409
Registered Member
 
Join Date: Dec 2013
Posts: 37
Ive been thinking about how to do an all in one system.
Basically I was reading about the KM ECO Variable series of jebao pumps.
You can see them here http://www.fish-street.com/jebao_km_eco_variable_pump

This is what I'm going in "The New technology of Jebao now release a Adaptive variable -frequency pump. Same as Jebao wp-40 ECO-Tech!"

There isn't much room in the tank I'm planning so instead of having a wavemaker Im thinking I could kill two birds with one stone and just PWM the return, one design I was considering has two return pumps in the far left and far right rear sump, so I could even have 2 eco-tech return pumps for some crazy flow!

What about the DC2000 etc pumps? do you think they would be PWM controllable? specifically to very alot over time? Because the KM mite be extinct :/


formula409 is offline   Reply With Quote
Reply

Thread Tools

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



All times are GMT -6. The time now is 03:50 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Powered by Searchlight © 2024 Axivo Inc.
Use of this web site is subject to the terms and conditions described in the user agreement.
Reef CentralTM Reef Central, LLC. Copyright ©1999-2022
User Alert System provided by Advanced User Tagging v3.3.0 (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.