evilc66 Posted March 6, 2009 Share Posted March 6, 2009 Break a tap/drill? (third row from left, third down) Quote Link to comment
sweevo Posted March 6, 2009 Author Share Posted March 6, 2009 (edited) Break a tap/drill? (third row from left, third down) How did you guess? To be honest my Dad did the majority of the tapping but I think you've guessed already one of them which I did ! Just tested all the chains and they're all good. I was even brave enough to try three at once. Those Royal Blues are something else ! Edited March 6, 2009 by sweevo Quote Link to comment
sweevo Posted March 10, 2009 Author Share Posted March 10, 2009 (edited) Ran into a problems using the arduino and the buckpucks this weekend. Took me hours to figure out what was going on too! Biggest problem is i'm powering the Arduino off the +5v REF pin of the buckpuck so the the buckpucks and the arduino both power on at the same time. Unfortunately it takes the Arduino a second or two to boot which means it's PWM pins connected to the buckpuck CTL pins are low initially which in turn means all 30 LED's burst into full beam on powerup! Once the Arduino boots and sends 5V (255) down the PWM pins they do all cut off but the whole point of this was to fade the light in, not simulate a nuclear air burst for a split second ! Because i'll be running this off a mains timer to begin with this will mean this would happen on power up each day. Might also mean I have a 5.1A spike on my 5A rated PSU which may cause it to trip out depending on the tolerance. I've tried a few things, none of which have worked so far. There's always the option of powering the Arduino seprately (so it's on well before the buckpucks) but i'd rather not have something else to plug in to the mains if I can help it. There's already enough cables and plugs. Apart from that, programming the Arduino to control the LED's themselves has been really easy. Edited March 10, 2009 by sweevo Quote Link to comment
evilc66 Posted March 10, 2009 Share Posted March 10, 2009 BAD BAD BAD!!!!! The 5v reference was not designed to handle that much current. Keep going and you will have a dead dimming circuit on the Buckpuck. Please, run it on a seperate power source. If you are still prototyping, just run it on the USB power. Quote Link to comment
sweevo Posted March 10, 2009 Author Share Posted March 10, 2009 BAD BAD BAD!!!!! The 5v reference was not designed to handle that much current. Keep going and you will have a dead dimming circuit on the Buckpuck. Please, run it on a seperate power source. If you are still prototyping, just run it on the USB power. Really? The buckpuck datasheet shows the buckpuck powering a PIC using the 5V REF pin which is why i've been doing it. Quote Link to comment
evilc66 Posted March 10, 2009 Share Posted March 10, 2009 They do, but it still wouldn't be my first recommendation. Luxdrive doesn't list the max current capabilities of that 5v reference, so you don't know if you are going to damage it. Anyways, running on a seperate power source will help elliminate the issues you are having at startup. You can switch the power supply to the Buckpucks through a few FETs so that the drivers turn on after the Arduino boots. Quote Link to comment
sweevo Posted March 11, 2009 Author Share Posted March 11, 2009 They do, but it still wouldn't be my first recommendation. Luxdrive doesn't list the max current capabilities of that 5v reference, so you don't know if you are going to damage it. Anyways, running on a seperate power source will help elliminate the issues you are having at startup. You can switch the power supply to the Buckpucks through a few FETs so that the drivers turn on after the Arduino boots. Yeah, I was thinking about using transistors as i've already got something along similar lines to control my fans (optcoupler and transistor) but i'd never given FETs a thought. Done a few hours research tonight and have ordered a few RFP2N10L's to try out on the breadboard. Everyday an education with this isn't it? As for the 5V power for the Arduino, when the time comes to power it up and use it away from my laptop i'll probably pick up a second hand phone charger as there's quite a few 5V ones available. Quote Link to comment
Vancouver Reefer Posted March 12, 2009 Share Posted March 12, 2009 (edited) I love the Acrylic mount for the heatsink!!! Id be tempted to get some blue 3/5mm leds mounted into the acrylic to make it glow!!! VR Edited March 12, 2009 by Vancouver Reefer Quote Link to comment
evilc66 Posted March 12, 2009 Share Posted March 12, 2009 That would look awesome. My mousepad is edge lit like that. Quote Link to comment
sweevo Posted March 12, 2009 Author Share Posted March 12, 2009 (edited) I love the Acrylic mount for the heatsink!!! Id be tempted to get some blue 3/5mm leds mounted into the acrylic to make it glow!!! VR Thanks VR, I spent hours on the net looking for something that I could customise for the mount but drew a blank. In the end I stumbled across a plastics company on Ebay that could make custom made acrylic tables while ordering some white sheet for DIY around the house ! 3mm Blues eh? Maybe that's the next stage for us all? Pimp Our LED's ! Edited March 12, 2009 by sweevo Quote Link to comment
sweevo Posted March 16, 2009 Author Share Posted March 16, 2009 (edited) Need a little help on the electronics front with the FET. I wired one up for a test last night and I had a few issues. First up I had the fet wired as follows: Source : GND Gate : 12K Pulldown resistor to GND (to turn off the FET on powerup) Drain : -ve power terminal on buckpuk Buckpuck +ve to 22V terminal LED's wire up to LED +ve and -ve terminals When power was applied the LED's stayed off. If I sent a 5V/HIGH down a digital output pin connected to the Gate the LED's would light. Good so far.... The problems started once I connected a PWM output from the Arduino (now powered by PC USB) to the CTL pin on the buckpuck. I had to put a 12K resistor in series on the connection (PWM <- 12K > CTL) to keep the LED's off regardless of the gate voltage still being 0V. If there was no resistor between the PWM pin and CTL then the LED's were dimly lit. As this resistor value got higher the dimmer the LED's got. I only have small selection (220R, 550R, 12K) so made use of what I had. Even setting the PWM pin to be a digital output pin and LOW output made no difference unless the 12k resistor was in series. So with the 12K in series I thought i'd cracked it but then......... Regardless of the PWM voltage (0-255) on the buckpuck CTL pin, once the Gate voltage was raised to 5V (using digitalWrite HIGH) by the ardunio to turn on the FET all the LED's came on what "appeared" to be full or near full brightness. So the upshot of all this is i'm lost and baffled ! I've googled a bit and haven't found any clues as to what i'm doing wrong. I guess I've maybe got the buckpuck wired up wrong to the FET but I thought I could wire it up in the same fasion as I have my fans. Is there an easy explanation to all of this evilc66 ? Edited March 16, 2009 by sweevo Quote Link to comment
evilc66 Posted March 16, 2009 Share Posted March 16, 2009 (edited) So you are basically saying that using the FET to switch the power to the puck forces the brightness to max regardless of what you set the control signal to? Or am I getting this all wrong? I'm also a little confused as to your pin assignment list for the FET. Where are you controlling it with the Arduino? I'm assuming you just mislabled the connection to the gate pin. Edited March 16, 2009 by evilc66 Quote Link to comment
sweevo Posted March 16, 2009 Author Share Posted March 16, 2009 (edited) So you are basically saying that using the FET to switch the power to the puck forces the brightness to max regardless of what you set the control signal to? Or am I getting this all wrong? I'm also a little confused as to your pin assignment list for the FET. Where are you controlling it with the Arduino? I'm assuming you just mislabled the connection to the gate pin. That's what I was seeing last night. I set pin 4 as Digital Out and connected it to the Gate. The Gate also had a 12K pull down on it to tie it to 0V until ever I set pin 4 HIGH. Once I set pin 4 HIGH the LED's would come on really bright regardless of the CTL pin PWM Voltage. My wiring is like this, might make more sense (hopefully) (+22V) ->(Buckpuck +ve)#BUCKPUCK#(Buckpuck -ve) -> (Drain FET)#FET#(Source FET) -> (GND) (Gate FET) -> (12K) -> (GND) (Ardunio Pin 4 Digital OUT) -> (Gate FET) (Arduino Pin 10 PWM) -> (12K) -> (Buckpuck CTL) The FET is a logic level FET and the reason I was wanting to control them and the connected buckpucks with the Arduino was that when the Arduino boots the PWM pins (connected to Buckpuck CTL pins) float which means the LED's come on really bright when the unit is powerd on. When the sketch runs and sets the PWM pins to 255 they do turn off but because I'm running this off an external mains timer for starters (until I sort out an internal RTC) it means there's a massive burst of light for a few seconds before the Arduino takes control on power up. So I'm using the FET's to make sure there's no power to the buckpucks UNTIL the Arduino has booted and sets PWM to 255 on all the CTL pins (all LED's off) and then sets the Gate HIGH so that when power is supplied to the buckpuks PWM is stable at 255 and the inital burst of light won't happen. Getting the impression that your suggestion to use FET's was something different to what I had in mind. Thanks for the help. Edited March 16, 2009 by sweevo Quote Link to comment
evilc66 Posted March 16, 2009 Share Posted March 16, 2009 Part number on the FET? I'm usually not a big fan of switching the ground. Biggest reason I don't use that method is the fact that there can be other ground sources that won't affect the normal operation, but will cause all kinds of headaches when you try to switch it. Not saying thats the problem, just giving design suggestions. Your not doing anything silly like tieing the LED- to the source ground are you? Quote Link to comment
sweevo Posted March 16, 2009 Author Share Posted March 16, 2009 Part number on the FET? I'm usually not a big fan of switching the ground. Biggest reason I don't use that method is the fact that there can be other ground sources that won't affect the normal operation, but will cause all kinds of headaches when you try to switch it. Not saying thats the problem, just giving design suggestions. Your not doing anything silly like tieing the LED- to the source ground are you? Nah, LED's are only connected to the LED +ve and LED -ve pins on the buckpuck. FET is RFP2N10L, N-Channel MOSFET. Quote Link to comment
evilc66 Posted March 16, 2009 Share Posted March 16, 2009 Hmm. Thats odd. I'll see if I can hook one up similar to your configuration to see if I get the same results. Quote Link to comment
sweevo Posted March 16, 2009 Author Share Posted March 16, 2009 Don't go to any trouble mate unless you really want to investigate out of curiousity. I'll have another play again tonight probably. My main concern was that I was maybe wiring up the buckpuck incorrectly and that that was why I was getting the odd results. Sounds like I got that bit right but i'll rip it all out tonight and start again to be 100% sure. If I don't get anywhere i'm probably going to power the PIC 24/7 with a 5V PSU and run some crude code that takes 24 hours to complete and will just loop forever. That way i'll only get the blast of light once when I kick the thing off. Doesn't matter short term if it gains or loses a few minutes each day either. Thanks again, always handy having a helpful chap like yourself about the place ! Quote Link to comment
sweevo Posted March 16, 2009 Author Share Posted March 16, 2009 (edited) Ripped the circuit apart and started from scratch tonight. Still getting the same issues as before but it looks like I wasn't being thorough in my original investigation! Guess that's what happens when you're messing about with electronics when you should be in bed ! Anyway, here's what I found out tonight using my multimeter and there were some very interesting results!!! It's took me two hours and it's a long read so apologies but I think the info here goes along way to showing why i've been getting odd behaviour..... With the buckpuck and FET wired as below (no resistors this time), GND pin on the Ardunio board connected to GND of DC PSU....ie, (+22V) ->(Buckpuck +ve)#BUCKPUCK#(Buckpuck -ve) -> (Drain FET)#FET#(Source FET) -> (GND) (Ardunio Pin 4 Digital OUT) -> (Gate FET) 1) Using only digital output to turn the FET on and off, Buckpuck CTL not connected to anything Output HIGH (VGate 5.02V) = LED's ON (as expected) Output LOW (VGate 0V) = LED's off (as expected). 2) Using digital output to turn FET on and PWM on CTL pin to control brightness OUTPUT HIGH (VGate 5.02V) + PWM @255 = LED's OFF (as expected) OUTPUT LOW (VGate 0V) + PWM @255 LED's dim but lit. 3) OUTPUT HIGH (VGate 5.02V) + CTL pin connected to any Arduino output pin regardless of whether configured as HIGH, LOW, PWM @0-255 and even unconfigured = LED's lit, "possibly" brighter than expected when using a configured PWM pin, eg PWM values like 254. Here's where things started to look odd... OUTPUT LOW (VGate 0V) + CTL pin connected to any Arduino output pin regardless of whether configured as HIGH, LOW, PWM @0-255 and even unconfigured = LED's dimly lit ! I tried adding a bleed resistor from the Gate to GND but it didn't make any difference and I also checked at the Ardunio end of things to confirm LOW was 0v when it wasn't connected to the Gate which it did. I did try another of the new FET's I bought and I had the exact same results as above. Then came the really interesting checks.... I decided to check the voltage across the Drain and Source and also the buckpuck power terminals with the arduino running and a connection from it to the CTL pin on the buckpuck. 1) When the FET was OFF (VGate 0V) there was 9.7V across it (VDS) and 12.3V across the buckpuck power terminals. I guess 12.3V is enough to for the buckpuck to function at some level but not enough for it to operate correctly with 5 XRE's to drive? 2) When the FET was ON (VGATE 5V) there was 0V across the FET (VDS) and 22.1V across the buckpuck power terminals. I also did the same check but this time without there being any connection to the buckpuck CTL pin. 1) When the FET was OFF (VGate 0V) there was 20.9V across it (VDS) and 0.5V across the buckpuck power terminals. 2) When the FET was ON (VGATE 5V) there was 0.4V across the FET (VDS) and 21.6V across the buckpuck power terminals. Looking at the differences in the voltages (VDS and across the buckpuck power terminals) with the CTL pin connected and then disconnected it looks "to me" like having the CTL pin wired up to the Ardunio seriously alters the dynamics of the buckpuck. Don't have any ideas why of course. Thanks for looking and hope it didn't send you to sleep ! Edited March 16, 2009 by sweevo Quote Link to comment
evilc66 Posted March 17, 2009 Share Posted March 17, 2009 Might be time to call Luxdrive and talk to one of their engineers about this one. I'm stumped until I can recreate it. Quote Link to comment
sweevo Posted March 17, 2009 Author Share Posted March 17, 2009 Yeah, probably the best idea. I've just sent them an email, hopefully it all makes sense. Quote Link to comment
sweevo Posted March 19, 2009 Author Share Posted March 19, 2009 (edited) Still not heard back from Luxdrive. I decided last night to crack on and not bother with the MOSFET's. Instead the power to the ATMega will be on 24/7 and i'll mod my code to run in a 24 hour (approx) loop for now. Done 95% of the soldering. I actually thought i'd finished and plugged the whole thing in only to find the PIC wasn't doing anything and the lights were on full blast! After a bit of digging I discovered the PIC needs an external 16Mhz osc!!!! I thought it would run off the internal, ooops. True to form the local electronics store doesn't have any in stock so I've had to order online so I've got a few days waiting before I can finish. Was getting all excited too. If anyone's curious as to how to wire the ATMega up once you've programmed it on the dev board here's a link. http://itp.nyu.edu/physcomp/Tutorials/ArduinoBreadboard Edited March 19, 2009 by sweevo Quote Link to comment
Reefer Al Posted March 19, 2009 Share Posted March 19, 2009 I'm gonna have a think about the UV's while I start work on my prototype. Nothing too flashy to begin with just 6 x Royal Blue XRE's and 6 x Cool White (WD) Q5's driven by buckpucks and controlled by a simple PIC/Microcontroller program that increases and then decreases the power to the whites and blues independently over a period of time. So here's the first few pics. My Cree XRE Cool Whites (WD Q5's), Royal Blues and optics . What simple pic/microcontroller program are you using? and what optics are those and where did you get them? How are they easier to mount? no adhesive? Quote Link to comment
sweevo Posted March 19, 2009 Author Share Posted March 19, 2009 What simple pic/microcontroller program are you using? and what optics are those and where did you get them? How are they easier to mount? no adhesive? I'm using an Arduino Dev board to program my PIC (ATMega168) and have written my own code to control the buckpucks with PWM. It's not the finished article yet as at the moment it runs a simple test loop to prove all the hardware works as desired with the PIC. I'll post my code when the unit's on my tank and it's been used in anger. It's all simple stuff though, nothing flashy. As for the Optics I got mine from Cutter in Oz. They're Cree made and are designed to fit over the XRE's. The fit is quite tight so i'm not expecting to have to glue them. Quote Link to comment
sweevo Posted March 20, 2009 Author Share Posted March 20, 2009 Got a reply from Luxdrive. they think the problem is probably a ground loop problem but would like a schematic before taking things further. I'll see if I can get one knocked up and get it off to them as it'd be interesting to know for future reference I guess. I'm all but ready to go know, just waiting on my 16Mhz oscillator. I used the Arcticsilver on the LED PCB's last night and i've fitted all the optics so just a wee bit of soldering and i'm there. Quote Link to comment
spark Posted March 20, 2009 Share Posted March 20, 2009 Hey Sweevo, Doesn't the duemilanove have an internal 16HHz crystal oscilator? I see an external one on the buckpuck drawing with two capacitors, but I thought that was for PICs like earlier versions that don' t have it internal. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.