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 #1)
  • 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: 30 Oct 2013 6:30 AM Date Created
  • Views 746 views
  • Likes 1 like
  • Comments 4 comments
  • psoc4
  • smarter_life_challenge
  • smarter_life
  • bike_light
Related
Recommended

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

ajkahl
ajkahl
30 Oct 2013

Hi all,


 

I don't yet have the dev kit, but I've been familiarising myself with creator, and checking out a bunch of datasheet and apps notes on psoc.

 

I've also broken my project down into bunch of hardware/firmware blocks and working out what the IO spread needs to be.


 

- LEDs and drive

- Piezo and drive

- Ambient light sensing

- 3-axis accelerometer measurement

- battery/charge system

- touch/proximity

- magnet detection



image


 

Once all of these are in place the will be an overarching set of state machines that should hopefully make it easy to tune features and usability on a prototype.


 

I have started looking at the light detector hardware:


 

- It has to have a reasonably fast response as I would be actively switching it on, sampling, then turning it off and sleeping, so an LDR is probably not the right way to go, a photodiode/transistor more likely

- It doesn't have to be all that accurate (as it'll just be referenced to a threshold based on something like 50-100 lux, ie. the difference between night and day), but it has to be precise, ie. the threshold needs to switch at the same lux today as it will tomorrow, so to that end I'll probably add some temperature compensation, I'm thinking the psocs internal temp sensor and compensation in code will be good enough for this if needed

- Using one of the psocs opamps in a simple current to voltage converter circuit feeding into the SAR adc seems ideal

- A good looking candidate for the photodiode is this guy: http://www.vishay.com/docs/81812/temd6200.pdf (SMD, small, ambient response, pretty cheap)


 

Cheers


 

A.

  • Sign in to reply
  • ajkahl
    ajkahl over 12 years ago in reply to vsluiter

    Hi Victor,

     

    I'll definitely look at getting a MPU9150 even if just to have a play with

     

    Thanks

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • vsluiter
    vsluiter over 12 years ago

    Anthony,

    Today I also suggested to use a digital Accelerometer / Gyro (MPU9150 even has a Magneto on board). Most of those even have a low power mode which still give interrupts when movement has been detected. That will free up some analog inputs.

    As DAB mentioned, the LDR might work fine. With the on-board opamps, you might even create an 'anticipator' circuit (actually wrong naming, but it's a circuit that speeds up settling if you know the time constant of the LDR). One description can be found here: Simple anticipator circuit improves on earlier idea | EDN

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

    Hi DAB,

     

    Thanks for your feedback, certainly a few things to consider. Another reason I might want a fast response on the light sensor is that I don't really want to have to constrain things mechanically in order to shield the light sensor from any LED light leakage. This potentially means the sample of ambient light will need to be taken between flashing (or during a short off period if I have a "constant on" mode).

     

    A.

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

    Hi Anthony,

     

    You have a nice challenging project here.

    You might want to consider using a fuzzy logic filter to help determine a transition from night to day.

    Do you need to consider riding under trees or going into tunnels?  A light sensitive resistor might work just fine, you may just need to be a little creative in writting the code to sample the light intensity and then decide at what point of falling light you want to trigger the device to your dark state.

    You might also consider your timeline for going from light to dark mode.  Think about the issues involved with the transition and the response time you want to support.

     

    Looks fun,

     

    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