Kuba Blog 4
These two weeks started off with us analysing an example piece of code from Jason. This code contained a state machine, that took input from a button as well as adc. These inputs were both tasks, as well as the state machine. The two outputs were also tasks, both outputting PWM values to motors on two different pins. The figures below show different PWM output pulses of width 0.5ms, 1ms, 1.5ms, and 2ms.
After that we were required to draw a state machine idea for the Swarm Bots. My State Machine is shown below:
I took two measurements for this sensor, one at 30cm and one at 100cm. The expected voltage from 30cm is 2V, and the figure below confirms this.
The expected voltage at 100cm is approx. 0.65V, and the measured voltage shown below was around 0.6V, not the exact same but relatively close.
The next day we moved onto trying to get certain things on the swarm bots working. We first started with trying to figure out the power on issue for one of the robots to get the beacon light working. Me, Jake and Sean powered on the bot, but noticed that the power light came on but none of the other components did. We then disconnected the power cable to try to find any open circuit, and first we found that one of the wire connections was incomplete, as the end was fully covered in plastic. We then also found that the fuse connecting power to the rest of the circuitry was blown. After changing the fuse and reconnecting everything we got the beacon light to work, as well as the Nerf gun attached to the bot. We then moved onto working on a different robot, one that contained a PWM motor controller, so as to try to get the wheels to move. To achieve this we tried using the same example script from Jason to begin with. We measured and confirmed using an oscilloscope which pins the PWM values were being output from. After this we connected the PIC to the motor controller, powered on the bot, but the motors didn't seem to work. This seems like it might be a potential issue with the power circuitry to the motor controller, or to the bot as a whole, or a short circuit at some spot. This investigation will continue next week.


Comments
Post a Comment