Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Project using PIC16f and accelerometer

Status
Not open for further replies.

nidhin1806

New Member
Hai everyone...
I am really new to microcontroller programming etc. I recently took a course on PIC microcontrollers and was impressed by its wide potential. Also i was impressed by the wide application of accelerometer devices.
I would like to do a project based on PIC16f microcontrollers that includes a accelerometer. So all you geniuses please help me by giving some cool ideas.
Looking forward for some good responses... :)

nidhin
 
Why would we do the job for you? without being tough, its your project and you could at least post a complete schematic of your project...

There are a lot of tutorials and datasheet on google, get to know what you are doing in details would be useful.
 
I think he wants an idea of what to make rather than how to make it.

Maybe some type of balancing system, or alarm, or accel input for a user interface.
 
OK! How about a controller? The orientation of the controller relative to the gravitational field controls a virtual object in a PC.
 
Thanks DirtyLude and skyhawk... i liked a project i saw on net about a mouse using it.. it was quite good actually, but need some software and usb connectivity. i was thinking of some simpler and practically useful projects..

thanks..
 
skyhawk, just learn the protocol to communicate with a PS3 controller, they have full axis measurment abilities.
 
Idea

My idea is to create a die (like the one used in playing board games). The number generated on the die is a random number between 1 and 6. The structure is made of a 3X3X3cm (max.) of transparent acrylic (maybe) or glass. Inside each face is attached a 7-segment display which are all connected together so that number displayed on each face is the same (unlike normal die). The number to be generated is decided by the program in the PIC. {I am thinking of using the randi() function which generates a random integer between two limits}. When the cube is held stationary it displays nothing on the faces (or maybe blinks). But when it is thrown and hits the ground, the accelerometer detects the impact and sends a signal to the microcontroller to start generating a number. The output of the microcontroller is connected to all the 7-segment displays.

Please suggest a PIC which has at least 1 analog input and enough ports to connect & 7-segment displays, as using our 16f877 would not be practical and it would be bulky. Also please suggest a suitable accelerometer available here. I have learned to use ADXL32x with PIC. Would that be suitable for this project? Please say if this project can be done with our present knowledge of the subject. My main hurdles are to include the 7-segment display, accelerometer and the PIC in the small cube. Also I would have to supply power to the components through button cells. Is this possible?

The use of this die can be made at casinos where unlike normal dice this cannot be tampered and generates a truly random number. Thus 'Loss Prevention' can be implemented.

Please give your suggestions and ideas.
 
Since all displays will read the same, all you need is 7 outputs. One analog input and 7 outputs can be handled by a chip such as a 16F676.

https://www.electro-tech-online.com/custompdfs/2009/12/40039E.pdf

The microcontroller is available in surface mount packages to save space. Since the drive capability of the PIC is limited you may need a driver for the LEDs to get adequate brightness.

It you use a 3-axis accelerometer you can know which face is up, and you could light only that face. In that case you would need 6 more pins to switch the displays. A 16F690 would be adequate in that case.

https://www.electro-tech-online.com/custompdfs/2009/12/41262E.pdf

What are the smallest 7 segment displays that you have available. The displays that I'm familiar with are rather thick. Putting 6 of them in a cube that size won't leave much room for the other conponentsb
 
Last edited:
A nice 3 axis digital accel is the Freescale MMA7xxx series. I have a few MMA7456 chips here, but it looks like the are end of life'd. The new one looks like the MMA7660 for 1.5g 3 axis I2C. So two wire, no ADC required. If you can order from Mouser, it's just $2.36 in singles. That's pretty crazy considering what I paid a couple years ago for some ADXL accels.

MMA7660FCR1 Freescale Semiconductor Board Mount Accelerometers

EDIT: All of these chip packages are leadless, but since you are talking about an ADXL which is leadless, I'm assuming you wouldn't have any problems with this.
 
Last edited:
Mark, have you ever come across a break out board for one?

I have, but they are $55.

KIT3468MMA7455L Freescale Semiconductor Acceleration Modules & Development Tools

I'd make up a few, but I only have one MMA7456 left and I only order from Mouser about once a year because small orders shipped to Canada cost too much.


Hmm... I just checked it and they have a USPS option again for $8. I don't know. I might make an order before the end of the year and pick up 4 or 5 of the MMA7660's.
 
I don't want to cost DirtyLude a PCB sale, but if you want an easy to work with 3 axis accelerometer it's hard to beat this tiny pre-made PCB for $14.95;

**broken link removed**
Pololu - Accelerometers & Gyros
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top