We use TI’s TPS5430 buck converter IC to step down our 12v battery voltage to 5v (for the RPi, LED ring and ESC) and 3.3v (for everything else)
Before this, we have used COTS step down converters before, from Hobbyking’s UBEC to Taobao’s MP1584 and LM2596 breakout boards. However, we wanted to better integrate everything into one PCB and there were multiple reports of those buck converters being inefficient and overheating anyways.
We have tried other buck converter ICs before, such as the TPS54330 and the popular LM2596. However, the TPS54330 did not work (the feedback pin voltage was way lower than stated in the datasheet) and we could not figure out why, while the LM2596 kept destroying our Teensys despite it outputting 5v to the Teensy’s VIN LDO port.
We use TI’s LM2587 boost converter IC to power our solenoid at ≈55v, with a 1100µF capacitor in parallel.
We have used COTS boost converters before, specifically this very large Taobao board and a LM2587 breakout board (this breakout board pointed us towards the LM2587 we are using now). Similar to the buck converters above, we wanted to better integrate everything into one PCB hence we shifted away from these.
We have also tried other boost converters before, specifically the MAX1522. However, similar to the TPS54330 above we could not figure out why it does not work (we could only get it to boost to 20v).
When we were first looking online on how to design our boost converter circuit, many resources pointed towards using a flyback regulator IC such as the popular MC34063 or UC3843 to achieve our desired 60v voltage level. However, we simply did not have enough space to fit a transformer coil required for the flyback topology, and anyways we soon realised we did not require that much power to kick the solenoids.
We also looked to other topologies like the charge pump circuit, inspired by the integrated charge pump on our VNH5019 motor driver. However, we could not find a suitable IC on Taobao that satisfied our power and size requirements.
When we first used a solenoid, we needed to increase the solenoid’s strength and our intuition was to increase the voltage supplied. However, we noticed that past ≈40v, the increase in kick strength was negligible for each voltage increase. It took us a lot of researching to understand that it is the current supplied to a solenoid that determines its strength.
While increasing the output voltage increases current, the main source of energy that is supplied when a solenoid kicks is through the output capacitor because the solenoid just draws so much current in a very short span of time.
Since we were only kicking a solenoid for short pulses at a time (≈20ms) and there is a long time in between kicks, we could utilise a large capacitor to provide us with that short burst of current. We first attempted to calculate what capacitance would be enough for us, however in the end we decided to just buy a 1000µF capacitor to put in parallel with a 100µF capacitor as they were nice round numbers. Currently, we can kick the orange ball over the ramp with our capacitors charged at 55v.
We use a MOSFET to switch our solenoid on and off. Previously, we have used relays, however this was not really suitable due to the inductive nature of the solenoid. We have also considered isolated switches like opto-isolators, however a high powered one was too expensive.
At 60v, we must ensure that the Rds (resistance across terminals of the MOSFET) is very low to decrease power losses and overheating of the MOSFET. However, for most MOSFETs, the Rds is very high at a low Vgs (gate / drive voltage). At our 3.3v logic levels, the best MOSFET we could find had Rds of ≈100mΩ, which would translate to ≈0.5W of power dissipation in the MOSFET. This was unacceptable as we found the MOSFET would heat up very fast and the solenoid would not be as powerful.
Hence, we used a small MOSFET that had a low Rds (≈40mΩ) even with a low Vgs to turn on our bigger MOSFET. We still had to use a bigger MOSFET because the Vds (voltage across MOSFET terminals) was 30v, way lower than our solenoid drive voltage.
Referring to the image below, when we send a logic high to the “CONTROL” bus, there is a positive Vgs and that would turn on the small MOSFET. Now, at the drain terminal of the small MOSFET (terminal 2), it is tied to ground. This creates a 12v Vgs across the larger MOSFET, turning it on as well.
However, when the MOSFETs are off, the 60v is “shared” between the two MOSFETs and thus the smaller MOSFET will not be destroyed due to its 30v Vds limit.
In the future, we could use an opto isolator to turn on the MOSFET rather than this current solution since we would prefer if our sensitive µCs are isolated from this high powered system.
As mentioned before in the design section, we placed our boost converter circuit at a corner of PCB so in the case of accidents, it will (hopefully) not affect our other circuits. Not only that, a boost converter works by rapidly switching a MOSFET between charging an inductor and discharging it across a capacitor. This high powered high speed switching action has the potential to magnetically interfere with our other data lines. While we have not experienced these issues in the past, it is better to play it safe and simply position our circuit away from the rest of our PCB.
Due to the inductive nature of the solenoid and high current draw, we had to use a capacitor to charge our solenoid coil up. However, there was another issue as this solenoid was now “charged up”, with its coil being magnetised. When the MOSFET switch turns off, this magnetic field that is built up by the coil needs to collapse somewhere.
Without a robust power dissipation circuit, this magnetic field would create a very high voltage across the open switch (since the circuit is broken and the current cannot flow) which will destroy the MOSFET. This was even worse last time, when we used a relay rather than a MOSFET. This high voltage across the relay created sparks across the relay contacts which destroyed the relay and produced some magic smoke. Hence, to prevent this sparking or destroying of MOSFETs from happening, we use 2 ways to dissipate this magnetic field quickly.
One way is through a simple flyback diode. During normal operation, the diode is in reverse polarity and will not conduct electricity. However, when the switch turns off and when this magnetic field collapses, current is allowed to flow through the diode and thus the voltage across the MOSFET does not build up to dangerous levels.
However, we were worried that the 0.6v forward voltage was not enough to dissipate the magnetic field, hence we placed a 3.3v zener diode backwards in series with the original flyback diode. This increases the forward volage to ≈4v to dissipate this energy more quickly.
Another way is to include a R-C snubber circuit across the MOSFET drain and source. During normal operation, the small capacitance of the capacitor quickly gets charged up and since this is a DC circuit, has infinite DC resistance and does not allow current to pass. However, when the voltage of the coil increases and the switch does not conduct electricity, a small amount of current is allowed to pass through this capacitor in the reverse way, thus again preventing the voltage from building up to dangerous levels.
A better explanation can be found on Wikipedia
Inspired by the SSL team OP-AmP, we wanted the ability to control our kicker strength so we could do cool tricks like curved shots. Therefore, we thought of using an adjustable potentiometer on the feedback pin of the boost converter which allows it to change the voltage output of the boost converter and therefore the kicker.
However, we faced issues from the start up time of this digital adjustable POT. Our original circuit in our 2019 PCB looked something like this:
However, the LM2587 boost converter started up faster than the MCP41XXX adjustable POT we used. Before starting up, the MCP41XXX resistance is very high. This resulted in the feedback pin voltage being very low since there is a large voltage drop across the POT. The LM2587, which already started up, hence ramps up the voltage rapidly. In our case, the LM2587 blew because it ramped up the voltage to 90v, way above its theoretical 60v limit.
In our test PCB, we attempted to use a different circuit which placed the adjustable POT parallel to another fixed resistor. This means that on the high side, the resistance can only decrease, not increase. This ensures that our 60v voltage limit is strictly adhered to and protects our circuit.
From the circuit above, the maximum resistance between the output voltage and feedback pin is limited by (R2+R3) even if the adjustable POT abruptly fails. This caps the output voltage to ≈55V. However, if we want to decrease this output voltage for a lighter kick, the POT can be adjusted to decrease in resistance so the feedback pin voltage drops and therefore output voltage drops. The additional trimpot is there just to adjust the range of the adjustable POT.
This has another benefit of increased sensitivity, since the adjustable POT has a limited amount of “steps” spread across its resistance range. By adding R3, we basically allocate the adjustable POT’s steps to a smaller voltage range, from ≈40v-50v, thus each “step” is more sensitive and represents a smaller change in the output voltage.
While this worked well, in our actual PCB we positioned the boost circuit away from everything else and thus the electronics were very isolated from the µC on that layer. We were unable to route the adjustable POT’s 4 SPI wires to the µC without compromising some high power traces’ widths or decreasing the data wires width to >8mils, hence we decided it was not worth it to implement this system since in reality we would rarely need to adjust the kick strength in-game.
We have 40 light sensors (phototransistors) which need to be read via an analog voltage, and we definitely do not have 40 analog ports to read them. Thus, we would require a multiplexer. We use 3 74HC4067 16-channel analog multiplexer for our light sensors as well as our lightgates, current sense and motor thermistors.
Since these phototransistors vary current based on light, we need a resistor divider to measure this current across the phototransistor. Rather than adding one resistor for each phototransistor and using 40 resistors, we simply use one resistor per multiplexer by adding it at the “COM” common output.
In our phototansistor’s datasheet (ALS-PT19), it suggested we use a capacitor in parallel with the current sense resistor in order to smooth voltages. However, when we tried it out, we had to put too much of a delay while switching between different outputs for the capacitor voltage to change (since we used a shared resistor & capacitor), hence we ditched it in the end.
On our robot, we mainly use a 3.3v logic level since both our main µC (Teensy 3.5/6) and sub-µC (STM32F103) run on 3.3v. However, certain components like the ESC and the RGB ring require a 5v logic level to operate.
While we first used a MOSFET-based logic level converter (something like this), that was unsuitable for the 800kHz digital signal for the Neopixel.
Since we did not need to use I2C logic level shifting, we decided to use the 74HC logic family, specifically the 74HCT08 Quad AND Gate with a minimum high level input voltage of 2.0v and output voltage of 5v. While many often recommend the 74HCT245, that chip had too many inputs for us to use and the quad 74HCT08 works anyways.
We had considered using encoders to measure the RPM of our motors so that we can control the speed of our robot better.
There are a number of different types of encoders we could use. We first thought of utilising the small extended back shaft of our JoinMax motors (something like this) to attach a small encoder disc and PCB. However, because our robot needed to keep within a 20cm diameter limit (or 18cm in the future) there was no space to fit such an encoder disc.
Taking inspiration from teams like LJ Stand in 2018 (poster), we also considered mounting some sort of magnet on our wheel, with a hall sensor in the layer above to detect variations in magnetic field. However, our custom designed wheels had no space to fit magnets in them, and we could not increase the thickness of the wheels just to fit the magnets due to the size restriction.
Building on the previous idea of the wheel as an encoder, we thought of using light instead of magnets to detect the rotation of the wheel, alternating the colours of our rollers and 3d printed core so that a phototransistor mounted above could detect changes in the light intensity of the reflection. However, we thought this method would be too prone to external interference and ran out of time to fully test the reliability of this. In future iterations however, this method of using light to detect may be preferred over other encoder solutions.
We only decided to cover certain circuits, however if you would like to know more you can find our design files here!