Newbie to PIC - distance sensing and chip selection

Find out how to setup your programmer's software and how to solve many common problems.

Moderator: phalanx

Post Reply
RKyn
Posts: 4
Joined: Wed Jan 18, 2017 6:43 pm

Newbie to PIC - distance sensing and chip selection

Post by RKyn » Thu Jun 21, 2018 3:48 am

Hello,
I am hoping that I am posting in the right place, apologies if not. I have just started playing around the microcontrollers etc, and have a little project in mind for which I think a PIC microprocessor would be ideal. It involves creating a bespoke PCB that is as small as possible (ideal size is 4cmx2cm as a maximum) containing as much of the electronics as possible, with solder pads around the sides for wire links.

It will fit in a small model car, and as part of this, I want to be able to sense the distance to the vehicle in front or any obstacle, with some form of mini distance sensor. However, all the sensors I have looked at seem to just trigger within a set distance, rather than being able to establish what the distance is and pass back to to the PIC. Can anyone point me in the right direction as to what I am looking for?

Also, I have played around with Ardunio before but for this project needing to go on to a very small bespoke PCB, I'm looking at PIC - but are there any rules or guidelines on choosing the best PIC, or is it literally just a working out which one has what is needed in terms of analog and digital inputs, PWM command etc.. and going for the first one? My requirements are controlling a small motor, ability to light LEDs and make them flash and to read/write data via a radio link. Any help, advice or direction would be appreciated.

Finally, I appreciate this is something of a personal preference question, but what software development tools are people generally using for PIC processors?

Thanks in advance,
Rick

jremington
Support Volunteer
Posts: 2275
Joined: Fri Jun 15, 2007 9:41 pm
Location: Eugene, Or

Re: Newbie to PIC - distance sensing and chip selection

Post by jremington » Thu Jun 21, 2018 9:36 am

Pololu has an excellent selection of analog distance sensors: https://www.pololu.com/category/189/pro ... ge-finders

I use MPLAB for Pic programming, but now find Arduino much more convenient, much easier to program and far more powerful. You can't beat the Pro Mini for price, size (3.5 x 1.5 cm) and performance: https://www.ebay.com/itm/New-Pro-Mini-a ... 1419243503

RKyn
Posts: 4
Joined: Wed Jan 18, 2017 6:43 pm

Re: Newbie to PIC - distance sensing and chip selection

Post by RKyn » Thu Jun 21, 2018 9:48 am

Thanks for your response. I'll take a look at Pololu, not come across those before. I have used Ardunio before, but as the microprocessor will need to be mounted onto a bespoke designed PCB, I don't think they are an option, although happy to be proved wrong, if anyone can enlighten me!

Rick

jremington
Support Volunteer
Posts: 2275
Joined: Fri Jun 15, 2007 9:41 pm
Location: Eugene, Or

Re: Newbie to PIC - distance sensing and chip selection

Post by jremington » Thu Jun 21, 2018 2:36 pm

You can put an Arduino-compatible processor chip on any PCB that you design, same as for a PIC.

RKyn
Posts: 4
Joined: Wed Jan 18, 2017 6:43 pm

Re: Newbie to PIC - distance sensing and chip selection

Post by RKyn » Thu Jun 21, 2018 2:55 pm

Ah, that I wasn't aware of. I though Ardunio processors were all self-contained on their own PCB boards. This may require further investigation! :)

Thanks for that.
Rick

jremington
Support Volunteer
Posts: 2275
Joined: Fri Jun 15, 2007 9:41 pm
Location: Eugene, Or

Re: Newbie to PIC - distance sensing and chip selection

Post by jremington » Thu Jun 21, 2018 5:58 pm

Here is a great article on making a "bare bones" Arduino: http://www.gammon.com.au/breadboard

teprojects1
Posts: 51
Joined: Sat Jan 21, 2017 1:28 am
Location: Lahore
Contact:

Re: Newbie to PIC - distance sensing and chip selection

Post by teprojects1 » Mon Jun 25, 2018 1:22 am

RKyn wrote:
Thu Jun 21, 2018 2:55 pm
Ah, that I wasn't aware of. I though Ardunio processors were all self-contained on their own PCB boards. This may require further investigation! :)

Thanks for that.
Rick
Yeah you can easily get the microcontroller out of Arduino UNO and can use to alone. But you have to design its basic circuit. Arduino UNO uses Atmega328. So, you just need to design its basic circuit and then take your atmega328 out of arduino uno and place in your circuit.

One more thing to note here is that Arduino UNO and Atmega328 Pinouts are different so you must have a look at them.
If you need any help in Engineering Projects | Arduino Projects you can contact me !! Introduction to PIC16F877a

Post Reply