Skip to main content

PC interface for Arduino Uno - Part 2

Arduino Uno – PC interface part 2

  1. The project
  2. The Hardware
  3. The Embedded software
  4. The PC Developer software
  5. Resources and where to get them

The project

In part 1 we looked at how you can create a Flowcode Embedded program and a Flowcode PC developer program to create a PC interface for an Arduino.

In part 2 we are going to look at how you can expand on this to develop more sophisticated electronic systems for test and control based on low-cost hardware – in this case an Arduino Uno. Here is the control software:

he executable software written in Flowcode PC Developer

Figure 1 – The executable software written in Flowcode PC Developer

The hardware

hardware based on Arduino Uno

Figure 2 – the hardware based on Arduino Uno (and yes - its all mounted on a bit of spare plywood I had in my garage)

On the panel I have an Arduino system wired up.

  • There are 5 outputs, indicated by LED, connected to digital pins 9 to 13.
  • We have 5 sensors, in this case simple potentiometers, connected to A0 to A4
  • There are 5 inputs, just switches connected to digital pins 4 to 8
  • And we have a motor connected to D3 which is one of the Arduino’s PWM outputs.

The circuit diagram is as follows:

circuit diagram

Figure 3 – circuit diagram

Of course, this is a demonstration: you can modify the hardware and change the potentiometers for sensors in your system be it voltage, current, pressure, or temperature. Similarly, you can use the switch inputs for your control panel or logic levels in your test bed, and you can use the LED outputs to control relays or solenoid valves. The resources section at the end of this video shows you where you can get the programs from.

The Flowcode embedded software

In part 1 we showed you how to construct an embedded program step by step from scratch. The problem here is that there are many variations of functionality that different users need from a hardware interface – simple input/output for sure, but also you might want to send I2C commands, SPI commands, Using motors with PWM, use servo motors and lots of other functions.

There is potentially a lot of programming work for you here so what we have done is we have made a general-purpose program and we have wrapped up all the functionality you might need into that program.

This includes a UART (as in program 1) a One wire interface, servo controllers, motors controllers and so on. It’s a very flexible panel. The program is well commented and you can download this for free, understand how this has been put together and customise it for your needs.

embedded software

Figure 4 – embedded software

The Flowcode PC Developer software

The Flowcode PC developer program allows you to create an executable file that you can distribute free of charge. This controls your Arduino via USB. You can modify and distribute this program free of charge.

On the panel, you can see the Human Machine Interface components. In this case, we have 5 each of: control switches, indicators, and dials. You can easily modify this by selecting an item and adjusting the properties. You can also bring on new components like graphs and additional switches, displays etc.

PC Developer software

Figure 5 – PC Developer software

The program is too complex to go through it step by step but it is well commented and you should be able to understand how it works.

Resources and where to get them

The Flowcode Embedded files and the Flowcode PC Developer files are available free of charge from the Flowcode web site:

https://www.flowcode.co.uk/app-developer/free-apps/

General Purpose I/O Board - PC Developer Slave

Flowcode for Arduino is free of charge for makers, but we ask professionals to pay for the software to help pay for its continued development.

Buy Flowcode: https://software.rs-online.com/product-category/software/

Flowcode wiki: https://software.rs-online.com/support/

Buy_Flowcode_Now_13bf479276d2bce04983a199e9c67a7473de6870

About Flowcode

Flowcode allows those with little electronics experience to develop complex electronic projects based on microcontroller technology. Flowcode is a is a brand of Matrix TSL: the UK’s leading Engineering Education company. Flowcode has been under continuous development for more than 25 years and works with more than 1,500 microcontrollers including PIC8, PIC16, PIC32, AVR, ARM, Arduino, ESP, and RPi.

Copyright 2024 Matrix TSL

www.flowcode.co.uk

John Dobson is the manager of the Flowcode project