element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Smarter Life
  • Challenges & Projects
  • Design Challenges
  • Smarter Life
  • More
  • Cancel
Smarter Life
Blog Smarter Life Challenge: Smart Bicycle Light (update #7)
  • Blog
  • Forum
  • Documents
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: ajkahl
  • Date Created: 18 Dec 2013 9:53 AM Date Created
  • Views 850 views
  • Likes 0 likes
  • Comments 2 comments
  • psoc4
  • smarter_life_challenge
  • smarter_life
  • bike_light
Related
Recommended

Smarter Life Challenge: Smart Bicycle Light (update #7)

ajkahl
ajkahl
18 Dec 2013

PCAs, Psoc hardware design


 

I received the proto boards a few days ago, I've assembled one as a shield for the pioneer kit (in the process testing out my new IR reflow oven which worked really well). I've populated my 'Plan A' design and so far code-wise it's all looking pretty good.

 

image

 

Over the next few weeks I'll be building up the code base in a more formal fashion, bringing in all the bits and pieces I've already tested and getting stuck in to the behaviour and power management.

 

 

There will be 4 top-level operating modes:

 

 

- Sleep: hall sensor in-active, or charge complete. This is the lowest power state and the one the light will be in when shipping or most times when not mounted to the bike/helmet

- Idle: hall sensor active, but daylight or not moving. In this mode the light is still off, but more power/time is spent trying to sense when to shift to active mode

- Active: hall sensor active, dark, and moving. The LEDs are on in this mode, there are a bunch of sub-states associated with this (eg. front or rear mount - colour, type of flashing)

- Charging: when plugged into USB with a battery requiring charging. In this mode the battery state will be displayed on the LEDs, when charging is complete the light will revert to sleep mode.

 

I've also decided to ditch the body touch sensing as a user input in favour of tap gestures instead. I've still not convinced myself entirely that I need a user input, but in either case tap gestures come for free (accelerometer) and I can always leave it out..

 

 

This is pretty much where the Psoc hardware sits right now, I'll probably decode the charger status inputs and combine a few sources into a single wake-up just for the sake of it (could all be done in code of course..)

 

image

image

  • Sign in to reply
  • ajkahl
    ajkahl over 11 years ago in reply to DAB

    I think I'll only need one gesture (to cycle through the flash modes), so I'll make it a double tap, meaning pulse amplitude, duration and spacing thresholds can be tuned to not match anything else in the normal case, maybe if you drop it and it bounces once... in any case it's not a critical function ie. it's not going to turn the light off if you happened to get an erroneous tap gesture while riding along. Compensation could be done as you say, but if you think about how it's used perhaps I could just disable the tap functionality when the background level is high (eg. when riding), I'd think the user is unlikely to be changing the flash mode at this time... and it's probably not a big deal as far as functionality goes to impose this restriction anyway. The great thing about all of this is that it can all be setup and detected within the ADXL345, so all my software should have to do (besides the setup/tuning) is look for a flag.

     

    Thanks as always for your thoughts.

     

    A.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 11 years ago

    Hi Anthony,

     

    Have you considered that bumps in the road could cause false commands to your circuit?

    You can probably get around this with an active background level compensation algorithm, but it will still be a matter of signal to noise ratio.

    Luckily you can set up your threshold to work for hard taps.  Just don't hit any big bumps. image

     

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube