Skip to content

This is a Pic16F18324 emulating software, useful for unit testing on x86 platform without need of the specific microcontroller. It is being currently developed as a way for me to develop my understanding of MCU Architecture and memory mapped IO.

Notifications You must be signed in to change notification settings

MAPMG79/TurnineController_EMCU

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EMCU

This is:

- a Wind Turbine / Battery / Brake Resistor simulator
- a Pic16F18324 uController emulator (emulating ADC, PWM, Timers and digital outputs)
- control software for the Wind Turbine Controller

Sometime in 2022 we installed a small homescale Wind Turbine (5kW) in a remote location that already had solar pannels and batteries installed. The Wind Turbine was meant to provide extra power production capacity but to our dismay and disbelief it never produced any noticeable energy. We experimented with the turbine and studied the problem, trying to both understand and resolve it, we ended up figuring that the non-produced power was due to the controller and battery voltage. The controller shipped along with the turbine was a simple, analog circuit with triacs and thyristors to connect any excess voltage to the braking resistor, convert three phase AC to DC and connect the DC voltage directly to the battery.

The problem, as it stands is that all power produced by the turbine is used as soon as voltage goes above 12V, that leaves no power left to accelerate the turbine and 12V is a very low speed, that produces no power. We decided to build and code a PWM (Pulse Width Modulation) MPPT (Maximum Point Power Tracking) Wind Turbine Controller so that we can harvest energy from the turbine.

This simemulator enables us to write the wind turbine controller software without the need for the real hardware (controller pcb, wind turbine, battery).

Wind Turbine Controller description:

  • three analog inputs: Vin - voltage generated by the turbine, Vout - output voltage (to charge battery), Vbat - battery voltage
  • three digital outputs (colored leds): Green - Turbine freewheeling, Yellow - Producing Power, Red - Braking
  • two pwm outputs: Vout - generated output voltage (to charge battery), brake - connect DC bus to braking resistor

Analog Inputs:

  • Vin is connected to Pic16F18324 pin AN2 (RA2) with range 0 ~ 150V
  • Vbat is connected to Pic16F18324 pin AN4 (RA4) with range 0 ~ 15V
  • Vout is connected to Pic16F18324 pin AN5 (RA5) with range 0 ~ 15V

Digital Outputs:

  • Green led is connected to Pic16F18324 pin RC5
  • Yellow led is connected to Pic16F18324 pin RC4
  • Red led is connected to Pic16F18324 pin RC3

PWM Outputs:

  • Vbrake is connected to Pic16F18324 pin RC0
  • Vout is connected to Pic16F18324 pin RC1

The challenge is to write software to control Vout and maximize power output to it while keeping turbine rotation (and Vin) controlled.

About

This is a Pic16F18324 emulating software, useful for unit testing on x86 platform without need of the specific microcontroller. It is being currently developed as a way for me to develop my understanding of MCU Architecture and memory mapped IO.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 96.0%
  • Makefile 3.9%
  • Shell 0.1%