can circuit boards be programmed to ones requiments?

Discussion in 'Embedded Systems and Microcontrollers' started by VivianAnto_d, Feb 3, 2016.

  1. VivianAnto_d

    Thread Starter New Member

    Feb 3, 2016
    I'm a mechanical engineer doing a mini project related to my field involving electronics.Im done with the mechanical work but I have questions related to electronics part. I need a circuit which can convert a value from one unit to the other form. (to convert value from 'cm' to 'mm' / to convert a value from kg to litres) and display the new value on the screen. I have heard that the circuit boards can be programmed to work for ones reqirements. Is there any circuit board which can be used in my projects?
    1)If the input value is '10cm' , I need a programmable circuit board which can convert it to mm as'100mm' and display the final value on the screen.
    2) Input value =100kgs
    output value required=100litres(just for example)
    Display vaue =100litres
  2. Dodgydave

    AAC Fanatic!

    Jun 22, 2012
    No short answer, you need a microcontroller to programme not a pcb, and you're confusing the units kg is weight and litres are volume.
    VivianAnto_d likes this.
  3. VivianAnto_d

    Thread Starter New Member

    Feb 3, 2016
    hey thanks for reply.!
    I know that the units are completely different but I need something which can do that work.
    The input value in my experiment will be in kgs whereas the output should be in litres.
  4. mcgyvr

    AAC Fanatic!

    Oct 15, 2009
    What is the fluid or solid being measured?
    For water 1kg = 1 liter.. no conversion necessary..

    To answer your question a bit more..
    Yes.. you can create a device that has a screen, some buttons and a microprocessor and then you would write software to burn onto the micro to perform whatever functions you want..
    Or many other ways..
    And yes there may be an off the shelf unit that incorporates all that and again you would write software to perform whatever functions you want..
  5. DNA Robotics


    Jun 13, 2014
    An Arduino Uno and an LCD shield should do it. It is an easy to program tiny computer.

    The New Arduino Uno R3 - Arduino is the Industry Standard‎

    If the input value is '10cm' , I need a programmable circuit board which can convert it to mm as'100mm' and display the final value on the screen.
    A command like Output = Input * 10 will convert it for you.

    One litre of water weighs one kg so that would be easy but other liquids are different because they have different densities.
    Then you would program a different equation to cover it.
    The density of diesel oil is about 0.85 kg per liter. A command like Output = Input * 0.85 will convert it for you.
    VivianAnto_d likes this.
  6. mcgyvr

    AAC Fanatic!

    Oct 15, 2009
    As stated by DNA Robotics you may also need to incorporate a lookup table of sorts if you expect to provide conversions for multiple materials with differing densities..

    All you metric people keep saying that the metric system is the "best" because conversion from one to another is just so simple that you don't need a calculator at all.. guess not :p
  7. John P

    AAC Fanatic!

    Oct 14, 2008
    Indicate some understanding of basic weights and measures, please. You know, things an engineer works with every minute.
  8. VivianAnto_d

    Thread Starter New Member

    Feb 3, 2016
    To mcgyvr,
    Thanks for the reply. Ill will be using petrol and diesel separately.
    Description about the project, if I fill diesel in a tank(1l of diesel=.85kg) I want the micro controller to analyse the corresponding weight and do the required calculation and give me value in litres. so its basically like ill be filling 'X' amount of fuel and I want the result in litres.
  9. ISB123

    Well-Known Member

    May 21, 2014
    Volume = mass / density
    V=1 / 0.85

    You have to measure how much "mass" are you filling in the tank, then put the measured value in the formula.You would have to change the formula every time different density material is used.
  10. hp1729

    Well-Known Member

    Nov 23, 2015
    Such things are done in software. Get a scientific calculator that has the function you need. What are you working on that doesn't already have a microprocessor? Talk to your programmers and ask them to adapt the software.
    Last edited: Feb 3, 2016
  11. NorthGuy

    Active Member

    Jun 28, 2014
    Conversion (multiplication) is not a problem with a microcontroller. The MCU will have:

    - ADC (Analog-to-Digital Converter) to measure your analog value
    - set of pins to talk to LCD

    Writing such a simple program is very easy. If you're an engineer, you can do it.

    You don't need much of a circuit - microcontroller, some supporting discrete components, perhaps some simple circuit for input stage of ADC.

    Depending on whether you need one or many (and how many), you can either buy Arduino and program it to do the task, or (if you need many) design a PCB with a microcontroller on it, put there all the necessary connectors, may be few buttons, perhaps build a box for LCD.
    VivianAnto_d likes this.
  12. mcgyvr

    AAC Fanatic!

    Oct 15, 2009
    So then you just need to add a selection to your "entry" that includes the liquid..
    The program would then use that to determine which formula to use..

    If diesel then .85
    If petrol then .77

    ANY micro can do what you want..
    Now the many other choices will be up to you based on standards you must apply to.. mechanical form/fit issues, EMC compliance,etc....
    As stated for a one off hobby project an Arduino/LCD shield (w/buttons) would be a very simple way to go..
    For a professional project... not so much..
    VivianAnto_d likes this.