Team Fortress 2 Mini Sentry

bertz

Joined Nov 11, 2013
327
Fine fine it was just a suggestion to shortcut costs and or find something immediate in terms of batteries so I could start programming now. Anyways where do I get the alkaline cells? I don't remember you listing a site in your earlier posts. I'll check again and amend my post if I see you did mention it but other than that I searched Jameco and all I found were specialized offbrand batteries.

Wouldn't that be a bad thing?
Look familiar?DURACELL-Alkaline-batteries_lg.jpg
 

bertz

Joined Nov 11, 2013
327
Sometimes it feels like your criticizing me for lack of experience with this stuff.
Your going to need battery boxes with ON/OFF switch. You need 4.5 volts to power the board. If you cant find one at a nearby Radio Shack check this out:
http://www.ebay.com/itm/STORAGE-BOX...713?pt=LH_DefaultDomain_0&hash=item58b0e59029
Likewise, the amplifier is going to need at least 9 volts to get you up to the +90dB level so this battery box is appropriate:
http://www.ebay.com/itm/Black-12V-6...502?pt=LH_DefaultDomain_0&hash=item58be72b8ce
 

bertz

Joined Nov 11, 2013
327
Sometimes it feels like your criticizing me for lack of experience with this stuff.
I suggest that you download and study the attached pdf reference. It has a ton of very basic information about batteries, various electronic components, how to solder, how to write & download programs, etc. This datasheet was for a Cub Scout project where the kids built electronic dice and the information was perfect for them.

http://www.picaxe.com/docs/AXE105.pdf
 

bertz

Joined Nov 11, 2013
327
Having recommended the battery boxes in Post #63 got me to thinking about battery life. The typical AA alkaline battery has a capacity of around 2000 mAh (milliampere hours). This means that if the load on the battery is 200 mA (milliamperes) then the battery life will be approximately 2000 mAh/200mA = 10 hours. If the load increases, then the battery life will be correspondingly shortened.

So how does this affect our project? Let's start with the 18M2 project board. The board supply uses 3-AA cells for a 4.5 volts supply. The processor itself draws only a few milliamperes so we need not concern ourselves with that. The servo however is a different story. The current draw is a function of the load. In our case this is the weight of the turret. Now a standard servo typically draws around 500 mA, sometimes more - sometimes less. It all depends on the load. But let's use 500 mA as a good average. Now you want the turret to be constantly rotating back and forth except when you want to manually position it. That means it is drawing current most of the time. Let's use 90% as a utilization factor. So, 2000 mAh divided by 500 mA = 4 hours. Divide that by .9 and you have a useful life of less than 4.5 hours. Lets put it another way, you will be changing the 3 batteries in the project board power pack every 4 hours.

OK, let's take a look at the power pack for the amplifier. We can estimate the power output of the amplifier by dividing the voltage squared by the speaker impedance. We plan on a 9 volt (6 cells) pack and the speaker impedance is 8 ohms. This gives us a peak power out of around 10 watts. But power = volts x amps, so the peak current draw will be around 1 amp (1000 mA). Fortunately for you the power output is not continuous. Let's use 10% as a utilization factor. So, 2000 mAh divided by 1000 mA = 2 hours. Divide that by .1 and you have a useful battery life of around 20 hours. I think you could probably live with that.

Why don't you think this all over and if you're ok with it, we can proceed. If the battery life for the board gives you heartburn, we can discuss alternatives.
 

Thread Starter

Blargenth

Joined Apr 30, 2015
45
No that works fine for what I plan to use it for, I don't plan to have it running non stop for hours at a time, just for short demonstrations along the weekend.

And Bertz listen, I value your expertise and your thank you for taking the time this weekend to help me through this.
 

korchoi

Joined Jun 5, 2015
59
Will the alkaline cells handle Full 1A of current? i think their internal resistance will start to affect the power output and cause crosstalk, weak motors, etc.
If the Alkaline D-Cells won't do, try a Car battery. It outputs 12V. You can feed 12V into a 7805 regulator, which converts it to 5V, which you can use on the PICAXE project board. Meanwhile, on the audio amp, you can feed the 12V straight.
If there is no car battery, you can also try one of those Lithium Polymer batteries, abundant in RC vehicles. Now those might need 5V regulation through a calibrated lm317 voltage biaser, because the 7805 will need at least 7V, and these batteries typically go to 6V.
...Or just combine two 6V lipo batteries in series. Maybe a single 14V lipo cell.
 

bertz

Joined Nov 11, 2013
327
Will the alkaline cells handle Full 1A of current? i think their internal resistance will start to affect the power output and cause crosstalk, weak motors, etc.
If the Alkaline D-Cells won't do, try a Car battery. It outputs 12V. You can feed 12V into a 7805 regulator, which converts it to 5V, which you can use on the PICAXE project board. Meanwhile, on the audio amp, you can feed the 12V straight.
If there is no car battery, you can also try one of those Lithium Polymer batteries, abundant in RC vehicles. Now those might need 5V regulation through a calibrated lm317 voltage biaser, because the 7805 will need at least 7V, and these batteries typically go to 6V.
...Or just combine two 6V lipo batteries in series. Maybe a single 14V lipo cell.
FYI - no such animal as a 6 volt LiPo:p
 

korchoi

Joined Jun 5, 2015
59
FYI - no such animal as a 6 volt LiPo:p
"Nice try, butThis pokemon does not exist!"
I knew it was not exactly that, but i have to agree 6V is way off the range.
I haven't messed with Lithium batteries for quite some time. People around me over here are still on the "build an audio amplifier" stage.
As a notion of my environment,i will share this with you:
Barely anyone at my class knows how to program an arduino. It's like an epidemic. I'd call it the "i can't program" disease.
But actually only 2 or 3 people there besides me care about the electronics course. Guess it is expected. Lawyers and doctors don't build sentries.
 

korchoi

Joined Jun 5, 2015
59
Yup, the AA batteries will have lowered voltage under 500mA load. An average servo will suck up too much current for the same AA pack to power a PIC simultaneously.
0.15 ohm for each cell * 3 cells in series = 0.45 ohms total. 4.5v/0.5A = 2.8 ohms. 2.8+0.45 = 3.25 ohms (2.8/3.25) * (4.5V) = 3.9V
Ignoring Peak currents to move the motor, 3.9V is an Unsafely low voltage for the PIC. If it is running at 4MHz, no sweat. But Over 8 or 16MHz it starts to fail.
And don't even get me started on the Voltage Ramp down of the Alkaline cells! They get weaker as their charge is drained.
An Unified Lithium Battery for the entire system will do. Just down convert it with some regulators. Don't forget to decouple interference from the high power parts with capacitors.
 

korchoi

Joined Jun 5, 2015
59
AA cells have some internal resistance. Hence their voltage lowers as current drawn increases. drawing 500mA, it lowers from 4.5V to 3.9V, which is insufficient for a PIC, specially those from premade kits like the picaxe, which set the frequency higher(it works with 3V at 4MHz, but at 16MHz, 3.9V is not garanteed to work)
I suggest you replace the 9V cell and the 3 AA cells with a single Lithium-Based battery pack. Its internal resistance is much lower.
As a plus, you can recharge it.
 

Thread Starter

Blargenth

Joined Apr 30, 2015
45
AA cells have some internal resistance. Hence their voltage lowers as current drawn increases. drawing 500mA, it lowers from 4.5V to 3.9V, which is insufficient for a PIC, specially those from premade kits like the picaxe, which set the frequency higher(it works with 3V at 4MHz, but at 16MHz, 3.9V is not garanteed to work)
I suggest you replace the 9V cell and the 3 AA cells with a single Lithium-Based battery pack. Its internal resistance is much lower.
As a plus, you can recharge it.
way to suggest ordering something after I ordered it...
 

korchoi

Joined Jun 5, 2015
59
way to suggest ordering something after I ordered it...
Then try powering the circuit as planned. If it works, fine. If it doesn't, feed the PICAXE from the 9V pack used on audio through a 5V regulator.
Those 7805 are real cheap and easy to find. Unless you live in Electronics nigeria, any component store nearby should have one. You can even try gutting a computer board, broken audio amp or other useless electronics for those. They are everywhere. Even Audio repair stores have them. Just look for a transistor that is not actually a transistor. Might have the backside soldered to the board. bonus points if it has a heatsink(some aluminum block) attached.
from left to right, facing the printed side of the chip(with letters and numbers) there should be 3 pins: Vin, GND and Vout.
9V positive->Vin(pin 1)
9V negative and PICAXE GND->GND (pin2)
PICAXE VDD -> Vout (pin3)
Reminds me of a guy who went dumpster diving on his free time and fixed the broken stuff he found with parts from other broken stuff. For example, He would find a portable videogame with a broken LCD, then Frankenstein a working LCD from Another portable videogame with a broken mainboard. With multiple trashes, he would build one goodie. That's how many "Uncle joe's backyard" repair shops work. Dirty, isn't it?
 
Last edited:

bertz

Joined Nov 11, 2013
327
way to suggest ordering something after I ordered it...
Don't worry about it. One of the pitfalls of these forums is that you can get pulled in several different directions and get more confused than you were before. Based on what you told me, that this will be used for demo and not continuous, you will be just fine. Also the PICAXE chip will operate at 3.5 volts, so no worries there.

I deliberately stayed away from rechargeable batteries, particularly Lithium chemistry because you are on a limited budget and I didn't want you spending additional money on a special charger.

With that having been said, do you have a digital multi-meter? If not you should be able to pick one up at Radio Shack or Harbor Freight for under 5 bucks. The reason is you will have to do a bit of hacking on the MP3 and you will be lost without a meter. But we will cross that bridge when we get to it. Meanwhile I'm working on a wiring diagram to get you started. Let me know when the parts arrive from Jameco.
 

Thread Starter

Blargenth

Joined Apr 30, 2015
45
Well you may be able to rest easy for a while. Most of the parts will either be coming in by july 3rd, or july 6th So it will be a couple of days. The good news is that I'm about half done with the sentry.
 

bertz

Joined Nov 11, 2013
327
Well you may be able to rest easy for a while. Most of the parts will either be coming in by july 3rd, or july 6th So it will be a couple of days. The good news is that I'm about half done with the sentry.
Awesome! I also ordered an MP3 module so I can have hands on when I coach you to make the mods. I will be up at the cabin from July 2 to July 5. Also, I should have the wiring diagram done before I head out. Give you a chance to study & comment.:p
 

Thread Starter

Blargenth

Joined Apr 30, 2015
45
Lookin good. But you really should reinforce the floor with 1/8" lite ply or balsa wood. Both available from your local hobby shop. Use good old Elmer's glue to secure it.
I don't have a jigsaw or any confidence of being able to cut it to the right shape effeciently/manually. But what I'm using is canvas paperboard. Its sturdier than cardboard and lighter than balsa. I think it'll do the job. I've used it for other props before and it has quite a strong structural support for what its made out of.
 
Top