Close
0%
0%

K-9

Raspberry Pi powered K-9 GUV with a NES controller style remote

Similar projects worth following
Not too interesting yet but twin 100w scooter motors with a sabretooth motor controller. The shell we are remoulding to something more sturdy with an aluminium frame than the prop we have. Using a Arduino FIO & Xbee for communication between the bot/remote.

While not the most ideal diagram it does give the jist. The core is to try and do this with the one Raspberry Pi as much as possible. The arduino fio in the remote being considered separate.

2x 6S Lipos (22.2v) are the main power to the motor controller and voltage regulated to 5v for the Pi to share the same power source. A 24v relay is used to be able to power off the motor controller while allowing the Pi to operate.

A GPS is used to the positioning but it is expected not to be able to get a signal indoors (convention halls) so where GPS isn't available the IMU will track position by offset. If a GPS signal isn't available it should be powered off for a period and retry later as not to waste power because it would be expected not to have a signal in the conditions.

Ultrasonic sensors are positioned forward, left, right and downward for collision avoidance. The downward facing one is to ensure it doesn't go down stairs. These would only be turned on when moving to save power, although tempting to have them on to avoid anyone walking into K9 when stationary. The IMU would always have power coming off the 3.3v of the Pi.

The Ultrasonic sensors use 5v to send but the return needs to be 3.3v so it would go through the logic converter before going through to the Pi GPIO. While there are sufficient relays to power off the Ultrasonics independantly it would require additional pins to power them off independantly so combining them through a single relay seems ok as they are low power too.

The XBEE would also allow for it to be powered off when not in use. It would always be required when paired with a remote but when it is not paired it isnt needed so it can be powered off with a relay also.

Both the XBEE and GPS could be attached to a high gain antenna as a K9 tail.

The RFID reader is a separate component that would only be powered on when stationary (so it can be paired). Pairing would be pressing something on the controller to say it's going to pair and then the device that reads the RFID for it would be paired to it. This is overkill for one robot but not if I intend to make more to use the same controller design later or have more controllers.

The controller is designed to have an induction charger in it and recharge off of K9. As induction chargers do have waste and will expend energy when not even charging a device it does only need to be powered on as required. At a later point might be able to use another RFID reader near the induction charger to only turn on when the device is there, but I also want to use it with my phone so may be a switch or maybe via the RPi touchscreen which is also being installed.

The controller is going to be inserted into a USB NES controller shell and use a Ardiuno Fio v3 which has built in XBEE socket. The case will need some adjustments but there should be enough space for mounting the board + 500mah battery + tiny induction charger + buttons + on/off push switch + 9DOF.

(*note this is not the exact same board as I have but I have drawn it to the correct pins for my usage)

The controller will also have a small glass RFID tag in the case so when the user presses 'select' on the controller K9 will turn on the RFID reader to scan/pair. When a controller is paired it will start sending it's accelerometer data to K9 which will know where the controller is in relation as from the point of reference of the scanner + movements. This will allow K9 to have a 'follow me' mode while the controller is paired.

Secondary to this the A/B/Start/Select/Up/Down/Left/Right buttons will also be hooked up to allow for (in addition to pairing & starting follow me) direct drive remote controller. The intention is not to have K9 as a remote control prop but it will be helpful initially no doubt.

The induction charger in the controller will be wired to (bypassing) the usb charge connectors on the Fio with the existing lipo heading on the board removed due to space/height issues. This will allow the controller to be charged wireless...

Read more »

imu_test_v2.ino

Arduino for K9 Controller (v2 with Madgwick filtering) per https://github.com/arduino-libraries/MadgwickAHRS/ Updated version, does not send data via xbee until a (any) button is pressed to ensure minimal running when charging via induction

ino - 7.96 kB - 04/04/2016 at 07:09

Download

K9.pdf

K9 Prop diagram that is usually used for external panels/shell creation. Im going to lean towards using the majority the same way except for maybe the bottom panels in the body which do come in a fair bit reducing the amount of interior room for the motors

Adobe Portable Document Format - 74.82 kB - 03/26/2016 at 10:05

Preview

nes_switch_holder v3.stl

File for mounting the 7mm on off push button switch in the NES controller

Standard Tesselated Geometry - 3.79 kB - 03/11/2016 at 07:51

Download

nes controller button cap v2.stl

Button cap for the switch (requires fine printer or some 'modifying')

Standard Tesselated Geometry - 5.94 kB - 03/11/2016 at 07:51

Download

K9Controller_Gerber_Files.rar

Gerber files for custom PCB for NES controller buttons to tie to Arduino FIO

RAR Archive - 63.04 kB - 03/05/2016 at 01:50

Download

  • 2 × SparkFun 9 Degrees of Freedom - Sensor Stick For IMU navigation/follow me in K9 & Controller
  • 1 × XBee Pro 60mW PCB Antenna - Series 1 (802.15.4) K9 & Controller communications (this is the one for the controller, I have a 2nd one of these with a USB adapter for debugging from a PC)
  • 1 × XBee Pro 60mW U.FL Connection - Series 1 (802.15.4) K9 & Controller communications (this is the one for K9 with an antenna connector)
  • 1 × 700-2600Mhz 4G LTE Rubber Duck Antenna 5dbi with SMA plug male K9 tail and antenna for the GPS & XBEE
  • 2 × Interface Cable SMA to U.FL Connecting the XBEE & GPS to Antenna (will need to get a T piece adapter to connect both)

View all 30 components

  • It speaks! (And I broke something else, maybe)

    Andrew Bills02/13/2017 at 02:50 0 comments

    It's been stinking hot here so I haven't really had a lot of motivation to be out messing with electronics over trying to stay cool but I have done some stuff so thought I should do a small update.

    Connected up the head sensors etc as mentioned previously however was getting no sound. I did think this was my wiring but after much much effort figured out that it was my hookup (followed the instructions which were wrong telling me to use the L/R channel instead of just a single channel + ground to the mono amp). Sadly my wiring was the only issue, with a little bit of effort to run it through an arduino to test I worked out my 2.5w amp was dead.

    Not a problem as Little Bird Electronics who I got it from were super helpful in replacing it providing I covered the postage. Which was good because I did buy the amp months and months ago. When the new one arrived I was able to hook it up and test without an issue.

    I previously did look into some K9 audio files for reuse which is common and popular to do but wasn't pleased with the quality/consistency of the files that are used in prop builders. I also wasn't intending to go and sample my own so I instead elected to go the voice modulation path with espeak. While it will not be 100% perfect I can use the voice to provide pre-checks for when I am not looking/using the touchscreen panel. The video below is just a simple test playing a wav then a phrase via espeak. I may tweak the voice settings some more later.

    That being done I hooked everything back up and started to run through retesting things I had already tested to be sure. My current state is I have some problem with the GPIO in use/Ultrasonics. Which is strange due to it being fine prior.

    The only explanation I can think of is I bumped my wiring with all the moving about for the amp. When I hit another cool patch in the weather I will plug in one of the other ultrasonics (the side ones that I haven't mounted yet) and test with them. I want to believe it is a software issue at this stage as I got one return result from the ultrasonics while messing about but will have to figure it out.

    Separately I have put together the missing side panel for mounting so it can flip out to access the motors/batteries. See the comment about weather for progressing that as it still needs some putty touch-up & paint before it can be mounted in a final sense.

    Hopefully cool weather isn't too far away as it is a lot easier to figure stuff out when it's not too hot to think.

  • No earth shattering ka-boom

    Andrew Bills01/09/2017 at 05:09 0 comments

    Ok this one is super quick. I hooked up the last of the wiring (except for the Neopixel to SPI because I may put a resistor in eventhough it already runs through a logic converter). Put the batteries back in which have been sitting charged for WAY too long and turned it on and.... it turned on.

    Well, the power switch I had used a dozen or so times before one of the pins kinda melted/lowered it looked like so it wouldnt turn off. So after safe powering down the Pi I had to disconnect the battery. But to fix I got a replacement identical switch (again because I had used that same switch with no problems before) and added a 20A inline auto fuse. Doesnt seem to be a problem and was probably just a bad switch, but there was no bam, bang, kaboom or exploding lipos so I will consider that progress.

    Still have a couple of panels missing & of course all the programming. But it's summer here, Im trying to stay cool.

  • Catching up... again...

    Andrew Bills11/21/2016 at 09:08 0 comments

    I've been pretty slow to update this as it's been a stressful few weeks. As mentioned I pretty much dropped a lot of things to get K9 together enough to take to a local con. Specifically Brisbane Supanova. The reason I wanted him there was I backed another booth and funded a cosplay calendar to raise money for this group who do service dogs for special needs kids (www.geeksociety.com.au if you want to check it out... if you are in AU it would be appreciated).

    Anyway much like the last update I sped through putting the panels together and painting. I am not happy with all the painting as I didnt have a covered place to paint and wind ruined some of the finish to a degree that I didnt cover all parts with gloss when I was done so I could redo it later.

    I did manage to get all the wiring in place except for a couple of things so my current to do list is:

    • add the pwm control wires from the new 16 channel I2C PWM board to the main motor controllers
    • run a pwm control wire to the head (where I might use it to control some servos)
    • drill some holes to make reconnecting the main power to the 5v convertor possible without complete disassembly as the cables slipped again (I tried to move the cable to a better spot and clearly pulled too hard)
    • Complete the bottom side door (battery access) with a door mech
    • Add the back of head panel with velcro
    • Mount the 2 side facing ultrasonics (may add more perspex for that)
    • Mount the main power switch... somewhere... probably in the head

    After those are done, that is pretty much all the wiring. There is stuff Im not happy with like the button pad on the back but it will do for a first attempt. Id like the button pad to be easier to remove to get to the touchscreen if needed, probably with a small motor but how I do that will probably be similar to how I do that for the side panels (shelf access panel and bottom battery door).

    The body is pretty much together but there is gaps. If I had more time (and paint) I would of been a bit more careful about getting the joints clean but some are done well and some I just ran out of time. Sanding and painting time could of easily been it's own project. I can see how prop makers/cosplayers spend so much time on it.

    You can see some of the worst gaps in the bottom but when it was at the con it wasnt at eye level so it may have helped hide. The side inclines arent exactly like the plans because the plans wanted them to come in A LOT. I did a number of mockups with carboard and picked what looked best from there. The end result was somewhere between the 'correct' 90 degree from the body and a 45 degree which I was tempted to have.

    Once I decided on that I used cardboard stencils to cut the HDU (High Density Urethane)/High Density Foam that I have been using. Painting was a process of plastic primer followed by cans of car (spray) paint then gloss on the parts that I wasnt going to come back and paint again (the side door). There was also an element of running out of paint and time.

    The nose bridge & 'eye' part of K9 interlocks and velcros to the body. That should let me change the eye part should it not be good for the 8mp RPi camera I mounted there as well as let me get to the John Leeson (voice of k9) signature without completely disassembling.

    I left a couple of parts off but for the most part I wired everything up. I was concerned about leaving the batteries in when I wasnt going to have him 'working' considering they are twin 16Ah 6c batteries (so 32Ah @ 24v).

    Last things I did was to ensure all the cables were ziptied to the frame, there are a couple I may move when I take the body back off to do my 'to do list' but hopefully I haven't yanked any cables and I can get to the important business of actually working through the software which I did do some before I got stuck into the mechanics + setup a virtual with the computer vision stuff.. but for the most part there is a huge amount to be done before I can use even half of what I've put in him.

    Right now he is more a really cool...

    Read more »

  • Button Pads & Body Updates

    Andrew Bills09/23/2016 at 02:57 0 comments

    I was planning to give an update last week but my kitty cat died and all motivation has drained out of me. Yes I realise how mad scientist it looks to lose a pet & be building a robot one but let's not think about either of those things... so 2 updates. Button pad and how I'm going with the outer shell.


    Button Pad

    So as mentioned I was doing the button pad and it was raining last time. It fined up enough to be able to bend the plastics I was going to use for inside the shell.

    So the short version of the above is that I bent some perspex with a heat gun into the shape I waned. I have a selection of button pads from Littlebird/Sparkfun with a matching button pad shield underneath. To do this with only the single Raspberry Pi the LEDs I mounted aren't RGB but NeoPixels that I can address from a single pin in serial (as power hungry as they are).

    What this meant was the mounting boards were for RGB LEDs and wired for those sort of pins. So what I did wasI cut the circuits on the board so the LEDs can just use it for mounting (which works better with the buttons. This means the buttons don't work but the buttons aren't suppose to, they are a decoy for anyone who feels the need to poke or touch K9 (which someone always does and breaks something).

    After wiring up all the pins and power for them all I did a cardboard version of the box and then used that as a template to cut a box from the same high impact/density foam that K9's body will be made from.

    Ok so the control box has some problems. The buttons are sunken and hidden which is entirely not the point of them and I think the gauges sit up way too high but probably will have to wait to see how low this all is in the body before I can modify them. The box here is intended to be a lift out (maybe motor out) cover for the touchscreen in K9. So you lift this out and can get to the touchscreen for more specific controls.

    The gauges here are not per the props for K9 and I don't care because they are more functional. The Voltage and Amp meters are hooked into the 24v power distribution lower down in K9 to give some idea of usage. In this version as you can see I have angled them so they can be seen quite easily but again, they might sit up too high now and will have to decide if I break my plastic frame under to lower them.


    SomeBODY to Love

    The second update is about the body which has progressed some. If you have read all the logs you know that I was not happy with the measurements for the body being done incorrectly and potentially wasting a lot of money but I am trying to use them first before resorting to more spending. The short of it is when laying out the measurements who did it did not take into account the angle of any slopes. Basically that thing in school about hypotenuse? They didn't do that.

    So what this means for the body is, instead of it nicely sitting over the top of the frame and hiding it it wasn't going to be long/wide enough. Given that to be a fact I had to decide whether I lay the pieces on top of each other to give me a couple extra mills length or width. I have elected for length. (insert that's what she said joke here.

    The body is high impact foam which can be cut with a VERY sharp knife and some effort so it was not quick or easy going. I also had to reuse some scraps because along with the measurements not being done correctly not all the pieces were sent to be CNC machine cut. The high density foam however is plastic in base so it could be stuck together with blue plumbers glue.

    A few pieces needed bracing pieces added to give them more to stick to but the end result is per what you see above. To attach/detach it is a little bit of a trick with the head and neck needing to be removed first if you want to completely strip down. The body is pretty tight with some packers added to make it sit exactly without and twist to it.

    Because the measurements I was given were so wrong the body now sits onto of the frame instead of hiding it. To help I purchased 4 rubber table corner...

    Read more »

  • Ears & Metal 3D Printing

    Andrew Bills07/20/2016 at 03:00 0 comments

    I was hoping for my next update to be about the top button pad but its been a bit wet and cold outside to do plastic bending for the underframe I am using for that... but today my K9 ears arrived!

    I was a little worried about how to make these but I was fortunate that someone had already built out a model on shapeways. I had to contact them and work with them a little to change the model so the ear shafts would be longer to actually mount them + there was a couple of issues with the print when submitting through Shapeways that required more adjustments but you can see the final result.

    The ears themselves printed pretty well, while I didn't go out of my way to try and break them I did pick them up by a 'delicate' part and give it a little shake. I'm pretty sure they would stand up to some abuse and a whole lot less likely to be broken than if I printed in plastic or made them myself.

    The ears themselves are in stainless steel but shapeways has other options like nickle etc but I'm ok with how these look and better yet if they do break I can just order a replacement (even if it takes a little while to get to me).

    If you are looking at this and need your own set the Shapways URL is.. https://www.shapeways.com/product/KQNVRBHEU/k9-from-doctor-who-ear-longer?li=shareProduct

    For these Ill need to do some stuff to the shaft to actually fix it, perhaps some rubbers but all I really need to do is make some holes in the head.

  • Head sensor mountings and getting back into it

    Andrew Bills06/30/2016 at 02:03 0 comments

    Long time between drinks, I took a little bit of a break after being up every night past 2 am for that ComicCon thing, then I was waiting for the right size mounting screws and then the weather has been a bit horrible... but last week there was a rare not freezing cold day so I thought Id make a dash for it and try and cut the holes in the head for mounting. I was a little worried about it cracking, seeing how its signed now, but it was just warm enough and I was careful enough that it didn't happen.

    I had some challenges finding a drill bit for the ultrasonics (a single drill bit was $80!) but found this hobby drill bit that is a cone with notches to increase the size of holes.

    Anyway as you can see there is some electronics now mounted in the head ready for me to hook up to the wiring I have done. Running through...

    • There is a microphone in the nose which is per the parts list. I am probably going to change the headers to something that is just straight instead of 90 degree one I put on initially. The mic has auto gain adjustments so hopefully it will work well when the shell is on for being able to give basic voice commands
    • A new Raspberry Pi v2 camera has been added to the eye socket. I initially had the older model but figured might as well upgrade. This will be used eventually for CV stuff but initially it might just be used for time-lapse. The dream is to use it for actual navigation or to find things in addition to facial recognition. Facial recognition being used partially to allow for him to chat with people he recognises but mostly for the purpose of knowing when to allow voice commands (with recognised users)
    • Ultrasonics! The forward facing one which will point towards the ground in front of K9 is for collision avoidance. I understand that Ultrasonics can 'bounce off' if not square with the surface, this isnt a concern with the forward facing because it only cares about 'less than x' to know there is a collision imminent. The downward facing Ultrasonic near the neck is for knowing if K9 is about to go down a flight of stairs or something too steep. Originally I was going to have this in the body but in the head it gets to be further forward. I am only going to allow K9 to go forward or turn, not go in reverse (by the controller, maybe ill allow it if it's self navigating but probably not).
    • 3W speaker is also mounted. I was kinda worried about this one and you cant see in the pictures really but there is a large hole right under the speaker to allow for sound to pass through. This was a worry because, big hole, cold, perspex, cracking, etc.

    The only thing I didn't manage to mount is the on off/kill switch which I also intend to put in the head under the chin where it is not visible but easy to get to in case K9 decides to make a break for it. Obviously not intended for safe shut downs (at this stage) more for 'holey crap turn it off turn it off!'. I also like the idea of ensuring the cables for the 24v have an end point which is mounted in plastic and not with the metal frame. Most of the electronics are in perspex 'sandwiches' to protect it from being touched as well as isolate it from the frame.

    That is as far as I have gotten since the last update. I want to try and get the top panel done next with the buttons and battery gauges but do need to make sure its all enclosed as it would be enough to have a nasty accident if grabbed wrong. Anyway that's where I'm at. Hopefully I have it more together over the next 2 months before the next ComicCon type event,then its all about improvements on the software side.

  • Bit of a Rush for a ComicCon

    Andrew Bills04/12/2016 at 02:55 0 comments

    So, originally I was getting some help with K9 and it was a co-project with someone else doing the external panels, last week I worked out that the help was anything but with everything taking longer + costing more with the assistance.

    For example, the external panels to be converted from the PDF plans to be cut need to take into account the verticals are on a lean so they will be longer which can be worked out (yay math!). If you don't what you end up with is the right horizontal measurements and all the verticals being too short. This is what has happened to me with panels being sent off to get CNC'd and me being left with the bill + panels that are not the right height.

    The end result of this is the storage shelf I had planned inside of K9's middle is now much much shorter. More for storing a pile of comics than say a collectable Pop.

    So now with slightly shorter panels (and a frame which was partially constructed with the incorrect measurements being supplied. Some of the dimensions will be out of whack. I do still intend on using these incorrect sized panels however largely due to the cost that has now been incurred by me due to the mistakes made (not by me).

    The intent the weekend before last was to get a basic frame together last weekend & some panels on before the weekend just past. Also to have the basic locomotion working to allow K9 to be driven in and out of a local Comic Con type event which we had a stand for a Tardis + Daleks + etc.

    What occurred was a few days in a row of me going to bed at 2am with little process before I decided to take the project entirely on my own and made much more progress.

    So what occurred was a furious couple of days of getting the frame together, plates on, motors in, etc. This wasn't the original intended design but due to time constraints being forced on me + the incorrect measurements on parts already assembled certain elements were changed meaning less internal storage room basically. Storage was a bonus feature in the design so not critical, but still sad not to have it as intended.

    While trying to get this frame together I was also involved in the panels (where I discovered they were not done correctly), this also resulted in multiple trips across the city to pick-up what the cutters were told to do but sadly not what was needed 100%. Elements such as the head, sunken panel on the side or the aluminium K9 lettering for the side (90% of the reason to go to the cutters instead of doing it myself) were not even sent. Leaving multiple trips and working with the cutters at their shop to get something done.


    As mentioned some of the rush was to have this ready for a local ComicCon type event so on top of doing this I also needed to set-up the booth for the weekend. K9 was not in a state for photography for the more passionate fans unfortunately so it had seemed like my week of rushing and running myself into the ground was wasted...

    ... Luckily one of the booths at the Comic Con was the local Hackerspace run by a guy who I had met previously. While K9 might not have been in a state for me I did suggest that it's current state might be perfect for the Hackerspace booth to have on display (they mostly just had a 3D printer and sold stuff they printed, even though they had made cool stuff before).

    So Friday night after set-up I was up late doing basic wiring to ensure there was power through K9 so he could be turned on and off but left the motors disconnected.

    The head 'frame' was completed on Friday daytime using the panels that I did get completed for the shape. This plus one of the panels being attached was enough for most to recognise what it was. The head was held in place with some 90mm plumbing pipe which was attached at both ends. While I had intended to build a neck the piping is actually a more solid and useful approach as it allows lots of space for wiring between it and the body (plus depending how I connect the wires I might be able to disconnect the head for transport).

    In short K9 lived...

    Read more »

  • Controller Complete

    Andrew Bills04/11/2016 at 09:17 0 comments

    I had a bit of a week trying to get a somewhat working K9 for a local ComicCon, short version - I failed and the help I was getting I will be avoiding if I want to get this completed at all. But focusing on the positives one complete controller.

    So how did I get this sucker together? Well the small induction charger I got for this project is aparently too small, so small that no one who has gotten it has made it work before. So I had to go up a size into a small phone induction reciever I got off ebay (which *just* fit).

    To assemble I removed the existing onboard Arduino Fio power switch & attached my own switch which I had mounted in the 3d printed holder I superglued into the controller (picture below). With the switch on, next I attached the induction charger, positioned everything and got it sandwiched into the case.

    It was a little tricky to get it in there and required a little bit of screwdriver poking to get the cables to sit right.

    Unfortunately with the larger induction receiver I had to remove more of the existing mounts that hold the controller together hence the gap you see here. I used some thick see through plastic sticker stuff to close the controller. The only downside is it made the switch a little tight and the button on top which I had glued on to the switch is now a bit loose. It cant fall out due to the design but just a little annoying. Chalking that up to lesson learnt type thing.

    Inside the controlleryou can see a little more of what I had to fit in there. Everything does fit and while I originally intended to add some packing foam around the edges so the button pad didnt move once it was all together it was pretty clear that it wasn't going anywhere.

    I didnt put any holes in the controller around the lights so you can see if it was on or not but when it was assembled you can actually see some of the lights through the controller so that is enough to know if it is on or not.

    I had also changed some of the controller code (updated in the project). Basically with an Arduino Fio when you charge it off USB it turns on, and when charging off an induction charger connected through the same route it also turns on. As my controller would just broadcast every 100ms this meant that when it was charging it would be doing that.

    I've change the code so that when you turn it on it will do the basic calibration and set-up stuff but have a flag to know if it should start sending data. As soon as any button is pressed it will change the flag state and data will be sent. This way when its charging at least it wont be using the XBee & theoretically using less power to be charging faster.

    Given the power consumption of a Arduino Fio + the efficiency of the receiver I expect it would take 2hrs to charge to capacity.

    All in all I am pretty happy with the controller. I have set the XBEE to communicate at 9600 and the RPi serial will need to use CTS/RTS but it seems to work quite well.

    Next update, as promised will be about the frame + some stuff I did with it on the weekend. That can be tomorrow's update.

  • Not as messy as it looks

    Andrew Bills04/02/2016 at 10:14 0 comments

    So I spent some time on wiring yesterday to get most of the main body wired correctly... as much as I could without the correct 5v voltage regulator (ordered a replacement, should of been here on Friday hopefully Monday). Much like the description it isn't as messy as it looks.... I shorted up a couple of wires but the bulk of 'mess' is just the 5v to 3.3v logic converter needed for the return signal from the ultrasonics.

    While I was fiddling I also rewired the serial cables (as the ones I made previously were a little.... iffy it seemed and required some wiggling) and made a 1 to 2 connector for the I2C bus so that I could connect in the microphone later using a ADC converter (which I might also do but it's non-critical). I also decided to use some of the white plastic power bus' you can see in the picture for power distribution at the top... then had to order more with expensive express postage for the bottom seeing how I only had the one set.

    I also switched out the relay that wasnt working with a new replacement. The old one wasn't working partially because I didnt understand what it was doing properly but mostly because all the connectors were rusted to buggery. The new one works great but I did have to re-drill some of the mounts because they were different sizes & as a result only 2 of the mounts are screwed into the board due to the holes on one side being too close to the relays to screw down without damaging stuff.

    Not a complete waste as I had to mount the power bus' anyway + I was able to create some extra holes for zip tie loops that I might use as cable guides (you can see 2 guides on each side of the Pi for example).

    I also connected up the external amp so I can plug in the 3w speaker that will be in the head. How? I wired directly to the soldering points just like you would if you were building a Pocket PiGrrl with a PiZero (https://learn.adafruit.com/pocket-pigrrl/pi-audio).

    So seeing how I didn't have a frame or ability to power it up properly yet I connected in the 5v usb I have been using to check individual components and installed some stuff. Specifically - Kivy (touchscreen stuff) and OpenCV on a virtual (recognition stuff with the camera).

    If you are interested in those here is more or less the guides I used.

    - Kivy https://github.com/mrichardson23/rpi-kivy-screen

    - OpenCV http://www.pyimagesearch.com/2015/10/26/how-to-install-opencv-3-on-raspbian-jessie/ (inside a virtual, may decide to move everything over to the virtual... havent decided)

    - I2C tools so I can check the 9DOF was still working with the wiring https://learn.sparkfun.com/tutorials/raspberry-pi-spi-and-i2c-tutorial (I probably will pick-up a ADS1115 next week to connect the microphone for voice recognition later)

    - Logitech Unifying Receiver (as I got a super cheap Logitech K400 KB from a store that was closing down and figured might as well) https://community.linuxmint.com/tutorial/view/1459 FYI if you do this you may not need all the steps. I couldn't get it to detect but it was just working

    What's next? I might make a few modifications to the controller code so when you turn it on it doesnt automatically send all the sensor data. Partially because I may or may not get a replacement induction receiver that will fit next week so may want to save power first time out of the gate & partially because the way the Arduino Fio v3 are wired when I charge it it will just turn on so less power it consumer when just accidentally turned on the better for that.

    The Panels for K9 FINALLY went to get CNC'd yesterday. They are going to be 6mm high density impact foam panels. Long story short, should be able to take a hit & not break + fairly light comparably to my other options. Also perfectly OK for signal like RFID which is through the chassis. If you decide to do this remember when using the prop plans that some panel heights are on an angle so you have to use some maths to figure out the angle and actual lengths of the leaning parts.

    Because the panels went off...

    Read more »

  • Enabling Serial on a RPi3 via the GPIO pins

    Andrew Bills03/29/2016 at 06:21 0 comments

    So there are some updates for this but the short version is the uart of the RPi3 doesnt work exactly the same as the RPi2. For my project I dont need BTE (but I like having wireless) and a lot of solutions for this problem involve changing clock speeds which id rather not.

    Fortunately the following is a working solution to get the serial ports working from the GPIO on the RPi3. I thought id include the steps because I had some trouble getting to this point and maybe someone else will benefit (though I did leave the solution on reddit too).

    1. For the RPi3, install Jessie build from raspberrypi.org version +2016-03-16 on an appropriate speed & size SD Card (Class 10)

    2. Power up the RPi with the SD in and probably a mouse and kb so you can setup the wifi and locale settings. I did that and checked what the ip address was (ifconfig) at the cmd line so I could use SSH for the rest of these steps. Up to you.

    3. Reboot with the network settings if you need to, I did it because I set it to boot to CLI

    4. Connect to the RPi and do a 'sudo raspi-config' to expand the file system and reboot (you can change other stuff if you want).

    5. Reboot. Else the FS wont expand and you wont have room for the following

    6. Run 'sudo apt-get update'

    7. Run 'sudo apt-get upgrade'

    8. Run 'sudo apt-get dist-upgrade'

    9. Run 'sudo rpi-update'

    10. As I dont need BTE you can enable an overlay that will mean the RPi3 will work like the 2.... do a 'sudo nano /boot/config.txt' then at the bottom of the file add 'dtoverlay=pi3-disable-bt'

    11. Do a 'sudo systemctl disable hciuart' for good measure

    12. Reboot

    At this point serial should work, if not check the tx/rx pins are connected correctly (and not accidentally reversed as I did that once).

    If you want you can install either 'screen' or 'minicom' to test, ive been using 'sudo screen /dev/ttyAMA0 115200' as the speed I have set on the xbee connected via serial on a sparkfun xbee explorer breakout. What I need to figure out now is how to make it run reliably as connected to a xbee on a usb breakout on my PC using XCTU I dont lose any data but when testing via the RPi after 30+ seconds the data starts to drop like the buffer is full or struggling to keep up (I wouldnt of thought it would). Currently the xbee on the arduino controller is sending out current state every 100ms (I upped it from 50ms) but it is still a bit off.

    I will play around with the settings on the xbee or the RPi with screen to try and figure this out. Currently I enabled both RTS & CTS on the xbee in K9 and I no longer receive data... so I think it's about flow control. Hopefully I can solve this without having to use more pins.

    Anyway, just in case anyone googling has problems with the serial to get to this point too.

View all 14 project logs

Enjoy this project?

Share

Discussions

Andrew Bills wrote 02/25/2016 at 00:59 point

I am still a little on the fence about battery choices, I think 2x 22.2v 6s 16Ah batteries will be perfect especially if i connect them in parallel so i can change them over without losing power (if I need to) but Lipo arent really as cool. Wish there was a small hydrogen cell/lipo hybrid option that can give me the 24v too.

  Are you sure? yes | no

Andrew Bills wrote 03/05/2016 at 01:23 point

Ive gone with the 16ah batteries as I needed to pick something. I can always swap it out for a better power source at a later date but the batteries were $50 off each so I bit the bullet.

I also purchased some of these containers to put the lipos in. While I dont think they will explode or catch on fire or anything.... prefer to prepare and not need vs need and not have - https://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=44947

Using 2 batteries in parallel will mean I can either run it off one and switch the batteries or just run it off both. The analogue volt/amp meters will help me keep track of usage during run time but Im hopeful that the 16ah x2 might mean 2 days run time.

  Are you sure? yes | no

deʃhipu wrote 02/22/2016 at 09:58 point

That is a lot of relays. I'm not sure if they don't take much more current than they actually save, though. In my experience, things like motor shield or ultrasonic sensors don't really take that much power when inactive.

  Are you sure? yes | no

Andrew Bills wrote 02/22/2016 at 22:18 point

Depends if I have them normally open or normally closed. I need to get a full day out of it as charging throughout is probably not going to be an option. So Im making allowances for everything.

The ultrasonics the saving is not a lot if I use the relay to turn them off, they use 20mah each (so 80mah total) & the relay is is 72mah. But the majority of the time I expect K9 to be stationary so... 

80mah over 8-10 hours is a concern to me so I do need to do something. I am going to add some analogue gauges off the main battery when it is running so I can see what consumption is like and maybe tune. Id rather have the option and not use it than rewire a nice platform (not that it would be difficult but rather better to just do it up front)

Plus the 8 channel 5v relay is a nice way to distribute power too.

  Are you sure? yes | no

deʃhipu wrote 02/22/2016 at 22:31 point

There are also bi-stable relays, that only take power to switch, and not to stay in one state... I guess that could work.

  Are you sure? yes | no

Andrew Bills wrote 02/22/2016 at 22:51 point

Definitely a valid point. I am still deciding what should be NO/NC on the relay. Most is probably going to be powered when the relay is active as opposed to switching off. When you assume the 8-10hrs on everything it makes the justifications a little easier.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates