the cube updates: step one, understanding the Arduino schematic [basics]
Yes so, to design a controller like the cube that we laid out in the last post. We need to start by understanding electronics you know. Like understanding the Arduino and the components that go into that so we can figure out what is needed, what isn't needed. How it even works, etc. We're just going to go piece by piece until we understand whats happening in each component. We're going by this schematic first because it's easier to read: http://electronoobs.com/eng_arduino_tut31_sch3.php but we will move on to this schematic later: https://www.arduino.cc/en/uploads/Main/arduino-uno-schematic.pdf!
component one (the CH340G):
Here's the first component of the board from the USB device interface. The USB interface allows us to communicate with the Arduino over USB. Here's the schematic and the explanation of the components.
The first component to note is of course the CH340G USB to serial controller and everything connected is something required by this chip. So we have a 12mhz crystal oscillator with its capacitors to produce the serial clock signal. We have the USB itself data+, data-, ground, and 5v. There's the actual serial TX/RX that goers to the microcontroller for communication. There's a DTR (data transfer ready) that goes to the ATMEGA's reset pin. Then there's some power electronics.
part two (the power electronics):
So this system is responsible for powering the board either from the USB or from the 7v-12v input barrel jack.
This is all power electronics. Step-by-step let's first assume there's no 7-12v jack connected. The system gets all its power from the 5V USB power. If something is connected to the 7-12V jack, that first turns off the switch to USB power so the board is not powered by two different sources or power doesn't go from the 7-12V to the USB. That voltage goes through a regulator that gets turned down to 5V to power the board. Anytime anything is connected to the input voltage, there's a 3.3V voltage regulator that powers the 3.3 line.
NOW SO FAR: All we've looked at is the power electronics and the USB. We haven't really gotten to most of the individual components that really make an Arduino and Arduino. That we'll get to soon.
atmega328 and the controller itself:
Now here's the heart of the Arduino System, the ATMEGA328 microcontroller. The microcontroller is really the last part of the Arduino we need to look at because everything else is a simple switch, programming header, or output pin, or an LED here and there.
So what makes the Arduino so special isn't necessarily even the ATMEGA328, it's the boot loader inside that lets you program it with the ArduinoIDE. So if we were to design our own arduino/style and whatever controller we'd simply need to get an ATMEGA328 with the Arduino boot loader already on it. https://www.adafruit.com/product/123 good thing there's an app for that!
The rest of the circuitry around the ATMEGA either powers it/gives it access to a crystal clock or something similar. We shouldn't need most of the excess circuitry for our application so we'll get rid of much of it.
Now that we understand how an Arduino works, we can start modifying the circuit to our needs for controllers like the cube. We'll still need to understand the circuitry of the VESC though.