Maker Pro
Maker Pro

What value of resistors do I need and a sanity check

jjanes

Aug 4, 2012
10
Joined
Aug 4, 2012
Messages
10
I have a question regarding this schematic. I am not that well versed in the determination of all the components I need but I do try.

schem1.jpg


In the middle you see a 4-Position rotary switch on each of the terminal paths I want to have an LED that lights up AND I want it to be at the deisgnated current level indicated on that line.
For example on the top terminal paths LED1 and then I have a 33 ohm resistor and that should give 2.0mA. I got the schematic from a pdf I downloaded but I added the LED.

I remember from some place and I see it here on the left side of the image R5 that you need to have a resistor in front of the LED in the circuit path I am not sure why but I believe it is critical.

I suppose I could swap the order of the components in each circuit path so the resistor shown comes first but the output amperage is critical. So I am not sure which way is best to have another resistor in front of the LED and then adjust the size of the second one if needed(which I think it would have to be) or to just have the single resistor and adjust it but I do believe I have to have one in front of the LED

So I guess it breaks down this way

Line 1 = R? + LED + R? = 2.0mA
Line 2 = R? + LED + R? = 1.5mA
Line 3 = R? + LED + R? = 1.0mA
Line 4 = R? + LED + R? = 0.5mA
I just need to know how to determine the values of all the R's
the power is 12V and I assume the LM344z will regulate that part OK

The next question is on the on the lower left I want to add an actual meter so I can see the mA from the pot. The SPDT switch will toggle between the fixed settings going through the rotary switch and the a pot that can be manually adjusted( at least that is what I am trying for)

I am not sure if I need a resistor there or if the pot will perform that function as well.
I also added the diode just to the right to block the current coming from the rotary switch circuit path if it is in use (This was a wild guess on my part) but is that correct.

The LEDs are there just to act as indicators as to which circuit is active at any given time.
I hope some one can help me with this as I really do not know where else to go other than forums like this one
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
I got the schematic from a pdf I downloaded but I added the LED.

This schematic has given me a splitting headache. It has obvious numerous errors. Please supply the link to the original pdf schematic.
 

KJ6EAD

Aug 13, 2011
1,114
Joined
Aug 13, 2011
Messages
1,114
I only read halfway through your post to preserve my sanity. It would be helpful to just tell us what you're hoping to achieve.
 

jjanes

Aug 4, 2012
10
Joined
Aug 4, 2012
Messages
10
Sorry for the confusing schematic here is the original
orig-schem.jpg

and mine for easier comparison
schem1.jpg

What I want to do is add a switch so that the output current can be controlled either by the 4 way switch (shown here) or a pot and have built in meter to see the actual output in that part of the circuit(My part of the schem).

I also want to have an LED to help me see which circuit is active ( the position on the four way switch or the pot)My additions

I appreciate your candidness but I am very new to this so please forgive any flagrant errors

OUTPUT current must be fixed at 2.0mA, 1.5mA, 1.0mA, 0.5mA or controlled by pot and have a display meter indicate current output level the pot would range from 0.0 to 2.5mA
 

duke37

Jan 9, 2011
5,364
Joined
Jan 9, 2011
Messages
5,364
This seems to be a constant current power supply with switched output range.

The leds will need a voltage to work which will completely ruin the supply.
If you want an indication of what you are doing, use a switch with another pole to select a led independent of the control circuit.

Are your leds the wrong way round?
 
Last edited:

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
Well, I consumed quite a bit of suds. Then went and had some great Greek 'Tuck',.. I hope I got that right????.... Anyway, washed that down with Greek wine, came home and looked over the newly posted schematic.... Anyone have an Excedrin? I know this is going to sound trivial but besides the reversed LED my old eyes can't focus on schematics with negative on top. Yes, I know it's lame but I can't help it! :p

Has anyone asked what this current source is going to be used for? If not, I'm asking.

Chris
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
To summarise the comments so far and add some of my own.

1. Your schematic, and the original schematic, are drawn in a confusing way. It is normal to put the main negative rail at the bottom of the schematic (unless it uses all PNP transistors, but that's another story). That means the negative terminal of the battery should be at the bottom, and the battery should be at the left side, with the output at the right, and everything else in between.

2. The LED connected in series with R5 is around the wrong way. Also, it's marked as high-efficiency with a 4K limiting resistor. That's OK, but high-efficiency LEDs are more expensive than standard LEDs and using a high-efficiency LED at low current is only important if you're trying to minimise the load current on the battery. In any case the anode should be towards the positive side of the battery.

3. You can't put LEDs in series with the current setting resistors. You need an exact resistance between the -V and Rset pins of the LM334Z to set the current. Putting LEDs in series will totally screw up the current regulation.

The only option I can see is to use a double-pole rotary switch, as duke37 has already suggested. You can replace the power indicator LED with five LEDs, one for each operating mode, and switch the supply to one of the five LEDs using a second pole on the rotary switch.

4. I also suggest using a 5-pole rotary switch instead of a 4-pole rotary switch and an SPDT switch. It's just tidier.

5. For your adjustable current option you need your resistance between -V and Rset to be adjustable down to about 25.6 ohms (for 2.5 mA). That means you should use a potentiometer in series with a 25.6 ohm resistor (approx) so that even at the minimum resistance end of the potentiometer, there is 25.6 ohms between V- and Rset.

You can't get down to 0 mA out of the LM334. If you aim for a minimum output current of 0.2 mA, for example, you need the resistance to be adjustable up to 320 ohms, so you would use a 300 ohm potentiometer. The closest available value would probably be 500 ohms.

All of these values are calculated from Ohm's law, using V = 0.064 (the nominal reference voltage of the LM334 at 25 degrees Celsius). For example to get 2.5 mA, use R = V / I where V=0.064 and I=0.0025. The answer is 25.6 ohms.

Ideally you want a smooth even adjustment of output current as you rotate the potentiometer, but no type of potentiometer that's available will give you that - no matter which "law" you choose, logarithmic or linear or something else, the current markings will not be evenly spaced. A linear pot might be your best bet, but be aware that the markings won't be spaced evenly.

6. Monitoring the output current is a good idea but you need to connect your current meter in series with the output. That is, between the V- terminal of the LM334 and the left side of the output fuse. Also the extra diode you've added from LED5 to the fuse is not needed and not appropriate.

7. The LM334 is not just a current regulator - it is a temperature sensor. The reference voltage, which controls the output current in conjunction with the resistance between V- and Rset, is nominally 64 mV at 25 degrees Celsius, and has a temperature coefficient of nominally 0.214 mV per degree Celsius. That means that at 15 degrees Celsius, for example, the reference voltage will be 2.14 mV lower, which works out to a drop of about 3.3%. So your current source will be temperature-dependent. Just letting you know!

8. The 470 uF capacitor across the output, which according to the original schematic "creates a soft start and stop for the device", will have the opposite effect if the current source is turned on before the load is connected. It is a bad idea generally. That depends on exactly how the current source will be used, and what you will be supplying from it.

9. Please tell us what you intend to use this current source for. The more information you can give, the more useful responses we can give. Without knowing what you intend to use this circuit for, we are mostly stabbing in the dark.

Edit: corrected "Radj" to "Rset" in point 7.
 
Last edited:

davenn

Moderator
Sep 5, 2009
14,254
Joined
Sep 5, 2009
Messages
14,254
Well, I consumed quite a bit of suds. Then went and had some great Greek 'Tuck',.. I hope I got that right????.... Anyway, washed that down with Greek wine, came home and looked over the newly posted schematic.... Anyone have an Excedrin? I know this is going to sound trivial but besides the reversed LED my old eyes can't focus on schematics with negative on top. Yes, I know it's lame but I can't help it! :p

Has anyone asked what this current source is going to be used for? If not, I'm asking.

Chris

haha Chris, sounded like a good nite out.
Yeah I really hate the negative at the top too, its just not right !

@ jjanes .... here's one thing all of us trying to help you will agree on...
You CANNOT place the indicator LEDs in the switched current lines as you have
A --- they wont work and B --- as said by duke they will totally mess up the current levels out of each of those switched positions.
I am going to try and redraw the cct and hopefully it will be somewhat better ;)

Dave
 

jjanes

Aug 4, 2012
10
Joined
Aug 4, 2012
Messages
10
Thanks duke37 I appreciate your answer about using LEDs and how it would ruin the supply. Being somewhat new to electronics I did not know about the orientation of the LED symbol.
 

jjanes

Aug 4, 2012
10
Joined
Aug 4, 2012
Messages
10
KrisBlueNZ, thank you also for your detailed information I am printing it out so I can use to reference any future work I may do
 

jjanes

Aug 4, 2012
10
Joined
Aug 4, 2012
Messages
10
Hello Everyone just as an FYI for someone who is obviously not that knowledgeable like myself and to which I freely admit to in my posts some of the answers seem to have a great bit of sarcasm associated with them which does not go along way in respecting the people or their opinions. Maybe if I had been doing this for a long time or had tried to hide the fact that I really am new to this I could see the use of such comments. duke37 and KrisBlueNZ both gave intelligent and informative answers which I appreciated and stated as such. My main job is programming Apps for mobile devices so I am familiar with forums and the usual way people respond to others and I usually do not see these sarcastic responses very often at all.
This may posting may offend some who actually have the power to ban me from this forum so this could be my last post.

I will check in again if I am able and hope to continue to use this as the learning resource I was hoping it was.

I just hope in the future some of the sarcasm could be held in check.
 

davenn

Moderator
Sep 5, 2009
14,254
Joined
Sep 5, 2009
Messages
14,254
Havent seen any sarcasm from anyone ??

D
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
jjanes, I don't think you need to worry about being "banned from the forums" for posting a thoughtful, rational and measured comment like that. But I can tell you for sure that TELLING US ABOUT YOUR PROJECT will be a big help towards getting people "on your side".

Edit: actually, your original post does contain a lot of good information. But it's always important to tell us what you're actually trying to achieve! What do you want to use it for?

We regularly see requests for help with absolutely minimal background information, and it is often literally a complete waste of time to respond with any suggestions in these cases.

It's good that you came forward with the original schematic, but we shouldn't have had to ask. Don't be afraid that extra information will overwhelm us, or that your idea will be stolen and patented by someone else!

You're obviously smart enough to learn - you just need some pointers. Read up about voltage and current, and Ohm's law - it's about the most basic and important formula you can know in electronics. Try Wikipedia. Look at the "related" pages. Have a look at the LM334 data sheet. It may not make complete sense but try to understand what you can. Ask questions here; if you show you've made an effort to learn stuff for yourself, people will be much more willing to help you understand something you're stuck on. I hope you continue to learn about electronics - it's a very interesting field!
 

jjanes

Aug 4, 2012
10
Joined
Aug 4, 2012
Messages
10
Well let the sarcasm roll I was just surprised to see it is all

The project is TDCS or Transcranial direct-current stimulation here is a link
http://en.wikipedia.org/wiki/Transcranial_direct-current_stimulation

I can hear the laughing already.

Anyway the lines labeled cathode and anode in the original schematic were connected to a headpiece that had electrodes in it to directly stimulate certain areas of the brain
There would be approximately 20-30 leads connected to each side In addition to the schematic you saw there the next step would be to incorporate about 50 switches to control what areas of the brain are actually stimulated.
Here is a basic image to show what I mean
simple.jpg

I do not have a lot of additional information the current must be stable and be around the four settings mentioned 2.0mA 1.5mA 1.0mA and 0.5mA the LEDS and the pot with the meter were just addons I would have liked but can easily do with out.

I have seen a few different schematics but this one seemed the best but as you all have stated in it not that good. Since I will be the subject I want to make sure it all works well and is safe. Could help my dad who is showing signs of alzheimer's which this shown promises for
 

davenn

Moderator
Sep 5, 2009
14,254
Joined
Sep 5, 2009
Messages
14,254
OK as promised

a better layout :)

attachment.php


jjanes .... I wouldnt have spent time doing this for you if I didnt think the effort was worth it
So I think you may be a little oversensitive ;)


Now 2 things ....
Am not sure what effect the isolating diode will have in the variable output
Am assuming, going by the original diagram, that the capacitor across the output is non-polarised, as thats the symbol they have used

cheers
Dave
 

Attachments

  • Adj Current Source.GIF
    Adj Current Source.GIF
    4.4 KB · Views: 1,669

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Nice work davenn :)

I have a few corrections for you to make if you want to.

The centre pin on the LM334Z is called "Rset" not "RESET".

The potentiometer needs a resistor in series with it to limit the maximum current, and needs to be returned to the same place as the other resistors, without the diode. I calculated the series resistor at 25.6 ohms for a maximum current of 2.5 mA at 25 degrees Celsius.

The voltmeter should be replaced with a current meter connected in series with the output. It's not practical to make the meter measure the potentiometer setting; the only reasonable way to use it is to measure the actual output current.

The 470 uF capacitor should be removed. It won't help performance and could be unsafe - the load is a person's head; if an electrode becomes disconnected, the capacitor will charge up, and when the electrode is reconnected, a high current will flow until the capacitor discharges.

The "power on" LED could be removed, since one of the other five LEDs will always be ON when the circuit is powered up.

The five individual current limiting resistors for the LEDs could be replaced with a single one.
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
jjanes, I want to clarify something.

Connecting ANY circuit to electrodes attached to your head has certain risks. I and others on this thread have made suggestions in good faith and on the basis of the information you have given us so far. You must accept the final responsibility if you connect this circuit to your own head, or anyone else's. I, everyone else who has advised you, the manufacturers of the components you use, and anyone else who may be involved in any way CANNOT be held responsible for anything that happens as a result of you connecting an electronic device to your head or anyone else's head. You should understand the risks, and you must take responsibility for your decision to do that.
 

davenn

Moderator
Sep 5, 2009
14,254
Joined
Sep 5, 2009
Messages
14,254
sorry didnt follow ....

The potentiometer needs a resistor in series with it to limit the maximum current, and needs to be returned to the same place as the other resistors, without the diode.

D
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
sorry didnt follow .... The potentiometer needs a resistor in series with it to limit the maximum current, and needs to be returned to the same place as the other resistors, without the diode.
The right side of the potentiometer needs to be connected to the same place as the other four resistors, i.e. to the left side of the fuse, and you also need a resistor in series with the potentiometer.

Thanks Dave.
 
Top