Thanks Brian,
since the lightbar is supposed to replace a mechanical autosteer function, the idea was to have the lightbar driver board replace but “imitate” the autosteer (arduino). But, there are no transmissions at all coming from AOG. Could it be due to a missing simulator setup by me?
I understand your suggestion, but that would mean re-fabbing the driver board as a slave to the autosteer.
Otherwise, how about having a further com/USB channel exclusively dedicated to a lightbar function?
edit: syntax
AgIO sends to the autosteer, not AOG
yes. Meanwhile I set up the simulator properly (Thanks to help from Wilbert) and the PGN 254 are now coming in. I now have the choice between displaying a measure of 1) steering angle and 2) line distance.
Another question: on my laptop (Win7/64) AgOpenGPS.exe won’t run while I am admin. I have to switch to a regular user for that. Is that normal?
Thanks
You would think it would not run in normal?? Windows never ceases to amaze me - not in a good way
Good you got the udp figured out. Yes, you have the full pgn so you have speed as well as sections etc
Hi Brian, is it still true that in the Byte 10 for the Distance is used in the master version on GIT? See in the file ‘PGN 5.1.xlsx’, Byte 10 is not defined and in the AutoSteer ino it says: “//Bit 10 Tram”. Thx!
It is bit 10 for sure, It was formerly the tram. I’ll have to change the docs
I wonder if anyone could assist me. I am using an arduino nano and WS2812B string. All works fine but then lEDs get stuck all on - the arduino seems to freeze. I thought this might be a power issue so am using a 5v supply. I also have experimented using different number of led - from 19 to 59 but no difference. I am using the latest @woody_matt Aog 5.5 and ino files.
@Oliverp44 Are you using USB or UDP? I have got the USB version with 31 LEDs running with the simulator on my bench now - an hour in and no issues.
Is there a particular scenario when the system seems to freeze? e.g. during a u turn when the LEDs are changing a lot? After a set amount of time?
*Edit:
I have now got to the point where it has frozen. Ag diag is still showing the correct values being sent, so I am investigating whether the serial buffer is overflowing.
Using usb. I cannot seem to pinpoint when it occurs but seems to be when all green led lit. When in the field I did keep losing my gps (ardusimple) which I did not before so assumed power. Now I am using external power that has not happened again.
Just seen the frozen message - that is exactly as I experience
The Serial buffer was eventually filling up and the new messages were just being discarded. I have hopefully sorted it - please may you give this .ino a try and let me know how you get on? AutosteerPCBv2LB/Autosteer_USB_v5_0.ino at AOG-5.5_bugfix · MattWoodhead/AutosteerPCBv2LB · GitHub
thank you - After a short while it now again seems to freeze but only with the centre LED lit. the ag diag still shows correct messages. The timescale for the freeze has not changed and might be as short as 1 minute, rarely much longer.
I did some further testing using different number of LED but the issue continued. The only other thing to add was rather than freeze with all LED on it froze with simply the single middle LED on.
When it freezes with just the middle LED, is it purple/pink coloured? If so, the new .ino is doing that to indicate that it is not receiving the data from AgIO (either due to no connection, failure of the PC to send the message, or the serial buffer on the Nano is getting full. Does it persist or does it recover itself after a period of time? If you open AgDiag (see gears menu in AgIO) is the lightbar message still updating as you move?
There is some code on lines 839 to 843 that you can uncomment that will illuminate the onboard led of the arduino if the serial buffer starts to get full. Please can you uncomment them and see if the led is illuminated when you reach the freeze condition?
// if (Serial.available() > 55){ // check for the Serial buffer contents
// digitalWrite(LED_BUILTIN, HIGH); // Pin 13 LED indicates buffer is getting too full
// } else {
// digitalWrite(LED_BUILTIN, LOW);
// }
So tested again with that section uncommented.
The agio continues to send data even after the freeze
The usb connection remains fine
The on led on the arduino stays on and the rx led continues to blink.
No other leds light up when it freezes on arduino.
If I set the number of LEDs to 19 I have yet to get it to freeze.
If I set the number of leds to 25 or above it is fine at very slow speed but when I go faster than about 5kph it freezes.
When it freezes the led is purple / pink.
I am not sure what led to look for on the nano so see if the buffer is full.
I am using an Arduino Nano [A000005]
Been working on a few changes to some lightbar projects to add or improve WiFi capability. Also replaced cabled ethernet in MechanicTony’s Dual_Basic with Wifi. The repo’s are public in case someone might find them useful.
In my setup, I use a Toughpad which also acts as a WiFi AP. It shares out a USB tether from my phone for NTRIP data. This makes the entire setup only need power to each device and eliminate a lot of wiring in the cab. Also makes placement of the components more flexible.
I am looking at using hologram.io for data since my Toughpad has a builtin cellular card. Hologram is pretty cheap IoT access. The platform fee is $0.70 per SIM per month ($8.40/yr) and data is $0.08 per MB. A typical day of use in field for me is about 500 KB so it might be worth it to eliminate another cable.
The M5StickCplus is a neat solution to creating a light bar. It is $22 on Mouser and a meter of self-stick weatherproof LED’s is $14. Makes for a nice plug and play lightbar setup. In addition to the lightbar, it also displays the CM deviation from the track on the LCD display.
Some of these projects were ported from Arduino IDE to VSCode. I like Arduino IDE but VSCode / PlatformIO provided direct integration with Github and easier inclusion of external libraries. The “squiggles” feature is really nice since it highlights errors before even trying to compile. It saved me a bunch of time. Also, VSC makes it easy to “clean” the pre-compiled cache. This was very helpful when tracking down and issue with the WiFi code.
Added EasyEDA archive of the Basic_Dual_WiFi board in the Basic_Dual_WiFi repo. If anyone wants to order one from your favorite PCB maker. I used jlcpcb.com and the results were quite good.
Has anyone done this yet on a Teensy4.1/Panda Board? Or unless I want to figure out how to edit the firmware myself do I have to use an Arduino Nano?
You can use nearly any Micro Controller if you adapt the Code. A Teensy is a performance and cost overkill .
My interest in using the Teensy is from my understanding that having the GPS and the IMU connect to the same micro controller, as opposed to the tablet, is a superior system (plus fewer cables).
Though I just looked closer at chri5k’s post just above mine, it looks like you can do that with an ESP32. I am trying to build light bar guidance and section control for an ATV with a Panasonic FZ-M1 as the tablet (so just a single USB port) Looking at that, maybe using two ESP32s (one for section control) connected over WiFi is the way to go.
If you ever want to go autosteer, you can not use wifi. Wifi is subject to packet bursts, where packets get grouped for a second or so, and sent all at once. This does not work for autosteer. It would probably work for lightbar guidance only, but I can’t guarantee.