Ricbot sensorbox
Back to Ricbot
Sensorbox
The sensorbox is a relatively self-contained box with camera sensors and electronics to support and record data from these sensors.
External requirements are power (14-29V) and about 20W.
Connection to odometry and GNSS are through cabled Ethernet and MQTT.
Configuration
The sensorbox contains
- 4 Basler cameras
- A Raspberry Pi version 5 with SSD hard disk.
- A trigger management microprocessor (Teensy 4.0)
- A power distribution board with the ability for sequenced turn-on and turn-off.
- 12 V supply for cameras and common trigger junction board.
- A forward-looking Raspberry Pi camera (12 Mpixel)
- Possibly 2 multispectral cameras.
Function
Startup
When power is connected (XT60 plug), nothing happens. The power board requires a start signal.
The power switch has 3 positions:
- the down position gives an on signal to the power distribution board.
- Centre position is neutral (on or off)
- Up is delayed off; leave in this position when off (forced off).
Start-up issue
When everything is powered on at the same time, it happens that the cameras do not (all) get an IP in the right way, and thus are unavailable.
The reason is that the Raspberry Pi is running the DNS server providing the camera IP, but takes time to start, as does the network switch. This could be handled by using a static camera IP, but at times it is appropriate to connect the camera switch to an established cabled network, where the cameras should follow that network. This is needed to fully utilise the Basler Pylon software.
To solve this, the cameras will be supplied with a delayed turn-on. The delayed turn-on utilises one of the two power plugs on the power distribution intended for motor power. This allows the Raspberry Pi and the network switch to be ready before the cameras are turned on. The turn-on delay is controlled by the microprocessor.
Delayed turn-on is not implemented yet.
Trigger control
The microprocessor controls the triggers. It can issue 2 camera triggers and control an LED-based flash.
- Camera trigger 1 is intended for the Baslar cameras. It is a 3.3V signal, where the leading edge (low to high) is the trigger signal. The trailing edge should not be used. The pulse is at least 3ms.
- Camera trigger 2 is intended for the multi-spectral cameras and is also a 3.3V leading-edge signal. This signal can be delayed relative to the camera 1 signal.
- The flash signal is a positive pulse, where the delay and length are controllable.
Triggering is activated by a command from the Raspberry Pi by an MQTT message
- topic: 'dtubot/cmd/T0' message 'cam A B F R', where:
- 'cam' is the trigger command.
- 'A' is the delay from camera 1 trigger to camera 2 trigger in us. If zero, then there is no camera 2 trigger.
- 'B' is the delay to start of flash in us.
- 'F' is the duration of the flash in us. If zero, then there is no flash signal.
- 'R' is repeat timing in ms.
- Camera 1 is always triggered when the message is received.
Example:
- 'cam 0 0 0 1000': No camera 2 trigger, no flash, camera 1 trigger every 1000ms (1 sec).