Arduino Uno Pin Compatible PIC Board, bad idea?

Discussion in 'Embedded Systems and Microcontrollers' started by Travm, Sep 15, 2018.

  1. Travm

    Thread Starter Member

    Aug 16, 2016
    228
    18
    I'm trying to learn about computing, PCB Design, and C programming. I've built some things, had a couple very simple PCB's made, and I'm looking for something to make.
    I've got most of the way through designing a board schematic and I'm just feeling like its maybe a dumb idea. Design as it exists today is for a PIC18F24K40.
    I am not very creative. Also I'm not trying to make something better, just make something that works so I can learn. I thought this is a good idea because after I've built a couple I can play around with the software and see if I can port Arduino sketches or maybe make it compatible with the Arduino software. Or maybe use Arduino Hats.

    I started learning with PICs and have never touched an Arduino.

    Another project i've half started is just a dev board similar to the curiosity line, but I feel like that's lame because they already exist and are very affordable.

    Does any of this make sense?
     
  2. dl324

    AAC Fanatic!

    Mar 30, 2015
    7,211
    1,670
    The first thing you should do is to decide what your objectives are. You don't have to combine them all into the same project. Doing so may just be an exercise in frustration because, as you noted, you're in the early stages of learning.

    I too was interested in microcontrollers and didn't know where to start (because I didn't want to learn something that soon became obsolete or inferior to other solutions). It was a classic case of paralysis by analysis. When you're talking about PICs, you have to learn and use their development environment. If you make that investment in learning, that might lock you in.

    Do you plan to develop things that require real time performance? If the answer is no, I'd go with something like Raspberry Pi. It runs Linux, there's a lot of support infrastructure, it supports many languages, it has a standard interface so you can buy or design "hats", and you don't get locked in to some proprietary IDE.

    I'm an EE by training who learned to program years before being able to design circuits. I chose to buy an ARM based microcontroller that runs Linux. That leverages my more than 30 years of experience with Unix, programming in about a dozen different languages, and electronics. In my case, I had no desire to try to build something comparable to what was commercially available.

    The SBC I bought was $9 (a Kickstarter project that is now defunct). It included a 1GHz single core ARM processor, 512MB memory, 8GB FLASH, WiFi, Bluetooth, Debian Linux, and more GPIO than I needed. There was no way that I could build something with the same capabilities for less than $100.
    upload_2018-9-15_11-58-46.png
    EDIT: Added picture

    I built a scrolling clock with a single 5x7 LED matrix. Not running a real time OS means that the display occasionally freezes briefly while the OS attends to other tasks. It doesn't really affect the usability of the clock.
     
    Last edited: Sep 15, 2018
    -live wire- likes this.
  3. Travm

    Thread Starter Member

    Aug 16, 2016
    228
    18
    I have already bought into the IDE, I have a PK3, and a well stocked bin full of parts. Originally I was designing a very simple proportional hydraulic valve controller, when my company was sold, and promptly relocated, ending my employment. Now I have all this stuff and still a desire to learn. I'm a mechanical tech by trade. I end up working with or around electronics enough that I want to know the nuts and bolts of it, like i do with mechanical systems.

    I really like your term paralysis by analysis. Thats my problem right now. Ive literally spent weeks (over the past year) studying data sheets, and reading things, constantly changing ideas as i read more, never finishing anything. I have about 10 half completed KiCAD projects that I've intended to use a learning tool. Plus side i'm pretty good at KiCAD now.

    Just when it gets to finishing it, I end up buying boards, spending some money, I dont want to end up feeling like i made a bad decision. At some point I just have to do it though.
     
  4. dl324

    AAC Fanatic!

    Mar 30, 2015
    7,211
    1,670
    A colleague once told me that making a bad decision is better than making no decision. I'm still not sure I agree with that sentiment.

    The SBC I bought is quickly becoming unavailable. But, because I chose something that ran Linux and my program is written in C, moving to RPi is just a matter of learning how to access the GPIO. Initially, I wrote my program using the sysfs (file) interface for the ports. That was more than sufficiently fast for the clock.

    I did some experimenting and found that the sysfs interface topped out at around 150kHz and decided to learn about bit banding to push it higher. By mapping the registers for the I/O's into my program, I was able to increase speed to about 5MHz.

    I still entertain thoughts of doing projects with Microchip or Atmel microcontrollers, but still haven't gotten to the point where I'm going to take it beyond just thinking about it.
     
  5. Travm

    Thread Starter Member

    Aug 16, 2016
    228
    18
    Thats a CHIP board right? I almost bought one of those on several occasions. I'm rather dissapointed they folded. It looked like a fabulous deal.
    Real time programming is where I started, so I guess I'm just growing with that.

    As for buyers remorse. Ive already purchased 30 boards, only 20 are reasonably usefully, and even at that they are more universal breadboard types with a power / gnd bus. The first 10 of the useful 20, all have very small through holes, and only fit some components.
    So I've already wasted enough money on this endeavour.
    Problem is i dont really have an application anymore, but I still want to continue learning.
     
  6. dl324

    AAC Fanatic!

    Mar 30, 2015
    7,211
    1,670
    Yes. I backed the Kickstarter project with one C.H.I.P. and a VGA video adapter. Then bought 5 more during their first Cyber Monday sale (they always had quantity restrictions). My reasoning was that I was late to the RPi wave and decided to start with something new.

    I would have bought dozens more if they hadn't gone out of business. There's still a small quantity available, but no future because their price was too low. The design is open, but no one can sell them for $9. PiZero is $5, but you need to add about $20 worth of stuff to get the capabilities of a $9 Chip.
    I like Chip and similar SBC's because they run Linux and support many languages. I'm more interested in designing and building projects than learning IDE's.

    Building my clock using PIC was a non-starter. Since my SBC is connected to my network, it knows how to set and update local time. Doing that with PIC would have required more work (adding a WiFi hat, figuring out how to connect to the network, figuring out how to get time from a time server).
     
  7. DNA Robotics

    Member

    Jun 13, 2014
    389
    145
    I think its a good idea. PIC fans would be able to use the many, cheap I/O, sensor, LCD and relay shields (hats) easily.
     
  8. DNA Robotics

    Member

    Jun 13, 2014
    389
    145
    If there is a standard pinout, or even a few for the many I2C sensors, you might add those too. Accelerometers, GPS, etc. To keep them within the footprint of your board.
     
    Last edited: Sep 16, 2018
  9. Travm

    Thread Starter Member

    Aug 16, 2016
    228
    18
    What sensors?

    The Arduino Uno has a std pinout and to be honest I've never really looked into Arduino but I believe lots of companies and individuals make hats (edit, oh yah, arduino people call them shields will correct in future) that just fit into the Arduino.
    I have another design partly finished that has a couple mikrobus ports on it, but mikrobus modules are more closed off and expensive it seems. Also the microchip curiosity boards have those.

    I'm also not sure why I dislike perfboard so much. I could put most of this on a perfboard and likely get reasonable results. I think I just enjoy the PCB design. It reminds me of my mechanical CAD maybe.
     
    Last edited: Sep 16, 2018
  10. John P

    AAC Fanatic!

    Oct 14, 2008
    1,722
    256
    There has been a thing called a "PICDuino" which has a PIC processor on a board like the Arduino. You can look it up.
     
  11. Travm

    Thread Starter Member

    Aug 16, 2016
    228
    18
    And so there is...
    Ive seen the Pinguino project before, and didn't really think I liked it, cant remember why. But the physical Arduino Uno R3 board I haven't. I'm sure i specifically searched for that too.
    Anyway thanks for the pointer.
    This isn't a money making endeavour so I may still forge on. Eventually I just have to pick one of my projects and bring it to fruition, otherwise Im just perfecting being a quitter.
     
  12. nsaspook

    AAC Fanatic!

    Aug 27, 2009
    4,804
    5,189
  13. Travm

    Thread Starter Member

    Aug 16, 2016
    228
    18
    Thats super interesting, and I would have possibly bought one just now, but it seems they are all retired...
    Its doubtful that i'm going to come up with an idea for something that no one else has thought of, but I want to go through all the steps from concept to completion. For science.

    Edit, some more searching and I found them for sale. Expensive. But i think this confirms its not a bad idea. I'll keep on it then, I can get 30 boards for the price of one of those kits, or 10 for considerably less than. I expect I already have all the required components in one of my bins.
     
  14. Travm

    Thread Starter Member

    Aug 16, 2016
    228
    18
    Also as I work through this it appears my choice of PIC wasnt ideal, the pic18f24k20 only supports 3.3v. Many Arduino shields I would expect they want to operate at 5v. I think loading the board up with zener diodes on all the IO would be a bad idea.
    I only chose that chip as I have some, and they are screaming fast as far as 8-bit PICs go.


    * Correcting bad information, PIC18F24K40 is the chip I'm working with, and is full range 2.8V to 5.5V. I had the wrong data sheet open *DOH.
     
    Last edited: Sep 17, 2018
  15. DNA Robotics

    Member

    Jun 13, 2014
    389
    145
    These little boards are what I was talking about. There are a lot of them with I2C.
    IO boards.jpg
     
    Last edited: Sep 16, 2018
  16. nsaspook

    AAC Fanatic!

    Aug 27, 2009
    4,804
    5,189
    I've used their uC32 board with the I/O shield for a few quick and dirty projects programmed with MPLABX. The only real advantage of the boards is raw speed as they use a PIC32.
    https://store.digilentinc.com/uc32-arduino-programmable-pic32-microcontroller-board/
     
  17. dendad

    Well-Known Member

    Feb 20, 2016
    2,027
    522
    I was hoping someone would port Marlin across to a MAX32 as an easy upgrade for 3D printers. That is WELL beyond my coding capabilities!
    (Or that MicroChip would make an 80MHz or higher Atmel processor so the old slow ones could just be swapped out.)
     
  18. Philmnut

    New Member

    Apr 16, 2017
    1
    1
    I was reading your desire to learn on several platforms at once. Similarly I have too many interests and not enough time. Creativity is not learned, it just happens. Sounds like you are selling yourself short by minimizing the usefulness of your projects, I do all kinds of "silly" things with arduinos and the pile of related hardware I have gathered. The whole point is not to create something new or useful, by building things that interest you and you learn in the process is priceless. I don't make mistakes once, I can make the same mistake several times but I don't quit, I make useless things, but in the end I have learned something. Creativity is a product of learning, failing and making notes of fleeting amusing thoughts no matter how useless or impractical they are. Don't look for ideas, they will find you.
    Don't give up.
    Phil
     
    Travm likes this.
  19. DNA Robotics

    Member

    Jun 13, 2014
    389
    145
    These are available and they are PIC oriented.

    https://www.mikroe.com/mikrobus
    Mikrobus socket.jpg

    The world’s fastest growing add-on board standard
    mikroBUS
    Smallest number of pins — maximum expandability.
    The mikroBUS socket comprises a pair of 1×8 female headers with a proprietary pin configuration and silkscreen markings. The pinout (always laid out in the same order) consists of three groups of communications pins (SPI, UART and I2C), six additional pins (PWM, Interrupt, Analog input, Reset and Chip select), and two power groups (+3.3V and 5V).

    It's an open standard
    mikroBUS - the add-on board standard that offers maximum expandability with the smallest number of pins. Integrate it into your design and open the doors of thousands of possibilities.

    Adding a mikroBUS socket to your design allows you to utilize the ever-expanding range of click boards™. Sensors, wireless transceivers, audio amplifiers, LED displays and more. It is the simplest way to add maximum connectivity. All the major vendors have accepted the mikroBUS™ standard and added it to their development boards, so join the revolution.

    It just clicks
    Mikroelektronika Click add-on boards are the easiest way to add sensors, human interface, control, or wireless communications interfaces to your design. Based around the mikroBUS interface standard, click boards add incredible capability to any system with ease.
     
  20. nsaspook

    AAC Fanatic!

    Aug 27, 2009
    4,804
    5,189
    That's just a connector standard like many others. It nice because it uses standard vector-board pin/socket spacing. I've used it to make DIY plugin controller interfaces on PIC dev-boards with the mikroBUS connector.
    [​IMG]
    Encoder signal buffer to a motor control system PIC32MKMC. https://www.microchip.com/wwwproducts/en/PIC32MK1024MCF100
    [​IMG]
    The original dev-board pic32MKGP processor was replaced at a SMD rework station.
    [​IMG]

    [​IMG]
    Bluetooth module adapter, analog I/O adapter for RIOT OS development PIC32MZEF. http://www.microchip.com/design-centers/32-bit/pic-32-bit-mcus/pic32mz-ef-family
     
Loading...