A turrent which is an array of 4 lidar sensor's along with two compasses and a servo that scan the environment and dump data into database.
To make the experience fit your profile, pick a username and tell us what interests you.
We found and based on your interests.
Comma-Separated Values - 3.67 kB - 05/04/2018 at 07:23
Portable Network Graphics (PNG) - 24.20 kB - 05/04/2018 at 07:22
Raw setup.JPGPicture of ugly as sin turrent and rest of components- still to have compass and lidars mounted.
JPEG Image - 106.25 kB - 04/27/2018 at 11:25
Turrent.jpgOverview of architecture
JPEG Image - 46.03 kB - 04/26/2018 at 21:48
FOund out mu calculations (basic trig were stuffed!)
Have rectified and did a scan of the cardboard box.
When plotted - I saw the outline of the cardboard box.
The lidars did return a few weird readings (outliers) - I believe I can set the lidars for long range or short range. Going forward will have to consider if the turrent would be used in robotics projects what is the range required - suggestions?
Have an issue with the calculations - Did a scan with a square box over the turrent.
After scanning and running thru the calcs the plot looked like;
I have been testing with using the turrent to just scan a corner of my office - on a desk with a screen to the left and 2 corners of the room. I am sitting at my desk within scan range and the rest of the room appears to be out of range.
To test this, I am dumping the data out in .csv format and running it thru excel to perform the calculations to get a x/y coordinate centred on the centre of the turrent.
Had some dumb moments getting the formula correct in excel but eventually got what I believe are the correct x/y which I then produce a scatter plot.
First issue is that the scan steps may be too big - so may have to refine them. Also having difficulty in fully relating what the scan does with reality.
So I decided to simplify things by enclosing the turrent with things like a cardboard box and something circular.
Didn't have a box handy but did find one of my wifes large saucpans (about a foot in diameter (don't tell her please).
DId the scan and the turrent compass data was weird in a lot of readings. Realising that enclosing a electronic compass with a metal shield is probably not the best plan! (That was the 'Doh!' moment.)
Anyway, after taking out the erroneous readings, the plot does show a pretty good circle - so getting there.
Next test will be with a (non ferrous) cardboard box!
In summary, the hardware is complete.
I have dumped the readings and now have to perform some transformations to convert the readings into x/y coordinates centred on the middle of the turrent.
Unfortuantly, recovery from surgery has taken a tad longer - and perhaps the after-affects of the anasthetic my mind has been a bit fuzzy.
WIll try to get back to it tonite!
OK finalised the build (managed to 'obtain' another hmc5883 compass which gave me a set of 2.
Finalised the current servo code.
Integrated the lot and dumped the data into a CSV file.
If you wish to play - go for it!
I did some simple calculations in the data imported into excel and can see the corner of my office with the screen in the corner.
Still a bit of work to do
my original compass was a HMC5883 - I purchases 2 new compasses and started testing.
They didn't work.
After careful checking the supplier has now substituted MAG3110 based compasses - different I2c address and different codes.
Have them working under python now have to decode what the python module is doing and transcribe to C.
(Also just got out of hospital having gallstone removed - so that has slowed me down a tad!)
No picture (as yet) - Sorry.
Made a new prototype and installed turrent compass, and lidars and connected it back to Pi Zero. SHould be getting servo controller today and will replace cludgy pi controlled servo with servo on i2c!
Once again one sensor didn't work - normal issue of SDA/SCL being wrong way around.
Also mounted sensors 90 degrees out of phase - 5 minite job to resite (glad I used mounting tape to temporrarily hold them.
If all goes well, will integrate all my code-stubs together and commence final testing.
Then to set up my github with all the source code - and finalise the documentation here.
I have added one component - an external servo controller (in I2c) - makes life a tad simpler (although it is a bit of overkill - 16 channel servo controller for 1 servo).
Note that I do have an Onion Omega2+ with a servo hat - the trouble is that the Omega seems to have issues with MQTT in particular doing DNS lookup (I don't want to hard code IP addresses) so that is on the back burner for the moment.
Minor whoopsie - the compasses are on a fixed address - therefore both compasses will be connected to the I2c port expander and selected in turn.
(for some reason I thought you could add vin to one pin to change I2c address)
OK Servo and current physical construction complete - POC so ugly as sin!
As mentioned, I am using two storm water end caps for the physical turrent. The first test just eyeballed the centres however I now need to get a better version. The caps I have have a 11cm inside diameter (with a lip about 2cm high).
To get a decent template, I fired up Visio, drew a 11cm circle then placed two lines thru the centre (one vertical and one horizontal). The ends of these lines give me the LIDAR centre positions. At the centre of the 11cm circle I put a little tiny circle - this is a drill guide spot.
Printed it out and made work with the scissors and dropped it into one of the end-caps. Fitted perfectly so now have the drill template and the exact positioning for each lidar.
Create an account to leave a comment. Already have an account? Log In.
possibly - in the process of testing - however....
I am not using the compass's for absolute direction - I am really interested in comparing the two compasses in order to determine how far the current has rotated in relation to the fixed compass. Also FWIW - I would look to have the servo settle before reading the compass.
Time will tell......
Do you have problems with the magnetic field from the servo interfering with the compasses?
Become a member to follow this project and never miss any updates
The testing shows that the compass's are returning good readings - so the servo does not appear to be interfering. Note that I only issue compass reads when the servo is still.