Negative voltage

Go To Last Post
35 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok, this is probably a dumb question, but can I "ground" an ATTINY 25 to a -5V source? (Then VCC would go to the +5V rail of course). Will I kill my micro? Also, assuming I can do that, is there a way to also output negative voltage from one of the portB pins somehow?

I tried searching for negative voltage, but didn't find this. Thanks.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Check your Absolute Maximum Ratings table, and what the note says if you violate those numbers.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, if you connect the - of your chip to -5 and the + to gnd, the chip will operate, assuming other things are correct. The inputs will have to be between -5 (0) and gnd (1), and the outputs will also be negative. The chip doesn't really care what it's voltage is in reference to the rest of your system, or the world, as long as it sees voltages within its operating range.

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Yes, if you connect the - of your chip to -5 and the + to gnd

but OP said
Quote:

can I "ground" an ATTINY 25 to a -5V source? (Then VCC would go to the +5V rail of course)

so the potential from GND to VCC would be 10 Volts. That is 4 Volts above maximum ratings.

It seems to me that the wombat is under the impression that there exists some kind of universal ground, which is not so.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ah, okay. I'll have to think of something else.

What I want to do is output two sine waves, while one goes up to +Vcc, the other is going down to -Vcc, then they reverse. I could use two ICL7660's to do this by hooking their Vcc's up to two portB pins on the 25, and then two other portB pins would supply the positive half of the waves. Does that sound good, or is there an easier way to do it?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm not a sparky, but isn't that a basic op amp circuit? 0-5V in from the AVR; an offset voltage; a gain of 2 or whatever; and like +/-10V supplies on the op amp?

You need some circuitry anyway, as an AVR doesn't have a DAC so you are only outputting two values anyway--not quite a "sine wave".

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Another way would be to AC couple the output.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Jepael wrote:
Another way would be to AC couple the output.
how do i do that?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

theusch wrote:
I'm not a sparky, but isn't that a basic op amp circuit? 0-5V in from the AVR; an offset voltage; a gain of 2 or whatever; and like +/-10V supplies on the op amp?

You need some circuitry anyway, as an AVR doesn't have a DAC so you are only outputting two values anyway--not quite a "sine wave".

Actually you are right about op amps as level shifters but they also make fine DACs too when fed from the PWM. Easy to generate a couple out of phase +-5v sine with two op amps and some passives.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just "AC coupling" will not get you any larger signal (peak-peak) than Vcc of the micro. That is, if your micro is powered from 5V, you can get a signal that goes from 0 to 5V, period.

If you want a signal that (peak-peak) is larger than Vcc, you will need something like an op-amp. Actually, if this signal is coming from a PWM output, you will need to filter, anyway, and the op-amp can do both the filtering AND the amplification AND the offset so that it is centered about ground.

It sounds like you are expecting a sine out by some "magic" process. Could you elaborate on how the sine is being generated and what you need to do with it?

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

To output -5V from micro just use an inverted amplifier setting the gain to -1.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What I want to do is build a Cranial Electrical Stimulation (CES) device. Basically what it does is sends a <1mA sine wave to an electrode attached to one earlobe, from -9V to +9V, at a certain frequency, and the same frequency to the other ear, but shifted 180 degrees. This is useful for lucid dreaming.

Actually, I found out commercial devices use a square wave (which is easy on a uC lol), but I was thinking a sine wave might be more effective, IDK if it's worth the trouble. I'm not so hot at electronics or programming, and this would be my first try at PWM too.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

unseenwombat wrote:
What I want to do is build a Cranial Electrical Stimulation (CES) device. Basically what it does is sends a <1mA sine wave to an electrode attached to one earlobe, from -9V to +9V, at a certain frequency, and the same frequency to the other ear, but shifted 180 degrees. This is useful for lucid dreaming.

Actually all you need then is a couple transistors instead of op amps. And note that wigging bits is a much simpler solution than promgramming timers.

BTW I have a Perpetual Motion Motor that outputs more energy than it consumes which would be perfect for powering your device. :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

haha, i'm sure your device works perfectly in dreams. I'll be sure to look for it next time I have a lucid dream.

Quote:
Actually all you need then is a couple transistors instead of op amps. And note that wigging bits is a much simpler solution than promgramming timers.
For a square wave I could use transistors. I'm not sure about the sine wave.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

unseenwombat wrote:

What I want to do is build a Cranial Electrical Stimulation (CES) device.

For a square wave I could use transistors. I'm not sure about the sine wave.

I just got back from CES and assure you it's 99% smoke and mirrors. Did anyone catch the 3d iphone? :)

In fact you can easily generate 2 out of phase +-9v sines with just a transistor. No op amps required or t25 either for that matter.

Note that physiologic response to sine wave is orders of magnitude less than that of square waves due to frequency distribution. Also note that virtually all electro-sleep therapy is almost certainly based on placebo effect anyway.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Note that physiologic response to sine wave is orders of magnitude less than that of square waves due to frequency distribution.
Oh, srsly? Well that settles it then. I'll just go with the easier square waves.

Quote:
Also note that virtually all electro-sleep therapy is almost certainly based on placebo effect anyway.
Well, I would normally be inclined to agree with you, but a guy on the lucid dreaming forum, and a few others who have used a CES device, have had tremendous luck using a signal that he came up with through lots of trial and error. I'm looking forward to giving it a shot anyway.

Quote:
In fact you can easily generate 2 out of phase +-9v sines with just a transistor. No op amps required or t25 either for that matter.
My only problem is I need the thing to run off a 9V battery. It would be nice to have a dedicated power supply, but it has to be self-contained and not get in the way while you sleep. So the only way I've found to get -9V is with an ICL7660. I figure I'll need 2 of them, one for each ear, and the uC alternately turns each one on and off and also sends +9V to the other ear, using 2 transistors. What is a T25? Does that also turn +9V to -9V?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

unseenwombat wrote:
a guy on the lucid dreaming forum, and a few others who have used a CES device, have had tremendous luck

What is a T25?

NET=Not Everythings True

T25=Tiny25

I hope you pursue the project and please report results. Just because some thing's placebo does not mean it's not real. Seriously. :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK, now I just need to do it.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Just because some thing's placebo does not mean it's not real.

Well, I'll have to think about that one. [If there is a conference on virtual reality, must you attend in person?]

Quote:

I hope you pursue the project and please report results.

Quote:

I'm not so hot at electronics or programming,

Quote:

... sends a <1mA sine wave to an electrode attached to one earlobe ... to the other ear, ...

I'll let others be the guinea pigs on this one. Perhaps quicker "deep sleep" could be obtained from using the mains directly?

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The Usch wrote:

Quote:
I'll let others be the guinea pigs on this one. Perhaps quicker "deep sleep" could be obtained from using the mains directly?

I think the OP is more interested in REM sleep, isn't that when dreaming occurs?

Anyway, joking apart, I think he's unlikely to come to much harm with a 9V battery (providing it's a PP3 [or MIN 1604?]).

Four legs good, two legs bad, three legs stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Anyway, joking apart, I think he's unlikely to come to much harm with a 9V battery (providing it's a PP3 [or MIN 1604?]).

"Death by 9V":
http://www.darwinawards.com/darw...

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

theusch wrote:
Quote:

Anyway, joking apart, I think he's unlikely to come to much harm with a 9V battery (providing it's a PP3 [or MIN 1604?]).

"Death by 9V":
http://www.darwinawards.com/darw...

Like so much one reads about the Darwin Awards, that looks like utter nonsense to me.
The whole concept of the Darwin Awards is, to my mind, based on a misunderstanding of natural selection, implying that it should necessarily result in a more intelligent species. In a paradox that Douglas Adams might have invented, evolution is now reducing the intelligence of humans to the extent that they start believing in creationism... Oh! Sorry, wrong thread... :oops:

Four legs good, two legs bad, three legs stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

John_A_Brown wrote:

Like so much one reads about the Darwin Awards, that looks like utter nonsense to me.
The whole concept of the Darwin Awards is, to my mind, based on a misunderstanding of natural selection, implying that it should necessarily result in a more intelligent species. In a paradox that Douglas Adams might have invented, evolution is now reducing the intelligence of humans to the extent that they start believing in creationism... Oh! Sorry, wrong thread... :oops:

LOL!!!! True. Critical thought is a rare commodity these days. Just look at certain recent threads here for example. :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Note that "Darwin" only picks stuff up from other places.

Besides the "treatment" being discussed in this thread, skip the earlobes and go right to the brain itself:
http://www.google.com/url?sa=t&s...

Re Darwin, I picked that link to post but the same wording is elsewhere:
http://www.lmgtfy.com/?q=%22How%...

and there are a number of hits to "9v battery injury" that basically discuss as here: How dangerous could a9V battery really be?

Now, as an old farm boy who has lead a sheltered life, this page has opened whole new vistas...
http://www.urbandictionary.com/d...

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hmmm.... Second link doesn't work for me. I kind of wish the third link didn't either.... I'll never look at a PP3 the same way again.
As for "Darwin", one of their most widely publicized stories was the man who tied several weather balloons to a chair, and floated away. It turned out to be totally false.

Four legs good, two legs bad, three legs stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I'll never look at a PP3 the same way again

b-b-but searching for that I get
Quote:
PP3 isn't defined yet

Now I'm cringing with curiosity.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Quote:
PP3 isn't defined yet

Now I'm cringing with curiosity.


http://en.wikipedia.org/wiki/Nin...

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Here's the result I got when trying to access the links provided:

Access Denied (content_filter_denied)

Access denied to "www.urbandictionary.com" according to:
- s Code of Business and Ethics and Conduct and
- Monitoring the usage of systems and services
This page is categorized as: "Adult/Mature Content;Reference"

If you wish to question or dispute this result, click here

If you need access to this site for  Business reasons, please contact your manager and follow the exceptions procedure.

For assistance, contact IT Service Desk. 

Dont even dear to try accessing them from home!

Regards
Vidar (Z)

----------------------------------------------------------

"The fool wonders, the wise man asks"

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

lol, you're making fun of me aren't you?

Hey, I did manage to complete the lucid dreaming mask with flashing LED's thanks to your guys' help. It hasn't blinded me or exploded or anything yet!

I plan to test this one thoroughly and completely on the breadboard first. I think I'll be pretty safe.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Okay guys, I have a new question.

Is there a way I can totally disconnect a pin from both ground and Vcc on the ATtiny 25? I think it's called tri-state, and I see it, or something like it, in the datasheet, but how do I do it? It says I have to set PORTxn to 0 and DDxn to 0 (I think) and PUD in MCUCR to X? I guess that means the value of PUD doesn't matter, right? So, to totally disconnect say PB4, would I just write PORTB4 = 0; and DDB4 = 0;? I don't think so, cuz that gives me a compiler error. So how do i do it?

Wait, I think I see, it's

DDRB &= ~(1 << DDB4);
PORTB &= ~(1 << PORTB4);

Right?

What I want to do is, for example, when the signal to the left ear is high, I want the right ear, connected to PB4, to go to ground, but when the right ear's signal is high, I want only the left ear, connected to PB1, to go to ground, not the right ear. I expect to need 4 leads. one going from the output pins to each ear, and one going from each ear to two pins that alternately ground and float.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

John_A_Brown wrote:
Hmmm.... Second link doesn't work for me. I kind of wish the third link didn't either.... I'll never look at a PP3 the same way again.
As for "Darwin", one of their most widely publicized stories was the man who tied several weather balloons to a chair, and floated away. It turned out to be totally false.

On the contrary! Its real! It occurred in Brazil.

A link for the translation of a local newspaper: http://translate.google.com/tran...

Felipe Maimon

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Actually,

Trans-temporal stimulation, (across the temples), of the right frequency and intensity CAN induce complete loss of consciousness. The effect is transient, however.

Yes, you can kill with a 9V battery. The key is the current you inject, and the frequency of the stimulus. If one uses the correct electrodes, the elecrtode to skin impedance is very low, and a significant current can flow, triggering V-fib, and death. This is for a current which flows through the chest, (heart). A low intensity current between two electrodes on your forearm, for example, isn't likely to kill you.

Why anyone with an intact brain you want to inject a current through it, (ear to ear), is beyond me.

If you screw up and stimulate your vagus nerve(s) you could also kill yourself from asystole.

If you screw up and stimulate your phrenic nerve(s) you could also kill yourself from hypoxia.

Using humans as experimental subjects for biomedical electronics is a foolish endeavor.

(Been there, done that..., (my first EKG monitor, on myself)) :oops:

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, by setting the direction of a pin to input (e.g. writing a zero in the bit for that specific pin) and disabling its pull resistor by clearing the PORT bit you get a TriState(TM) pin.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

fmaimon wrote:
John_A_Brown wrote:
Hmmm.... Second link doesn't work for me. I kind of wish the third link didn't either.... I'll never look at a PP3 the same way again.
As for "Darwin", one of their most widely publicized stories was the man who tied several weather balloons to a chair, and floated away. It turned out to be totally false.

On the contrary! Its real! It occurred in Brazil.

A link for the translation of a local newspaper: http://translate.google.com/tran...


Since the original Darwin awards story was around 1997 (I believe), this is either a copycat escapade, or the guy's been airborne for about eleven years.

Four legs good, two legs bad, three legs stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The cochlear implants of my daughter inject at maximum a few microamps (positive and negative) into the auditory nerves. Which gives a neural response voltage of at most 20 uV.