Page 1 of 1

Newbie to PIC - distance sensing and chip selection

Posted: Thu Jun 21, 2018 3:48 am
by RKyn
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

Re: Newbie to PIC - distance sensing and chip selection

Posted: Thu Jun 21, 2018 9:36 am
by jremington
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

Re: Newbie to PIC - distance sensing and chip selection

Posted: Thu Jun 21, 2018 9:48 am
by RKyn
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

Re: Newbie to PIC - distance sensing and chip selection

Posted: Thu Jun 21, 2018 2:36 pm
by jremington
You can put an Arduino-compatible processor chip on any PCB that you design, same as for a PIC.

Re: Newbie to PIC - distance sensing and chip selection

Posted: Thu Jun 21, 2018 2:55 pm
by RKyn
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

Re: Newbie to PIC - distance sensing and chip selection

Posted: Thu Jun 21, 2018 5:58 pm
by jremington
Here is a great article on making a "bare bones" Arduino: http://www.gammon.com.au/breadboard

Re: Newbie to PIC - distance sensing and chip selection

Posted: Mon Jun 25, 2018 1:22 am
by teprojects1
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.