[help]attiny1617 voltage control method

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello
I'm a beginner working with ATTiny1617.
I am trying to control the voltage of a converter or inverter with the ATTiny1617.
At this point, I'm trying to use a PI controller and I have no idea what to do.
I would be grateful if you could tell me some code or methods that can be used by very beginners.
Please help me.
Thank you.

jaegon yoo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Microchip have some application notes on building inverters with their PIC range of microcontrollers. You might want to find these to give you some basis for the techniques involved. Once you understand the techniques, then applying this to the AVR should be straightforward.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 am trying to control the voltage of a converter or inverter with the ATTiny1617.
At this point, I'm trying to use a PI controller and I have no idea what to do.

Why do you not provide any details at all?  10 amps? 400Volts?  AC inverter output? Solar?  What is the range of the input voltage?   If you can't prepare enough to provide any information at all, how can anyone take you seriously? 

What have you done so far in studying power inverters?   

 

I have no idea what to do.

Providing your requirements information is a great example of what to do. 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jaegon wrote:
At this point, I'm trying to use a PI controller and I have no idea what to do.
PID Compensator - Developer Help will lead to the Digital Compensator Design Tool plug-in in MPLAB X; a typical Microchip-based use case is by dsPIC.

tiny1617 is beta MPLAB X v5.30 though is tested for MPLAB XC8 v2.10

IIRC, there are threads here on SMPS via AVR.

 

ATTINY1617 - 8-bit Microcontrollers

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello, Jaegon Yoo

 

The way you start a project like this is to carefully list the desired characteristics. Some of those have been given above, but let me add a few:

 

1) What output voltage?

2) What output current?

3) What voltage type (AC or DC)?

4) What kind of load? An incandescent lamp would appear very different to an inverter than a motor.

5) Intermittent load or continuous load?

6) What kind of input voltage (AC or DC, and what voltage level)?

7) What power is available from the input power source?

8) Is the source soft, like a solar panel, or hard, like a bank of batteries or grid power?

 

Once you have a list like this (I may have overlooked something), THEN it is appropriate to start the hardware and firmware design. In a project like this, the two go together, very tightly. For example, at almost any power level, you will need a transformer and power transistors. These are not trivial selections and it is very possible that you might need to make your own transformer.  Microchip has a set of application notes on the design of inverters using dsPIC chips. The bulk of those notes are about the hardware design. They are worth your time and effort to study and understand them - they are quite thorough. Here are some useful links:

 

http://www.microchip.com/Develop...

http://www.microchip.com/wwwAppN...

http://ww1.microchip.com/downloa...

http://www.microchip.com/Develop...

http://ww1.microchip.com/downloa...

https://pic-microcontroller.com/...

 

It is also important to add that, depending on the output voltage and power level, such a project CAN BE LETHAL! Make sure that you understand the hazards of line voltages and how to work with them, safely. The hazards CAN include hardware that is still operating when you do not expect it to be, because of battery power.

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

Last Edited: Wed. Jan 1, 2020 - 08:08 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jaegon wrote:
I'm a beginner working with ATTiny1617

Do you have experience with any other microcontroller(s) ?

 

jaegon wrote:
I'm trying to use a PI controller and I have no idea what to do

Do you have experience with PI control in general ?

 

jaegon wrote:
methods that can be used by very beginners

With learning any new skill, it's always important to start with basics; lay good foundations; build step-by-step - don't just leap straight in over your head!

 

See Tip #6 (in my signature, below; may not be visible on mobile) for Beginner's Getting Started  ...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...