Thursday, September 15, 2016

low cost isolated current sensing IC - ACS710

For low cost isolated current sensing, Allegro hall effect current sensing IC has come into picture. Allegro has produces a series of low cost current sensing IC.

ACS710 has been in market for quite some time and it is suitable for renewable energy application as in described in “AN296110-Current Sensing for Renewable Energy”.

ACS710 has 1 mΩ sensing resistance for low power loss, user selectable overcurrent fault level, provided in surface mount SOIC16 package, operating temperature is from -40ºC to 125ºC.

Best part is no isolated voltage supply is needed. (Save the cost)

Maybe the only drawback is the low voltage isolation.
The voltage isolation characteristics that had been conducted by Allegro.
Test Characteristic
Rating (VAC)
Dielectric Strength Test Voltage (60s)
3000
Working Voltage for Basic Isolation
277

Neverthelss, for most applications, the continuous working voltage of 277VAC is more than enough.

ACS713 is provided in several sensing range such as follow:
Sensing Range (Ampere)
Sensitivity at Vcc=5V (mV/A)
±6
151
±10
85
±12.5
56
±25
28

Supply voltage – 3V to 5.5V.
Signal bandwidth – 120kHz

From the above picture, you can see that for the full operation of 120kHz, filter capacitor of 0.1nF or less is needed. 

Of course, you can increase the filter capacitance, the higher the filter capacitance, the lower the bandwidth. Good point is the RMS noise also significant reduced.

ACS713 has the over-current detection mechanism and the settings/calculation as follow
For the setting of overcurrent detection,
Version 6BB and 10BB, the formula is as follow:
VOC = 1.17 × Sens × | IOC |

Example,
For ACS710KLATR-6BB-T, if required overcurrent fault switchpoint is 10 A, and VCC = 5 V, then the required VOC can be calculated as follows:
VOC = 1.17 × Sens × IOC = 1.17 × 151 × 10 = 1767 (mV)


Version 12CB and 25CB, the formula is as follow:
VOC = Sens × | IOC |

Example,
For ACS710KLATR-25CB-T, if required overcurrent fault switchpoint is 50 A, and VCC = 5 V, then the required VOC can be calculated as follows:
VOC = Sens × IOC = 28 × 50 = 1400 (mV)


One more thing to consider when using this IC is the temperate effect toward the sensing accuracy.
The accuracy of the ACS710 against the temperature variation is as follow:
Although at constant 25 Celsius, the output voltage also has some variation.
However, for such low price, this temperature variation performance is acceptable. 

The brother ACS712 had been very popular among hobbyists, 
this not so new newbies (ACS713) can be worth trying, I am designing a breakout module for it.
Not sure when going to finish it. If I did finish it, I will test it even further.

Tuesday, September 13, 2016

Blinking LED in pattern

Bob Blick arguably the first person who come out with the propeller clock. It is a 7 led that spin on a rotor and giving the illusion effect of numbers (clock time) in the air.
Image result for bob blick propeller clock
Original link: seem to be expired
Another link: Still active

It is around 14 years ago.
Now the internet is flooded with propeller led imaging projects. Even the market is selling the propeller led image device at relatively cheap price.

Well, cheap but it is not satisfying until you diy it yourself.

Basic ingredients:
leds - 8
mcu - use the development kit (pic18f4553)
power supply - source from pc usb port
jumper wire - 9
propeller - use your hand, moving up and down

Problems encountered:
I am using the ultra bright led, plus cant find suitable resistor. So no limiting current resistor is used and the ultra bright is really annoying. Pain in the eye when you have direct contact with it.
In the end, i use the phone to do video recording and monitor the output afterwards.

Hardware connection:

my development board has output pin for lcd 16x2, so direct connect from lcd 16x2 pins to breadboard is the simplest way.

Now, start to design my character:
Each character is at the 8x5 pattern configuration. Below is my designation 'A', 'B', 'C'.

Character ‘A’

0b00000,
0b01110,
0b10001,
0b10001,
0b10001,
0b11111,
0b10001,
0b10001
Character ‘B’

0b00000,
0b11110,
0b10001,
0b10001,
0b11110,
0b10001,
0b10001,
0b11110

Character ‘C’

0b00000,
0b01110,
0b10001,
0b10000,
0b10000,
0b10000,
0b10001,
0b01110

And then, convert it to hexadecimal (just for better view and shorter code)
A - 0x3E, 0x48, 0x48, 0x48, 0x3E,
B - 0x36, 0x49, 0x49, 0x49, 0x7F,
C - 0x22, 0x41, 0x41, 0x41, 0x3E,

For each character, I will add some blank spaces, just to distinguish each of the character,
And I will get something like this:
 rom char string[30] = {  
      0x3E, 0x48, 0x48, 0x48, 0x3E,   
      0x00, 0x00, 0x00, 0x00, 0x00,   
      0x36, 0x49, 0x49, 0x49, 0x7F,   
      0x00, 0x00, 0x00, 0x00, 0x00,   
      0x22, 0x41, 0x41, 0x41, 0x3E,  
      0x00, 0x00, 0x00, 0x00, 0x00,  
 }  

Next is the blinking pattern is single direction or bi direction,
single direction - blink according to the data in array from 0 to 30, then start from 0 again.
bi direction -  blink according to the data in array from 0 to 30, then count back, from 30 to 0.
 #ifdef UNIDIRECTION  
           i++;  
           if(i > 30) i = 0;  
 #endif  
 #ifdef BIDIRECTION  
           if(direction == 0){  
                i++;  
                if(i > 30) direction = 1;  
           }  
           else{  
                i--;  
                if(i < 0) direction = 0;  
           }  
 #endif  

I didnt know which solution is the best, so up to the user to decide.

3rd is the delay timing, using the try and error method, in the end i use 2.2 mili second.
Maybe not so accurate because I am using the delay loop instead of interrupt.

4th, shaking your hand "up and down" or "left and right", preferably is "left and right". However, moving your hand "up and down" can be more consistent than "left and right".

5th, face the mirror, move the hand at different timing until you can get the correct timing. This will be tiring.

Output:

Well, the message just came out wrong. so wrong....
but i dont have other pic. so.....dont misunderstood.

Conclusion:
It is harder than it look to get the correct moving timing using your hand.
And I actually took video, then browse the video in laptop, and pause every moment until i get the visible and clear character. Yeah, I cheat.
I will let it be like this for current stage. I will improve it at next blog (if i have time).

Project file and source code: LINK