Connect with us

Student Helmet Project

Discussion in 'General Electronics Discussion' started by newb1234, May 24, 2016.

Scroll to continue with content
  1. newb1234

    newb1234

    7
    0
    May 24, 2016
    I am a student and am making a helmet for a class project. I only know basic soldering and am pretty good with computers.

    I would like the helmet to have some cool features like lights and moving parts. More specifically:

    • When you get within 3 feet of the helmet, it turns on EL tape in the left eye and an LED light in the right eye.
    • Two fans in either side of the helmet would turn on
    • Hidden speaker would play one of 3 programmed sentences (I can record the voice).

    The helmet will be hallow and can hold items such as batteries / wires / etc. I would like the battery to last at least a year without being replaced with occasional use.

    Please see attached image to get an idea.

    I don't know enough about electronics to make this happen. Can anyone tell me how I would best set the aforementioned system up? Also, where is the best place to buy the components?

    Thank you in advance for your time.
     

    Attached Files:

  2. meepmeep22

    meepmeep22

    2
    0
    Apr 27, 2016
    A couple questions, Is this helmet going to be used as a saftey device, such as on a bike?
    A arduino or raspberry PI may be a good controller for this project.
     
  3. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    You can buy the components yourself from various suppliers, but you may need to revisit your one-year life cycle for the battery.
    There are some beginner friendly sites that will sell things like the arduino.. ( Sparkfun and Adafruit for example)
    Take a look on there and price out some components.

    You can do this with or without a microcontroller. For example, you can get motion detector which simply toggles an output when it detects motion. This will either directly or indirectly control the lights and sound. Of course, there are a number of sound playback options ranging from handling the audio yourself, to using a module that you can pre-load sounds onto.
    *(You can get holiday/birthday cards that play audio... and some let you record your own sound. You may be able to get a module that randomly plays one of the included tracks.)

    The biggest thing you need to visit though is the expected life of this product... Regardless how you do the motion detection, there will be a constant draw on the battery. Then once motion is detected, the draw will increase a lot more!
    So.. once you find some parts, write them down and try to find the expected draw of them. We can use this number to estimate what kind of battery or battery pack you may need for the expected run-time.
     
    newb1234 likes this.
  4. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,839
    Jan 21, 2010
    There are many small PIR modules available very cheaply. They will detect movement from nearby warm bodies. They may be the easiest way to detect people.

    When you say "hollow", are you talking about the void normally filled with a cranium?
     
    newb1234 and Gryd3 like this.
  5. newb1234

    newb1234

    7
    0
    May 24, 2016
    Hi Steve,

    Thank you for your reply, yes by "hallow" I mean, the area filled by a cranium. This helmet will never be worn- it will be sitting on a desk for show.
     
  6. newb1234

    newb1234

    7
    0
    May 24, 2016
    Hey Meepmeep,

    Thank you for the heads up on the Arduino... I am just starting to learn about that. Is it easy for a beginner to learn? It will not actually be used at all... it is just for show / sitting on a shelf. I came to this forum to find out:

    1) what do I need?
    2) where can I get it?
    3) how do I hook it all up?

    I thank you in advance for your help!
     
  7. newb1234

    newb1234

    7
    0
    May 24, 2016
    Hey Gryd3,

    HUGE help man! I really appreciate your thoughtful response here. I am happy to revisit the battery life... I just want it to go for as long as it can and am happy to spend money on a good battery. Can you give me some guidance on some parts? I thought the websites you sent were fantastic, I have been browsing them and can just put on random parts on this thread that I think might work, but I am not sure what I am doing. Do the voltages need to be a certain amount / spec?

    Thanks a ton for your help.
     
  8. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,839
    Jan 21, 2010
    If you decide to go the route of using an arduino to control stuff then you need to do the following:

    1) get an arduino
    2) download/install the development environment
    3) learn how to use the development environment and to write a few simple programs.

    At this point you'll be prepared to start thinking about interfacing the arduino to something that's not on the board already :)

    4) figure out some options of what you can use to do what you want to do.
    5) purchase some (from ebay perhaps)
    6) learn how to use them with your arduino

    The steps 4, 5, and 6 are iterative and you keep going until you have all the bits you need working.

    then (if required):

    7) write software to control all of the various bits and pieces
    8) get a smaller form factor arduino, or something better to embed and implement your solution.
     
    newb1234 and Gryd3 like this.
  9. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    Steve pretty much answered most of your last question.
    You pick sometime to start with and branch out to determine what you need.
    A perfect example here is the use of the type of microcontroller you use. Some operate on 3.3V, and others operate on 5V.
    So... if you decide to use a microcontroller that uses 3.3V, you may find it difficult to also work with the other components (motion detector or audio player) that work on 5V because you will need to convert the signals between 3.3V and 5V. It *can* be done wih additional components, but adds to the complexity of things.
    I really do encourage you to just post the random parts you *think* you need though.
    Do some digging, and make what you feel is a good plan / collection of parts.
    We can voice our concerns and give you tips with the components you picked and point out which ones may not work.

    As far as the argument to use a microcontroller or not... this is up to you 100%. The great thing about a microcontroller is that you can program it to behave almost any way you want without requiring a lot of foresight or redesign of your circuit.
    A perfect example here... is what if you want to delay the sound by 2 seconds, but later decide you want the sound to delay by 5 seconds... or perhaps you want to add a couple more LEDs and make them flash a certain way. If you know exactly what you want to do beforehand, you can usually design the circuit to behave how you want, but when it comes time to change something (even minor) the work you need to do is usually much more time consuming and expensive then just getting a microcontroller. They are great for prototyping things, making one-off projects, or anything really that you may want to tweak or redesign down the road.
    The Arduino that was mentioned earlier is a beginner friendly microcontroller, and while it does not nearly have the efficiency as many others, it's incredibly easy to get started with and does not require a separate 'programmer'. If you feel like you want to learn more about microcontrollers, start with Arduino, then look into things like the PIC, or AVR microcontroller families.
    The Raspberry Pi on the other hand, is considered an SBC (Single Board Computer) and while it is *much* more power hungry than the other suggestions, it has the added benefit of being an actual computer... you can make your program in many different languages, can connect it to a keyboard, mouse, other USB devices, and the internet...

    Let us know what you like and we can move from there... and if you have a large opening you can take advantage of (which is sounds like) you can use almost any kind of battery you want.
    That said... you can use disposable batteries or rechargeable. If you use rechargeable, you can look into starter kits that sell 3.7V Lithium batteries with a charge controller. They should be pretty easy for you to use, and the device could be recharged with a USB cable or small AC-DC adaptor.
    The rating of a battery in 'mAh' or 'Ah' is going to determine how much energy it stores... so we can make a guess depending on the parts you find and will be able to roughly determine how much time the device can *run* before needed new batteries or a recharge... if the device is switched 'off' it gets a little trickier because some batteries suffer from 'self-discharge'
     
    newb1234 likes this.
  10. newb1234

    newb1234

    7
    0
    May 24, 2016
    OK great Steve, thanks that sounds like a plan... I will start looking into Arduino. Much appreciated.
     
  11. newb1234

    newb1234

    7
    0
    May 24, 2016

    Gryd3,

    You are a gentleman and a scholar. Bless you. This information was truly valuable, and you explained it perfectly to someone who knows nothing about this stuff. After reading your posts I have a bit of a better grasp on things.

    Here is the list of items I was considering:

    Arduino starter kit (x1)

    PIR motion sensor Sensor uses [email protected] (x1)

    Arduino music / sound shield (x1) (also considering this sound shield instead)
    (Note, description states: “The speaker is rated for 1W so if you want you can even stick a small amp between the shield and the speaker to boost up the volume “) would this amp suffice?

    Lithium Ion Battery 3.7V 6600mAh (x1)
    This was the biggest battery I could find on aforementioned recommended sites... open to other suggestions here.

    5 volt case fan (x2)

    5mm red LED's 20mA 3000 mcd (for right eye sockets) (x2)

    Sideglow cable: SGS4 4mm or 5/32" (for the left eye glass- see attached drawing). (x1)
    I figured the sideglow cable would be better than EL tape or LED's since LEDs might be “spotty” over a large eye lens, and EL tape will be a battery drain. Happy to forgo this solution for something better...

    Speaker .5W (8ohm) (x1)

    Some questions:
    • Is there an Arduino shield I should consider that has multiple capabilities that could consolidate some of these functions? If so, any recommendations?
    • How do I know if a component is compatible with Arduino?
    • Is there a better battery I should buy?
    • Any other components / features you recommend? (on / off switch, etc.?)
    I am happy to replace any component on this list. I don't know what I am doing so I just randomly put these on here. Anyway your professional experience is appreciated as always!
     

    Attached Files:

  12. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    If you want to save some money, the Arduino starter kit can be swapped out for just an arduino.
    http://www.amazon.com/Arduino-UNO-b...e=UTF8&qid=1464548088&sr=8-1&keywords=arduino

    The starter kit will include some additional components and a book to provide you with some lessons into using an Arduino... If this is worth the additional $50, then by all means, jump on it. The difference in price can provide you with a wide range of miscellaneous parts. The most common you will be using to connect the arduino (or other microcontroller) to other devices will be resistors and transistors which you can buy handfuls of for only a couple dollars ;)

    Please note that the Arduino UNO is a 5V device... so it needs 5V for power, and for signalling. Some advanced users can actually alter the Arduino to run and provide on 3.3V, but this may not be a very friendly beginner project. The details are here : https://learn.adafruit.com/arduino-tips-tricks-and-techniques/3-3v-conversion
    Alternatively, there are dedicated components that will be able to convert the signalling between 3.3V and 5V, or if there are only a couple pins you can Do-it-Yourself pretty easily.
    A pair of resistors setup as a 'voltage divider' can easily knock 5V down to 3.3V for signalling, but this is a onw-way solution. Signals can go from 5V to 3.3V with this setup, but can't go back on the same wire without additional parts!
    You could also use a transistor... you can trigger it with a 3.3V device, and in turn, it will provide 5V to the 5V device... again, this is only one-way though.
    Both of the simple DIY methods I mentioned are not for 'bi-directional' signals, but is fine for one-way communications.

    As far as the PIR motion sensor is concerned, I double-checked. It currently runs on 5V, but can be converted to 3.3V if you bypass a component on it. As-is, this will be fine with the Arduino you linked without requiring any alterations or 'conversions' .

    For your audio, I think you should bypass the 'GinSing' product, as it's focused more towards the synth of sounds than playback and would require you to code your arduino to produce the sounds you want instead of simply recording some tracks you want to play back.
    Additionally, the audio component you found is out-of-stock, but I linked this one for you instead : https://www.adafruit.com/product/1788
    It's got a stronger amplifier on-board, so you don't need an external/additional amp. (The amp you linked was actually... only an amplified microphone... If you still have any interest for an amplifier by itself... look here : https://learn.adafruit.com/adafruit-tpa2016-2-8w-agc-stereo-audio-amplifier)

    Good find on the battery. It's a 6.6Ah pack at 3.7V .. To put this into perspective, a single AA battery runs at half the voltage and provides at most 2Ah. The same size back made of AA batteries would be 6Ah, but only 1.5V .. That battery pack you found has more than twice the power packed in the same size.
    As far as batteries are concerned though... they are usually picked last. The project is first designed and planned with the goal of keeping consumption low. Once the project is designed, the draw is calculated or measured, and a battery that matches the desired performance is then chosen. Considering you have so much spare room inside the helmet though, you have tons of options... Regardless of the method though, if you opt for rechargeable batteries, you should locate a charger for it as well ;)

    ** You will need a 'boost-converter' if you choose this battery. Most of your parts are all 5V, but your battery won't provide that... A small boost converter will take the 3.7V from the battery and ramp it up to 5V. This conversion is not free though... The converter will draw more current to compensate + additional current to run itself. So a 6600mAh - 3.7V battery will behave more like maybe a 4000mAh or 4500mAh - 5V battery. This is not a problem though. It's just how things work. If you get a battery with a higher than normal voltage, you would use a converter to bring the voltage back down... and if you happen to find/make a 5V battery, you run the risk of the 5V dropping as the battery is used... At least with using a converter or regulator and a battery that is higher or lower, you can make sure that 5V will *always* be provided to your product.

    Lighting is entirely up to you ;) You can't really go wrong with it. Just make sure you can power the inverter for the EL panel, and the LEDs simply require resistors.

    The speaker... oh the poor speaker... You found a 1W amp, and plan to connect a little 0.5W speaker to it? You can do this, but if you turn up the volume, you may hurt that little guy ;) You should oversize the speaker. Remember the rating on an amp is how much it can put out, and the rating on the speaker is how much it can handle.


    Great picks to start. I would suggest a couple little tweaks as mentioned in the notes above. Please also note that you can be creative with your power supply and devices power needs...
    For example:
    You could use a 12V lead-acid battery to power the project. Connect it to a 5V regulator for the arduino, sensors, and LEDs.
    At this point... you have 5V *and* 12V available for your audio amp and fans. You simply use your arduino or motion sensor to trigger a transistor which will handle providing the 12V to the fan and amplifier! :D

    Because this is a power concious project, you will most likely design it so that power is *not* provided to anything except the motion sensor and perhaps the arduino. Once triggered, power will be provided to the peripherals, then after a short delay (less than a second ... let them power up... ie, the AMP) you can control them. Then you can shut the parts down after their work is done and wait for the sensor again.
     
    newb1234 likes this.
  13. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    On a note about power consumption...
    1.6mA @ 3.3V ... when you use that value to calculate consumption, you find that the motion sensor by itself will last for 4000Hours on the battery pack you found, which is over 5 months.
    This is *without* powering anything else though... I found someone online who had tested the Arduino Uno, it will draw 46mA 'idle' or 34mA 'sleep' .
    So... If you decide to power the Arduino (even if it's asleep) you will find that the same battery that lasted over 5 months, will die in a week.
    This is where you will either need to be creative, or where you will get a BIG battery, or settle for an AC-DC power adaptor that you can simply plug in a wall. (You can still have a small battery if you want it to be portable, but at least you know the expected battery life. with the pack you picked.)

    The focus here will be designing a latch... The motion detector should connect to to this latch which will normally be 'off' . Once the signal wire on the motion detector goes 'low' it will trigger this latch which will then stay on indefinitely and power the other components. The arduino can then force the latch back 'off' killing power to itself and the other parts. Rinse and repeat. The arduino in this instance would power up, then carry out it's tasks before it turns power off to itself and other parts.
     
    newb1234 likes this.
  14. newb1234

    newb1234

    7
    0
    May 24, 2016
    Wow, Gyrd3 this is extremely helpful yet again. You are an amazing teacher! Based on your responses here, it seems I may have bit off more than I could chew before I really understood anything about power consumption, and it seems like the current setup is too ambitious.

    My primary goals are to:

    1) Have a **noticeable action** happen when you walk up to the helmet, that automatically gets triggered within a certain range.

    2) Have the aforementioned ability on the helmet for a minimum of 3 months without recharge. (ideally longer)

    **The “noticeable action”** can be something much more simple than what I have previously suggested. I am happy to forgo Arduino, fans, sound, etc. in order to have something stable that is activated by motion, for a longer period of time. Note that this helmet will be sitting on a shelf, away from a outlet.

    So, of course your great info has lead to more questions:
    • If the Arduino is only powered for a week before the battery dies, is there a way around that?

    • Would battery life be extended to at least 3 months if I reduced the project- maybe just LED's, and a motion sensor? (not sure if this can be done without Ardunio?)

    • How do I calculate how long the battery will last with different components?

    • Do you need to use a specific resistors for specific voltages? Or do resistors behave universally, taking any volatge down from x volts to y volts? In other words, do I need to buy one type of resistor to go from 12v to 5v, and another to go from 12v to 3.7v?
    Thank you again Gyrd3 for your invaluable help. You have saved me a ton of time and heartache here.
     
  15. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    The only way around the Arduino killing the battery in a week is to use an external component to keep it disconnected from power. If it's not connected it won't draw anything ;)

    'Stand-by' Battery life can be extended by thinking ahead with the design and *only* powering the essentials. The essential components will trigger power to the other components. In this way, the helmet could sit idle for months.
    That said... the 'active' time will depend entirely on how much time the rest of the components are powered up and how much they draw. The 1W or 3W amplifier / sound system for example would drain that battery in only a few short hours if it was left on. You will be balancing the active vs. standby time. It may sound difficult, but if your device runs for 5 seconds, and runs maybe 10 times a day, the over-all draw will be quite low. (Combined on time is 50 seconds a day... and if you can manage to run the amp constantly for 4-6 hours, you could keep this behaviour up for the 3+ month mark you are looking for.)

    This is a little black magic. Batteries have a tendency of dying quicker if you pull harder from them (of course...) but this affects their mAh rating... in a perfect world, a 2000mAh battery can provide 2 amps for an hour. or half an amp for 4 hours! the mAh rating is simply a mathematical equation of Amperage * Time(hours) ... but this equation get's thrown off balance when your amperage draw is really high.
    For estimating run-time, you first find the expected draw of a component.. for example, the Arduino above draws 46mA when 'idle' . So You could estimate that a 6600mAh battery would last 143hours. ( 6600mAh / 46mA = 143h )
    Remember this is *perfect world / theory* numbers... So this would be *up to* 140hours.
    That said... the battery you found was 3.7V, and we need 5V ...
    The conversion for switch-mode copnverters is simple. VoltageIn * CurrentIn = VoltageOut * CurrentOut * Effeciency
    So our 5V 46mA arduino, would pull at least 62mA from the 3.7V battery if the converter was perfect.
    I'm going to say it's only about 80% efficient though, so the arduino will pull 77mA. Using our new number the *most-likely* life span of the arduino with a 3.7V 6600mAh battery is only 86 Hours.

    That does not sound so nice anymore, does it? Remember that this time is only while the arduino (or other items) are actually powered up. Keep them off as long as possible and you can stretch that time out over the 3 months you require.
    Normal 3mm and 5mm LEDs often draw about 15-20mA each.
    I'm sure you remember those little battery powered LED keychains. They usually have a single battery with approx 200mAh capacity. That's peanuts, but they often still work for many months with light use.


    Ahh... the resistor question is a loaded question.
    A resistor is measured in Ω. And the same value resistor can be used with 50V or 1V.
    Now... if you want to bring 12V down to 5V, you will need to do some math.
    Here is the formula you need : Voltage = Current * Resistance
    Well... if we have a resistor rated in Ω, and we want to drop 12V down to 5V, then we need to drop 7V across the resistor. The problem here though is Current!
    If we don't know the current, we can't simply use a resistor because as the current changes, so will the voltage across our resistor which will vary the voltage we wanted to get. Because of this, 'voltage regulators' are used instead of resistors to provide different voltages to components (or groups of components) where the current may vary as it is used.
    For other things, like signals, or more simple components, resistors are a viable option.

    There is one more method for this though... but it is only ever acceptable for *very very low* current draws.
    You can use a pair of resistors to form a voltage divider.
    +12V ----- 7.5kΩ --(tap)-- 5.6kΩ ----- Ground (Negative terminal)

    In the above example, there is a total of 13.1kΩ resistance, and 12V provided to it.
    The formula I shared will tell you how much 'current' is being drawn from this example. It will also tell you how much voltage is at the (tap).
    This is called a voltage divider, and is not stable when the tap is connected to something that draws current. It's suitable for connecting to sensor or microcontroller input because they often only draw a fraction of a mA.
     
  16. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    A very simple approach to what you want to do would be triggering a relay with the PIR sensor. The relay will then provide power to everything else.
    You can use a relay if you want, but it draws more power when it's active than using a FET.
    The desired result is still the same though.

    Power -> PIR Sensor -> FET/Relay Trigger
    Power -> FET/Relay -> everything else

    If the PIR sensor does not directly hold the FET or Relay on long enough for the desired affect, you can easily loop-back something from the 'everything else' section to hold the Relay/FET on while it's doing it's thing.
    In this way, both the PIR and 'everything' else can hold power on, but only the PIR can actually start the process. Once everything else 'let's go', it will be in the lowest power state possible.

    This is actually used quite often. Your cell phone for example. The screen is always connected, but it's only ever powered up when it's needed. The difference here though is that the CPU inside the phone is always connected to control this. We can't rely on a CPU or microcontroller to turn things on because it draws too much...
    That said... If you are feeling a little brave, you can look at the 'PIC' microcontrollers... They have some chips that can deep sleep and draw less than a mA ... which is HUGE improvement over Arduino drawing 30-40mA 'sleeping'.
    The only catch is that the PIC is a little more involved. You need a programmer and the chip, where Arduino combines those together...
     
  17. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,839
    Jan 21, 2010
    you also may be able to reduce the arduino current by using a slower crystal. Do they work at 32kHz?
     
  18. BobK

    BobK

    7,682
    1,688
    Jan 5, 2010
    If the Arduino requires 34mA in sleep, it is not usable on this project.

    My favorite small PIC microcontroller 12F1840, running at 5V, uses 600μA at 4MHz, 3.4mA at 32MHz and as little as 6μA in sleep mode. Of course I would run it at 3.3V off the LiIon battery, at which it draws even less. It is doubtful you need even 4MHz.

    You could probably even run it at 32KHz, which uses 6.8μA!

    A coin cell CR2032 would run it for 29,000 hours. (If nothing else was using power.)

    Bob
     
    Last edited: May 31, 2016
  19. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    100% Agree Bob, but this project may not even *require* a microcontroller.
    The motion sensor has an active low output that could trigger any manner of external component.
    Thanks for brining up the PIC again ;) I love those little guys.
     
  20. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,839
    Jan 21, 2010
    See here for an article describing how to get an arduino to run on 43uA (or less -- in the comments someone is reporting 26uA, and another 4.6uA).
     
    Gryd3 likes this.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-