Monday, 10 March 2014

PWM Tools and Applications.

The more I use PWM the more I like to understand it and monitor its duty cycle and timing etc. For this reason (and although 3 of my multimeters are capable of measuring PWM duty cycles and frequemcy) I decided to build my own PWM monitoring meter.

DSCN0120

Yes I know the case is all scratched up and stuff but its practical and small. I still have a few finishing touches to add to the meter like a power socket and input socket but the unit is 100 percent working.

The first prototype was built on solderless breadboard and worked wonderfully. This unit is however built using a barebones Arduino Pro Mini 5V and LCD and a few other bits and bobs.

DSCN0121

I made up the veroboard on the back of the LCD to control LED current through the backlight LED’s as well as contrast and also to allow a single DC input to the display. The Arduino Pro Mini is mounted to the bottom of the case and the mode select button and power switch below the LCD.

DSCN0123

The Unit turned on displays the current frequency and duty cycle. With it floating it seems to pick up the 50hz ac signal. :-P

By pressing the mode button you can cycle between modes.

DSCN0125

DSCN0126

DSCN0127

Now there are still a few thing I need to do to complete this meter but as with anything it is a work in progress. A practical one at that. :-)

AD9850 Signal Generator

Hi all.

Technically this is not a new article but an extension on the previous one I did on this 9850 chip. I wanted to get this device to work as a standalone signal generator and the results where pretty outstanding.

DSCN0114

This is the DDS9850 module connected to my freeduino which has a LCD shield mounted for control of the frequency etc.

This fella will run from 0.5 to around 40mhz without a hiccup.

DSCN0115

DSCN0116

DSCN0117

DSCN0119

Although there seems to be a slight frequency shift this can be corrected in the code.

The code for this fella is open and available all over the internet. Keep experimenting.

Friday, 7 March 2014

Filtering PWM to create a DC voltage.

Well I can tell you that PWM control of LED’s without using a dedicated LED driver is very possible.

During my experimenting I have had all the issues and when it comes to using pwm to control a mosfet (although it does work without any additional circuitry if you use a logic level MOSFET) it can also work when using standard power mosfets. Its called low pass filtering.

I successfully used a 10k resistor and 0.1uF Cap between my PWM signal and the MOSFET and this seemed to solve all issues as it basically convert the digital PWM  signal into an analogue voltage. Verified on Scope. :-)

CRLowPass1

This filter basically acts a simple digital to analogue convertor.

Using the above basic circuit you can output between 0 and 5 volts on a MCU such as the arduino using the PWM output (Between 0 and 255) 255 being theoretical 5V.

 

Hope this helps those playing with Pulse Width Modulation.

Next I will write up a blog post explaining Pulse Width Modulation and what it can do for you.

Tuesday, 4 March 2014

R&D on LED Drivers controlled via PWM.

Right so as some of you may know I have been developing some high end PWM controlled LED drivers for use in our new Evione Lightsabre ver 1.0.

I have purchased readily made LDD drivers as well as played with various Mosfet and Transistor type drive circuits but today I am going basics.

I am going to take at atmega328 AVR, program it with the Control program for you my light (and yes it is arduino based).

Then I am going to use the pwm output to drive a mosfet which in turn will switch and vary the power to the led’s. Hold thumbs.

So here goes the pics. I really need to set up a video cam….

IMAG0072

In the above image what I have done is pretty much connect up the bare ATMEGA328-PU to my board. Ignore the Arduino and scope. They are just there for pre beta work but I always take my Arduino projects off Arduino boards and build my own. Saves one loads of money.

Below is the schematic diagram of what I have done here.

main

If you have a look I basically place the N Type Mosfet into the power circuit of the LED and control it using the PWM output from the MicroController. This is a very crude way of doing things but this is for R&D Purposes. The final product is always more finished.

IMAG0075  IMAG0074

I am running the main DC power out at 20 volts as I am using 2 x 12 volt 900mA 10Watt LED’s as can be seen above. I am running them in series so that the current running is the same through both devices.

IMAG0076

Upon powering up the ATMEGA you will see that the LED’s will turn on as the PWM is opening up the mosfet and allowing the leds to get enough power to turn on.

IMAG0078

With the LED’s just turned on you will see we are running at 20Volts and 20mA. At present the PWM input into the mosfet is at its lowest.

IMAG0080

Now I have programmed the ATMEGA to allow me to vary the PWM output in 25 steps by holding or pressing either an up or down button. In the Protoboard I just short out where I need to.

IMAG0081

I up it to about 30 percent of its max. Please note that I will not push it to the max as the LED’s are not heatsinked and therefore could suffer some serious heat damage at full fwd current.

Its hard to see how bright the LED’s really are as the camera adjusts for the extreme brightness. I will setup a camera on manual exposure to capture this as a later stage.

IMAG0082 IMAG0083

As you can see the current is now sitting at 460mA @20V and the PWM signal is at about 30 percent. The LED’s really are stupid bright already.

IMAG0084

Although we did not keep the LED’s connected I did push the MCU to full PWM output which can be seen on the protoscope above.

My next step in this project is to work out the current limiting and build the current limiting circuitry into this to limit the max current to 900mA. Should be interesting.

Until next time happy inventing.

Thursday, 27 February 2014

Evione Lighting LAB upgrade.

Well what can I say.

After many loaners and loads of help from a friend I have finally completed my Lab using all my own gear and some of my gear has been upgraded.

I have upgraded my soldering station to a full digital temp controlled unit and a SMD reworking station which allows me to work with smd and modern lighting equipment including pocket wizzards and the like.

I also have acquired an XProtolab oscilloscope for those odd little experiments or times that I need one to analyze a circuit.

I have assembled a 6 Channel Logic Analyzer which is PC based and am in the process of assembling a PC based O.Scope as well.

My bench PSU’s have grown to 4 after building 3 very specific units for the work I do.

I have also acquired some decent quality Digital Multimeters which is awesome as the one I was using was a sub R200-00 cheapie. :-P Hey it worked well.

Evione is ready to undertake any repairs that you may need to your photographic lighting. 

Evione Light Sabre V1.0

Wow. After much experimenting and trying various forms of controlling output of high powered LED’s I have finally completed the design and am in the process of building the final unit.

I will be demoing and making use of this prototype over the next few weeks for my photographic work to test the durability and battery of these lights. Thereafter they will be produced for sale market.

 

Specs as follows:

  • 10Watt High Powered LED.
  • 4400mah 11.1V Lithium Polymer Battery. (Gives a run time at full power of 4.5 hours)
  • Super High CRI rating of 98% +
  • Daylight balanced at 5600K
  • Flicker Free for use on video and photography
  • Variable Digital Power Control in 25 steps (Allows greater control of lighting)
  • Super Diffusion material and Bouwens Mount adaptor so you can mount all your accesories.

Photographs of this light will follows soon as well as sample images taken with this light.

Tuesday, 25 February 2014

AD9850 DDS Chip Experiment

Today I decided to do some experimenting with the Chinese AD9850 Module and pulled out the trusty Freeduino which is permanently on my breadboard as a prototyping setup.

IMG_20140225_115141 

This is the module on the top and Freeduino on the bottom. Wiring up this little board is really simple. I am going to use 4 pin control of the board so therefore we only need four jumpers between our Freeduino/Arduino and the module.

  • Arduino Pin 8 – Module CLK (Clock) Pin
  • Arduino Pin 9 – Module FQ (Frequency Update) Pin
  • Arduino Pin 10 – Module DATA (Serial Data Load) Pin
  • Arduino Pin 11 – Module RST (Reset) Pin

 

Thats it from the wiring up perspective. Now instead of re-inventing the wheel I have found several sources of good code already made for running these boards quiet well and considering this is not a final production circuit there is no harm in showing what is already out there.

 

The Sketch:

/*
* A simple single freq AD9850 Arduino test script
* Original AD9851 DDS sketch by Andrew Smallbone at www.rocketnumbernine.com
* Modified for testing the inexpensive AD9850 ebay DDS modules
* Pictures and pinouts at nr8o.dhlpilotcentral.com
* 9850 datasheet at
http://www.analog.com/static/imported-files/data_sheets/AD9850.pdf
* Use freely
*/
#define W_CLK 8       // Pin 8 - connect to AD9850 module word load clock pin (CLK)
#define FQ_UD 9       // Pin 9 - connect to freq update pin (FQ)
#define DATA 10       // Pin 10 - connect to serial data load pin (DATA)
#define RESET 11      // Pin 11 - connect to reset pin (RST).
#define pulseHigh(pin) {digitalWrite(pin, HIGH); digitalWrite(pin, LOW); }
// transfers a byte, a bit at a time, LSB first to the 9850 via serial DATA line
void tfr_byte(byte data)
{
  for (int i=0; i<8; i++, data>>=1) {
    digitalWrite(DATA, data & 0x01);
    pulseHigh(W_CLK);   //after each bit sent, CLK is pulsed high
  }
}
// frequency calc from datasheet page 8 = <sys clock> * <frequency tuning word>/2^32
void sendFrequency(double frequency) {
  int32_t freq = frequency * 4294967295/125000000;  // note 125 MHz clock on 9850
  for (int b=0; b<4; b++, freq>>=8) {
    tfr_byte(freq & 0xFF);
  }
  tfr_byte(0x000);   // Final control byte, all 0 for 9850 chip
  pulseHigh(FQ_UD);  // Done!  Should see output
}
void setup() {
// configure arduino data pins for output
  pinMode(FQ_UD, OUTPUT);
  pinMode(W_CLK, OUTPUT);
  pinMode(DATA, OUTPUT);
  pinMode(RESET, OUTPUT);
  pulseHigh(RESET);
  pulseHigh(W_CLK);
  pulseHigh(FQ_UD);  // this pulse enables serial mode - Datasheet page 12 figure 10
}
void loop() {
  sendFrequency(55.e6);  // freq
  while(1);
}

 

As you can see in the above sketch that the frequency can be controlled with the command sendFrequency(55.e6); with 55 being the frequency that you are wanting.

The above code places the device on 55Mhz and powers it on.

My spectrum annylyzer screenshots below:

before

As you can see above there  is no signals on 55Mhz.

after

After powering up the Freeduino and module you can see the spike on 55Mhz clearly which means this little fella is outputting a nice 55Mhz. Please note that there is no antenna or power amp on the output of the circuit so this is just the modules output showing up.

zoomed

The frequency is also almost spot on. Very impressed with this little board. More to follow when I start actually replacing Oscillator circuits in old two way radios :-P Some fun could be had.