18M2 driving many LEDs

hobgoblin

New Member
i am making a 433MHz data receiver and want it to drive groups if four leds in relation to the data it has received. Because it will be waiting for serial data most of the time i cant use multiplexing. if i use a 18M2 i can drive 3 groups of 4 leds (already using some pins)
but my question is can i run the chip from a regulated 2 or 2.5v supply and then what value resistor could i use with each led so that when they are all on the chip wont be damaged.
 

hippy

Ex-Staff (retired)
Edit: You will need to ensure that the maximum current sunk or sourced by the chip is within limits. It is not clear what that limit is from the datasheet and how the LED are connected will affect what you can use; more current can be sunk than sourced. I will try and find out what the limits are.

As to actual resistor value that depends on what the supply is and what the Vf and If rating of the LED's are: I believe it's R = ( Vsupply - Vf ) / If

If using 2 or 2.5V supply you will need to use a 433MHz receiver capable of operating at the same voltage or have a dual supply and use a current limiting resistor or a potential divider to interface to the PICAXE.
 
Last edited:

Dippy

Moderator
I can't visualise what you are trying to do exactly and you seem reluctant to provide a drawing to remove all ambigiutiy but number one thing to do is use high brightness LEDs then you can run them at much lower currents e.g. 2mA you can calculate the series resistor required using Ohm's law taking into account volatge drop of LED which is an important thing to do with low supply currents R=(vsupply - VvfLED)/I you must take care over the LED's vf which you can obtaing from the Data Sheet which you will, of course, have read.
 

westaust55

Moderator
@hobgiblin,

If you are using one of the cheaper 433 MHz TX and RX modules as sold be Jaycar here in Aust or available from Ebay then you will need to operate those from 5V irrespective of indications that they can operate from a lower voltage.

The 18M2 is we are informed generally based on the 16F1827. How identical is unclear.
But from the 16F1827 datasheet:
Total chip current capacity
Maximum current out of VSS pin .......... 95 mA
Maximum current into VDD pin ............. 70 mA
 
Last edited:

hobgoblin

New Member
i think it would be easier to run the whole thing from 5V as the 433MHz module is 5V. in that case R=(5-2)/0.015=200R as a rough guess. if i use high brightness leds then to run them at 2ma R=(5-2)/0.002=1.5K is this correct?
for 95ma that is 7ma per led r=(5-2)/0.007=428.5R closest is 430R
 
Last edited:

westaust55

Moderator
I frequently use 470 Ohm and even 510 Ohm resistors with 5 Volt supplies and "standard" LEDs and find them easily visible at distances like 10 meters indoors
 

Dippy

Moderator
Up to you which you use, we could argue the points all day.

Westy uses standards, I use hi-brightness ones.
Why? Well, I can't speak for Westy but for me it means less load, less power, less worry.
Yup, anything around 1K0 will result in a happy and bright LED.

In fact, I use the uncoloured ones made by Kingbright, they are cheapish and 'king bright.

I use uncoloured clear ones so that ambient light can never give the false impression that they are illuminated. Whereas, for example, a cloudy red one can sometimes look 'ON' if a light is shining on it.
 

hippy

Ex-Staff (retired)
The 18M2 is we are informed generally based on the 16F1827. How identical is unclear. But from the 16F1827 datasheet:
Total chip current capacity
Maximum current out of VSS pin .......... 95 mA
Maximum current into VDD pin ............. 70 mA
The 16F1827 data will apply to the 18M2. Unfortunately the datasheet contains preliminary information and appears to be ambiguous in a couple of places. We are seeking clarification from Microchip.

Assuming the above to be correct, note there's a difference whether it's source or sink current driving the LED's. Assuming 12 LED's all on and ignoring other current; each pin can source 70mA/12 = 5.8mA or sink 95mA/12 = 7.9mA. That should be more than enough to drive a reasonably efficient LED in either case.
 

Dippy

Moderator
Yes, getting clarification sounds like a wise move :)

The version of the Data Sheet I have shows some apparent strangeness in Section 29.0 Electrical Specifications
Looks like spotty Data-Sheet-Johnny has been cutting and pasting and his boss didn't check.:rolleyes:

Anyway, we'll look forward to pukka numbers.
Maybe then they can be included in the 18M2 spec sheet please -as this stuff IS important and Microchip may take months to update....? (Fingers crossed).
 

John West

Senior Member
A problem with running a very low supply voltage is that there is no overhead voltage available to run a current limiting resistor. In fact, certain LED's may require more than the 2.5V available to light up to the required brightness.

As the LED junction voltage drops with increase in temperature the LED current drawn will increase (assuming a fixed supply voltage.) This is one of the reasons to use a current limiting resistor in the LED circuit to begin with.

Because of this inconsistent load, I too suggest using 5V as the primary power supply voltage if it is feasible. If it's not, it looks like you have some thermal calculations to make regarding the LED loads.
 
Top