noobie question

muckypups

Member
Hi,
I've only recently started playing with electronics, in fact less than a month so far.
I wanted to "scratch an itch" so to speak, and it's not been too bad so far. However, I have an issue which is confounding me, despite reading all I can find via google etc. I have been lurking on this forum for a while too, and have found many valuable insights which have helped me move forward.
Anyway, I am building a sensor device that reacts to inclination or excessive G force.
the 3 main components are, DE-ACCM3D accelerometer, PICAXE 18X, and a XBEE wifi module.
I want a fairly decent battery life so I using 2 CR2450's at 3v each to give me 6v supply.
The accelerometer can run off 3.5v up to 15v as it has its own regulator on board. It also has an output on board that can supply 3.3v. I am using this 3.3v supply to power the 18X and the XBEE.
This runs fine and I have successfully transmitted a signal to another XBEE connected to my PC, which I can view using hyper terminal.
The problem is the amount of current drawn by the XBEE. When transmitting, it can draw 45mA, and receiving draws 50mA. The accelerometer can only supply 50mA maximum, and ideally should be only asked for 10mA. I can risk the PICAXE drawing 20mA, but combine that with the 45 or 50 mA for the XBEE, and things might get a bit smokey !
So, after much thought, I decided to take the XBEE off the accelerometer supplied 3.3v and run it from a voltage divider on the main 6v supply. Doing the maths gave me a 6K8 resistor on top and a 8K2 on the bottom, to give me 3.28v .
I tested this out of circuit and it was correct. However, when I connect it in circuit I only get 1.2v on the Vout of the voltage divider. After much head-scratching, and googling, I decided that the XBEE itself was affecting the Vout voltage, and I would have to change my choice of resistors. the trouble is, I'm not sure whether to go up in value or down. I calculated that if I use a 50K at the bottom, then theoretically that would give me 2v more than I want , which should get brought down to the right 3.2v ish figure the XBEE wants.

I haven't tried this in circuit yet, as I think any mistake will fry the XBEE.
So, am I doing this correctly, or am I way off base ? I realise this isn't strictly a PICAXE issue, but there is one on the circuit ;-)

I am currently building this up on a AXE090 experimenter board which appears to running fine. I only have the minimum number of pins wired in on the XBEE and I'm using 3 inputs and 1 output on the 18X.

I have schematics of the basic voltage paths available, the first is a working config and the second is what I think it should be (but doesn't work as the XBEE doesn't get enough power)

http://files.headru.sh/images/voltage-1.jpeg

http://files.headru.sh/images/voltage-2.jpeg

I would appreciate it if someone more experienced could help me out here and run their eye over this.

Thanks

Alan
 
Last edited:

muckypups

Member
Aaah, thank you. I had never even considered the current draw limits of the battery. I made the mistake of assuming that being 650mA each they would be sufficient (lifespan). I guess I'll have to get a bigger battery then. I didn't want to go for a PP3 as it's too big and can't handle a large draw either, and anything else makes the size much bigger.
Back to the drawing board I guess.

Thanks

Alan
 

muckypups

Member
Hmmm, I changed things around and used a 9v PP3 just for a test. It appears that whatever resistors I put in the divider, I still only end up with 2.1v output. This is with the XBEE in the circuit. When the XBEE is out I get Vout of 3.6v with resistors of 1K5 and 1K8.
I have tried 1K5 and 1K5 but when the XBEE goes in, I only get 2.1v on the Vout.

Scratching head now ....

What would be a good battery that can provide roughly 80mA ?
(I don't need a constant draw of 80mA but that's roughly the peak of whats needed, and I haven't sorted out the sleep mode on the XBEE yet, and when I connect the battery, everything runs because the accelerometer is telling the picaxe to fire the signal off.)

I don't think I'm getting this voltage divider stuff right. If I run the XBee and picaxe from the 3.3v the accelerometer gives out, everything works, so I don't think it's a lack of current from the batteries.

I think I need a beer.

A
 

Technical

Technical Support
Staff member
60mA out of a voltage divider arrangement simply won't work here - its a fundamental design error. The current drawn by the XBee affects the whole calculation as you have seen.
You need to think about a low drop out 3.3V voltage regulator instead.
 

muckypups

Member
Thanks Technical, fundamental design errors are the name of the game when I know nothing. Unfortunately, the books don't seem to address these issues in a noob friendly format. I've looked for tuition but other than doing a full time gcse or A level course, there isn't much about around here.
If anybody is aware of a more suitable forum for basic electronic questions, please post. I tried using the newsgroups, but all I found were flame wars. I'll look into the regulator anyway, thanks.

A
 

Andrew Cowan

Senior Member
Two 1.5K resistors on 6V?

Well, only one is used, so using ohms law:

I=V/R

I=6/1500

I=0.004

Which means, using a 1.5K voltage divider will give a maximum current of 4mA. You need a voltage regulator. Lowering the volaues of the resistors to give 50mA would mean that 25mA would be wasted constantly over the resistors.

Andrew
 

manuka

Senior Member
Muckypups. Are you up with simulators such as the legendary mid '90s "Crocodile Clips" ? These can be an DIY educational goldmine, with gorgeous displays (see attached). Croc. Clips "Technology" itself has been thru' many revamps,including 3D,with their latest released Dec. 2007. Check a free basic download of this "Yenka" version => http://www.yenka.com/Yenka/Yenka_Products/Technology_products/Yenka_Electronics/Yenka_Electronics_free_download/

Anyway-glad you've got this far,but there are simply (& cheaper) ways to check g forces with PICAXEs. Andrew "Brightspark" even did some work with a piezo transducer ! How demanding are your needs & -eh- budget? Considered 433 MHz rather than 2.4GHz XBee? You'll get better ranges at the lower freq. too. Stan. in NZ
 

Attachments

Last edited:

BeanieBots

Moderator
As already mentioned, using a voltage divider is not the way to do this.
Ideally, you should get a regulator as suggested by Technical. However, it is also possible to build a simple buffer for the existing supply. The method I would suggest is a circuit known as an "emitter follower". If you do a google on those key words you find plenty of examples and an explanation of how it works. This article is quite good.
http://hyperphysics.phy-astr.gsu.edu/hbase/electronic/emitfol.html

As for battery life, it is very easy to work out how long they will last.
You know your circuit pulls about 60mA in total.
You know your battery is 650mAHr.
650/60=10.8 Hours.
 

ValueAdd

Senior Member
Yenka and Transistor Stuff

I just had a look at the links provided by Manuak and BeanieBots.

As a relative newbie also, I found these site very interesting :)
 

muckypups

Member
Hi,
Thanks for all the replies. I spent the weekend (mostly at the pub) thinking about what I'm trying to do here.
Regarding power, obviously I want to use as little as I can get away with. My principal design constraints were to use components that did as much of the work for me as possible, given my lack of understanding of electronics. I had an idea for a device and googled for components that appeared to do the job. I am now at the stage of getting them to talk to each other, and a)not blow up, and b) last for 3 months or so on a battery.

I'm using the Xbee primarily because of its "drop in networking" capability, but the real attraction was its ability to mesh, built in identification and control mechanisms, and reasonable cost.
The accelerometer was chosen because of its tilt detection and G detection combined with its onboard regulator, giving me less integration worries (so I thought !). Also the documentation was more informative than standalone chips I found.
Obviously the picaxe was the best choice for decision making in this device, and you guys are proving that by taking the time to help me out. I truly appreciate it, thanks.

I am now looking at ways of reducing my current requirement and reducing complexity.
I figure that having a battery that is up to the job is #1 so I am looking at AA sized Li thionyl chloride cell giving 3.6v and continuous output of 100mA.
I'm not sure whether the xbee will take 3.6v as it's rated from 2.8 to 3.4v, but at least the new type battery can handle a 50mA draw. The xbee doesn't have to be on all the time anyway, so sleep mode will reduce average current. I'm also going to look at using the picaxe to switch the power for the G chip so that it only powers on for a fraction of a second, which may give me "up to" 10x power saving.

The G meter is over spec'd really. I got carried away with real time reporting, when I can get away with a binary state really. I'm willing to continue the fight though, as I want real time inclination and G force data on a web page at some stage.

All that being said, I am enjoying the process. I knew that I knew nothing, and every journey starts with the first step. I started with computers in the 90s and had a "real" web server by 98. And all that began with "view source" from netscape navigator. So the only way is up ;-)

Thanks again. I may post with progress when I have any (waiting for parts ...)

Alan
ps. Thanks for the links. That Yenka looks good, but what's the price if you're not a "small school" ? :)
The Hyperphysics link is great ! I'll be there a while.
Andrew, thanks. I have been approaching this project from the wrong direction. I need to work out my requirements first, rather than dive in and hope. Lesson learned and now I always check for spec sheets before getting any kit, no matter how simple the component seems.
pps. Manuka - where are you in NZ ? I traveled for 3 or 4 months in NZ back in 2002.
 
Top